feat: fmRpfe GridView 改用 ObjectDataSource
- 新增 RpfeDAC(SelectPage/SelectCount) - dsRPFEGrid 改 ObjectDataSource;Search/Selected 調整
This commit is contained in:
@@ -23,10 +23,6 @@ public partial class forms_customer_fmRpfe : Wellan.Web.UI.WUserControlBase
|
||||
{
|
||||
private string _RPPYN = "";
|
||||
private int _YY = 0;
|
||||
private string select = "SELECT * ";
|
||||
private string from = " FROM RPFE ";
|
||||
private string where = " WHERE 1=1 ";
|
||||
private string order = " ORDER BY RPPYN, RPREN";
|
||||
private TextBox[] RPDATs = new TextBox[10];
|
||||
private DropDownList[] RPACCs = new DropDownList[10];
|
||||
private TextBox[] RPAMTs = new TextBox[10];
|
||||
@@ -47,7 +43,6 @@ public partial class forms_customer_fmRpfe : Wellan.Web.UI.WUserControlBase
|
||||
{
|
||||
base.OnInit(e);
|
||||
dsRPFEForm.ConnectionString = ConnectionString;
|
||||
dsRPFEGrid.ConnectionString = ConnectionString;
|
||||
dsRPFE_RPACC.ConnectionString = ConnectionString;
|
||||
dsRPFE_RPENO.ConnectionString = ConnectionString;
|
||||
|
||||
@@ -152,14 +147,7 @@ public partial class forms_customer_fmRpfe : Wellan.Web.UI.WUserControlBase
|
||||
// 查詢動作
|
||||
private new void Search()
|
||||
{
|
||||
StringBuilder sql = new StringBuilder();
|
||||
sql.Append(select);
|
||||
sql.Append(from);
|
||||
sql.Append(where);
|
||||
dsRPFEGrid.SelectParameters.Clear();
|
||||
AddSearch(sql, dsRPFEGrid, "RPPYN", _RPPYN, "", true);
|
||||
sql.Append(order);
|
||||
dsRPFEGrid.SelectCommand = sql.ToString();
|
||||
dsRPFEGrid.SelectParameters["RPPYN"].DefaultValue = _RPPYN;
|
||||
}
|
||||
|
||||
private int CheckInsertInput(int index)
|
||||
@@ -229,9 +217,9 @@ public partial class forms_customer_fmRpfe : Wellan.Web.UI.WUserControlBase
|
||||
RPFEGrid.DataBind();
|
||||
}
|
||||
|
||||
protected void dsRPFEGrid_Selected(object sender, SqlDataSourceStatusEventArgs e)
|
||||
protected void dsRPFEGrid_Selected(object sender, ObjectDataSourceStatusEventArgs e)
|
||||
{
|
||||
if (e.AffectedRows == 0)
|
||||
if (e.ReturnValue is Int32 && WDAC.GetInt32Value(e.ReturnValue) == 0)
|
||||
{
|
||||
//RPFEForm.ChangeMode(FormViewMode.Insert);
|
||||
//RPFEForm_ModeChanged(sender, e);
|
||||
|
||||
Reference in New Issue
Block a user