114 lines
7.9 KiB
C#
114 lines
7.9 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 TZYZBJ2_BSY1List : SingleGridBase
|
|
{
|
|
TZYZBJ2_BSY1 entity = new TZYZBJ2_BSY1();
|
|
|
|
#region Page事件继承
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
this.UMID = 100860021;
|
|
this.UMName = "按导体材料电压区间报价数量区间调报价";
|
|
this.CurMaster = Master;
|
|
this.ModuleGV = grdContentGrid;
|
|
this.CurEntity = entity;
|
|
this.sURLTarget = "TZYZBJ2_BSY1Info.aspx";
|
|
this.PageWidth = 750;
|
|
this.PageHeight = 600;
|
|
|
|
base.DataKeyNames = new string[] { "XLXSBJDYZZ2BSY1_CPYT" };
|
|
|
|
this.Master.EnableQueryBtn = false;
|
|
this.Master.EnableAttachBtn = false;
|
|
|
|
base.InitPage();
|
|
|
|
if (!IsPostBack)
|
|
{
|
|
Master_OnStandardQuery(null, null);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#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("XLXSBJDYZZ2BSY1_CPYT", grdContentGrid.DataKeys[e.Row.RowIndex]["XLXSBJDYZZ2BSY1_CPYT"].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("XLXSBJDYZZ2BSY1_CPYT", grdContentGrid.DataKeys[grdContentGrid.SelectedIndex]["XLXSBJDYZZ2BSY1_CPYT"].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 rtrim(XLXSBJDYZZ2BSY1_CPYT)|| '|' || XLCPYT_CPYTMC as CPYT,XLXSBJDYZZ2BSY1_CPYT, XLXSBJDYZZ2BSY1_BZ, ");
|
|
strSQL.AppendLine(" XLXSBJDYZZ2BSY1_WHR, XLXSBJDYZZ2BSY1_WHRID,XLXSBJDYZZ2BSY1_WHSJ from XLXSBJDYZZ2BSY1 ");
|
|
strSQL.AppendLine(" left join XLCPYT on XLCPYT_CPYT = XLXSBJDYZZ2BSY1_CPYT ");
|
|
strSQL.AppendLine("where 1=1 ");
|
|
strSQL.AppendLine(" order by XLXSBJDYZZ2BSY1_CPYT desc ");
|
|
return strSQL;
|
|
}
|
|
#endregion
|
|
}
|
|
}
|