2026821
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.N_XLXSBJ
|
||||
{
|
||||
public partial class XLBJD_WBBJDMX_GGZZTHList : SingleGridBase
|
||||
{
|
||||
XLBJD_WBBJDMX_GGZZTH entity = new XLBJD_WBBJDMX_GGZZTH();
|
||||
XLBJD_WBBJDMX_GGZZTH_M queryentity = new XLBJD_WBBJDMX_GGZZTH_M();
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.UMID = 100860043;
|
||||
this.UMName = "外部线缆产品导入";
|
||||
this.CurMaster = Master;
|
||||
this.ModuleGV = grdContentGrid;
|
||||
this.CurEntity = entity;
|
||||
this.CurQueryEntity = queryentity;
|
||||
this.sURLTarget = "XLBJD_WBBJDMX_GGZZTHInfo.aspx";
|
||||
this.sQueryURLTarget = "XLBJD_WBBJDMX_GGZZTHQuery.aspx";
|
||||
this.PageWidth = 850;
|
||||
this.PageHeight = 600;
|
||||
|
||||
base.DataKeyNames = new string[] { "XLXSBJDXTHDZQD_XH", "XLXSBJDXTHDZQD_THLX" };
|
||||
|
||||
this.Master.EnablePrintBtn = false;
|
||||
this.Master.EnableAttachBtn = false;
|
||||
|
||||
base.InitPage();
|
||||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Master_OnStandardQuery(null, null);
|
||||
}
|
||||
}
|
||||
|
||||
#region 模板事件继承
|
||||
|
||||
protected override void Master_OnStandardQuery(object sender, EventArgs e)
|
||||
{
|
||||
base.InitEntityByCondition();
|
||||
entity.EntityTable.QuerySelSql = GetQuerySelSQL().ToString();
|
||||
base.Master_OnStandardQuery(sender, e);
|
||||
entity.GridDataBind(grdContentGrid, tSession);
|
||||
}
|
||||
|
||||
protected override void moduleGV_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
LinkPageParam.AddString("XLXSBJDXTHDZQD_XH", grdContentGrid.DataKeys[e.Row.RowIndex]["XLXSBJDXTHDZQD_XH"].ToString().Trim());
|
||||
LinkPageParam.AddString("XLXSBJDXTHDZQD_THLX", grdContentGrid.DataKeys[e.Row.RowIndex]["XLXSBJDXTHDZQD_THLX"].ToString().Trim());
|
||||
}
|
||||
base.moduleGV_RowDataBound(sender, e);
|
||||
}
|
||||
protected override void moduleGV_PageIndexChanging(object sender, GridViewPageEventArgs e)
|
||||
{
|
||||
base.InitEntityByCondition();
|
||||
entity.EntityTable.QuerySelSql = GetQuerySelSQL().ToString();
|
||||
grdContentGrid.SelectedIndex = -1;
|
||||
base.moduleGV_PageIndexChanging(sender, e);
|
||||
}
|
||||
|
||||
protected override void BeforeDelete(TDatabase db, ref bool ActionIsDone)
|
||||
{
|
||||
entity.Param.Add("XLXSBJDXTHDZQD_XH", grdContentGrid.DataKeys[grdContentGrid.SelectedIndex]["XLXSBJDXTHDZQD_XH"].ToString().Trim());
|
||||
entity.Param.Add("XLXSBJDXTHDZQD_THLX", grdContentGrid.DataKeys[grdContentGrid.SelectedIndex]["XLXSBJDXTHDZQD_THLX"].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().ToString();
|
||||
entity.GridDataBind(grdContentGrid, tSession);
|
||||
grdContentGrid.SelectedIndex = -1;
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void AfterDelete(TDatabase db, ref bool ActionIsDone)
|
||||
{
|
||||
base.AfterDelete(db, ref ActionIsDone);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 私有函数
|
||||
|
||||
private StringBuilder GetQuerySelSQL()
|
||||
{
|
||||
StringBuilder strSQL = new StringBuilder();
|
||||
strSQL.AppendLine(" select XLXSBJDXTHDZQD_XH, XLXSBJDXTHDZQD_THLX, XLXSBJDXTHDZQD_THQGGZF, XLXSBJDXTHDZQD_THHGGZF, ");
|
||||
strSQL.AppendLine(" XLXSBJDXTHDZQD_WHR, XLXSBJDXTHDZQD_WHRID,XLXSBJDXTHDZQD_WHSJ from XLXSBJDXTHDZQD ");
|
||||
strSQL.AppendLine("where XLXSBJDXTHDZQD_THLX = 'GGZZTH' ");
|
||||
|
||||
if (!string.IsNullOrEmpty(CurQueryEntity.FieldByName("THQGG").Value.Trim()))
|
||||
{
|
||||
strSQL.AppendLine(" and XLXSBJDXTHDZQD_THQGGZF like :pTHQGG ");
|
||||
entity.Param.Add("pTHQGG", "%" + CurQueryEntity.FieldByName("THQGG").Value.Trim() + "%");
|
||||
}
|
||||
if (!string.IsNullOrEmpty(CurQueryEntity.FieldByName("THHGG").Value.Trim()))
|
||||
{
|
||||
strSQL.AppendLine(" and XLXSBJDXTHDZQD_THHGGZF like :pTHHGG ");
|
||||
entity.Param.Add("pTHHGG", "%" + CurQueryEntity.FieldByName("THHGG").Value.Trim() + "%");
|
||||
}
|
||||
|
||||
strSQL.AppendLine(" order by XLXSBJDXTHDZQD_XH ");
|
||||
return strSQL;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user