2026821
This commit is contained in:
@@ -0,0 +1,112 @@
|
||||
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_MISPRO.Data;
|
||||
|
||||
namespace GThinking.N_XLXSBJ
|
||||
{
|
||||
public partial class XSYBJSQFJXXList : SingleGridBase
|
||||
{
|
||||
XSYBJSQFJXX entity = new XSYBJSQFJXX();
|
||||
|
||||
#region Page类事件
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.UMID = 100860082;
|
||||
this.UMName = "线缆销售报价附加信息";
|
||||
this.CurMaster = Master;
|
||||
this.ModuleGV = grdContentGrid;
|
||||
this.CurEntity = entity;
|
||||
this.sURLTarget = "XSYBJSQFJXXInfo.aspx";
|
||||
this.PageHeight = 400;
|
||||
this.PageWidth = 500;
|
||||
this.CurMaster.EnableQueryBtn = false;
|
||||
this.CurMaster.EnableAttachBtn = true;
|
||||
|
||||
base.DataKeyNames = new string[] { "XLXSBJKZXXSZ_BH" };
|
||||
|
||||
base.InitPage();
|
||||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Master_OnStandardQuery(null, null);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 模板事件继承
|
||||
|
||||
protected override void Master_OnStandardQuery(object sender, EventArgs e)
|
||||
{
|
||||
entity.EntityTable.QuerySelSql = GetQuerySelSQL();
|
||||
base.Master_OnStandardQuery(sender, e);
|
||||
entity.GridDataBind(grdContentGrid, tSession);
|
||||
}
|
||||
|
||||
protected override void moduleGV_PageIndexChanging(object sender, GridViewPageEventArgs e)
|
||||
{
|
||||
entity.EntityTable.QuerySelSql = GetQuerySelSQL();
|
||||
grdContentGrid.SelectedIndex = -1;
|
||||
base.moduleGV_PageIndexChanging(sender, e);
|
||||
}
|
||||
|
||||
protected override void BeforeDelete(TDatabase db, ref bool ActionIsDone)
|
||||
{
|
||||
entity.Param.Add("XLXSBJKZXXSZ_BH", grdContentGrid.DataKeys[grdContentGrid.SelectedIndex]["XLXSBJKZXXSZ_BH"].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("XLXSBJKZXXSZ_BH", grdContentGrid.DataKeys[e.Row.RowIndex]["XLXSBJKZXXSZ_BH"].ToString().Trim());
|
||||
}
|
||||
base.moduleGV_RowDataBound(sender, e);
|
||||
}
|
||||
|
||||
protected override bool Master_BeforeDeleteAction(object sender, EventArgs e)
|
||||
{
|
||||
if (XSYBJSQFJXX.bUsed(grdContentGrid.DataKeys[grdContentGrid.SelectedIndex]["XLXSBJKZXXSZ_BH"].ToString().Trim()))
|
||||
{
|
||||
ShowMessage("该项附加信息已被使用,不允许删除!");
|
||||
return false;
|
||||
}
|
||||
return base.Master_BeforeDeleteAction(sender, e);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 自定义事件
|
||||
|
||||
private string GetQuerySelSQL()
|
||||
{
|
||||
//研发自测:王威2025/3/20 20:40:25
|
||||
string sSQL = "select XLXSBJKZXXSZ_BH, XLXSBJKZXXSZ_MC, XLXSBJKZXXSZ_SJLX, XLXSBJKZXXSZ_DYZD, isnull(XLXSBJKZXXSZ_BT,'N') as XLXSBJKZXXSZ_BT, isnull(XLXSBJKZXXSZ_LBXS,'N') as XLXSBJKZXXSZ_LBXS,XLXSBJKZXXSZ_ZWCXTJ, "
|
||||
+ "XLXSBJKZXXSZ_SRFS,XLXSBJKZXXSZ_QSZ,XLXSBJKZXXSZ_WIDTH, XLXSBJKZXXSZ_ROWS, XLXSBJKZXXSZ_JLDW, XLXSBJKZXXSZ_BJSX,XLXSBJKZXXSZ_WHRID, XLXSBJKZXXSZ_WHR, XLXSBJKZXXSZ_WHSJ "
|
||||
+ "from XLXSBJKZXXSZ order by XLXSBJKZXXSZ_BJSX, XLXSBJKZXXSZ_BH, XLXSBJKZXXSZ_MC ";
|
||||
return sSQL;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user