提交说明10/9
This commit is contained in:
@@ -0,0 +1,126 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.WebControls.WebParts;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using GThinking.N_MODEL.Page;
|
||||
using GThinking.N_WORKFLOW;
|
||||
using GThinking.N_MISPRO;
|
||||
using GThinking.N_MISPRO.Data;
|
||||
using GThinking.N_MISPRO.Utility;
|
||||
using System.Text;
|
||||
|
||||
|
||||
namespace GThinking.U20261363_N_XLXSBJ
|
||||
{
|
||||
public partial class XLBJD_WBBJDMX_BBPPGZWHList : SingleGridBase
|
||||
{
|
||||
XLBJD_WBBJDMX_BBPPGZWH entity = new XLBJD_WBBJDMX_BBPPGZWH();
|
||||
XLBJD_WBBJDMX_BBPPGZWH_M queryentity = new XLBJD_WBBJDMX_BBPPGZWH_M();
|
||||
|
||||
#region Page事件继承
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.UMID = 100860174;
|
||||
this.UMName = "标准匹配规则";
|
||||
this.CurMaster = Master;
|
||||
this.ModuleGV = grdContentGrid;
|
||||
this.CurEntity = entity;
|
||||
this.CurQueryEntity = queryentity;
|
||||
this.sURLTarget = "XLBJD_WBBJDMX_BBPPGZWHInfo.aspx";
|
||||
this.sQueryURLTarget = "XLBJD_WBBJDMX_BBPPGZWHQuery.aspx";
|
||||
this.PageWidth = 600;
|
||||
this.PageHeight = 400;
|
||||
|
||||
base.DataKeyNames = new string[] { "ID" };
|
||||
|
||||
base.InitPage();
|
||||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Master_OnStandardQuery(null, null);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 模板事件继承
|
||||
|
||||
protected override void Master_OnStandardQuery(object sender, EventArgs e)
|
||||
{
|
||||
base.InitEntityByCondition();
|
||||
entity.EntityTable.QuerySelSql = GetQuerySelSQL();
|
||||
base.Master_OnStandardQuery(sender, e);
|
||||
entity.GridDataBind(grdContentGrid, tSession);
|
||||
}
|
||||
|
||||
protected override void moduleGV_PageIndexChanging(object sender, GridViewPageEventArgs e)
|
||||
{
|
||||
base.InitEntityByCondition();
|
||||
entity.EntityTable.QuerySelSql = GetQuerySelSQL();
|
||||
grdContentGrid.SelectedIndex = -1;
|
||||
base.moduleGV_PageIndexChanging(sender, e);
|
||||
}
|
||||
|
||||
protected override void BeforeDelete(TDatabase db, ref bool ActionIsDone)
|
||||
{
|
||||
entity.Param.Add("ID", grdContentGrid.DataKeys[grdContentGrid.SelectedIndex]["ID"].ToString().Trim());
|
||||
base.BeforeDelete(db, ref ActionIsDone);
|
||||
}
|
||||
|
||||
protected override bool Master_AfterDeleteAction(object sender, EventArgs e)
|
||||
{
|
||||
if (!base.Master_AfterDeleteAction(sender, e)) { return false; }
|
||||
entity.EntityTable.QuerySelSql = GetQuerySelSQL();
|
||||
entity.GridDataBind(grdContentGrid, tSession);
|
||||
grdContentGrid.SelectedIndex = -1;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
protected override void moduleGV_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
|
||||
|
||||
LinkPageParam.AddString("ID", grdContentGrid.DataKeys[e.Row.RowIndex]["ID"].ToString().Trim());
|
||||
|
||||
|
||||
}
|
||||
base.moduleGV_RowDataBound(sender, e);
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region 私有函数
|
||||
|
||||
private string GetQuerySelSQL()
|
||||
{
|
||||
StringBuilder strSQL = new StringBuilder();
|
||||
strSQL.AppendLine(" select ID, HeaderStd, DbStd, Priority, case when IsActive=1 then 'Y' else 'N' end as IsActive, Remark, ");
|
||||
strSQL.AppendLine(" CreateTime from dbo.StandardMatchRule ");
|
||||
strSQL.AppendLine("where 1=1 ");
|
||||
if (!string.IsNullOrEmpty(CurQueryEntity.FieldByName("HeaderStd").Value.Trim()))
|
||||
{
|
||||
strSQL.AppendLine(" and HeaderStd like :pHeaderStd ");
|
||||
entity.Param.Add("pHeaderStd", "%" + CurQueryEntity.FieldByName("HeaderStd").Value.Trim() + "%");
|
||||
}
|
||||
if (!string.IsNullOrEmpty(CurQueryEntity.FieldByName("DbStd").Value.Trim()))
|
||||
{
|
||||
strSQL.AppendLine(" and DbStd like :pDbStd ");
|
||||
entity.Param.Add("pDbStd", "%" + CurQueryEntity.FieldByName("DbStd").Value.Trim() + "%");
|
||||
}
|
||||
strSQL.AppendLine(" order by HeaderStd, Priority, DbStd ");
|
||||
|
||||
return strSQL.ToString();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user