109 lines
3.7 KiB
C#
109 lines
3.7 KiB
C#
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 TZYZBJE_BSY2List : SingleGridBase
|
|
{
|
|
TZYZBJE_BSY2 entity = new TZYZBJE_BSY2();
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
this.UMID = 100860086;
|
|
this.UMName = "按型号电压主芯截面范围报价数量区间调报价";
|
|
this.CurMaster = Master;
|
|
this.ModuleGV = grdContentGrid;
|
|
this.CurEntity = entity;
|
|
this.sURLTarget = "TZYZBJE_BSY2Info.aspx";
|
|
this.PageWidth = 750;
|
|
this.PageHeight = 600;
|
|
|
|
base.DataKeyNames = new string[] { "XLXSBJDYZZEBSY2_XLJBXHID" };
|
|
|
|
this.Master.EnableQueryBtn = false;
|
|
this.Master.EnableAttachBtn = false;
|
|
|
|
base.InitPage();
|
|
|
|
if (!IsPostBack)
|
|
{
|
|
Master_OnStandardQuery(null, null);
|
|
}
|
|
}
|
|
|
|
#region 模板事件继承
|
|
|
|
protected override void Master_OnStandardQuery(object sender, EventArgs e)
|
|
{
|
|
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("XLXSBJDYZZEBSY2_XLJBXHID", grdContentGrid.DataKeys[e.Row.RowIndex]["XLXSBJDYZZEBSY2_XLJBXHID"].ToString().Trim());
|
|
}
|
|
base.moduleGV_RowDataBound(sender, e);
|
|
}
|
|
protected override void moduleGV_PageIndexChanging(object sender, GridViewPageEventArgs e)
|
|
{
|
|
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("XLXSBJDYZZEBSY2_XLJBXHID", grdContentGrid.DataKeys[grdContentGrid.SelectedIndex]["XLXSBJDYZZEBSY2_XLJBXHID"].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 XLXSBJDYZZEBSY2_XLJBXHID, XLXSBJDYZZEBSY2_BZ, ");
|
|
strSQL.AppendLine(" XLXSBJDYZZEBSY2_WHR, XLXSBJDYZZEBSY2_WHRID,XLXSBJDYZZEBSY2_WHSJ from XLXSBJDYZZEBSY2 ");
|
|
strSQL.AppendLine("where 1=1 ");
|
|
strSQL.AppendLine(" order by XLXSBJDYZZEBSY2_XLJBXHID ");
|
|
return strSQL;
|
|
}
|
|
#endregion
|
|
|
|
}
|
|
}
|