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 TZYZBJ3_BSY3List : SingleGridBase
|
|
{
|
|
TZYZBJ3_BSY3 entity = new TZYZBJ3_BSY3();
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
this.UMID = 100860022;
|
|
this.UMName = "按产品用途电压等级分类报价数量区间调报价";
|
|
this.CurMaster = Master;
|
|
this.ModuleGV = grdContentGrid;
|
|
this.CurEntity = entity;
|
|
this.sURLTarget = "TZYZBJ3_BSY3Info.aspx";
|
|
this.PageWidth = 750;
|
|
this.PageHeight = 600;
|
|
|
|
base.DataKeyNames = new string[] { "XLXSBJDYZZ3BSY3_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("XLXSBJDYZZ3BSY3_XLJBXHID", grdContentGrid.DataKeys[e.Row.RowIndex]["XLXSBJDYZZ3BSY3_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("XLXSBJDYZZ3BSY3_XLJBXHID", grdContentGrid.DataKeys[grdContentGrid.SelectedIndex]["XLXSBJDYZZ3BSY3_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 XLXSBJDYZZ3BSY3_XLJBXHID, XLXSBJDYZZ3BSY3_BZ, ");
|
|
strSQL.AppendLine(" XLXSBJDYZZ3BSY3_WHR, XLXSBJDYZZ3BSY3_WHRID,XLXSBJDYZZ3BSY3_WHSJ from XLXSBJDYZZ3BSY3 ");
|
|
strSQL.AppendLine("where 1=1 ");
|
|
strSQL.AppendLine(" order by XLXSBJDYZZ3BSY3_XLJBXHID ");
|
|
return strSQL;
|
|
}
|
|
#endregion
|
|
|
|
}
|
|
}
|