2026821
This commit is contained in:
@@ -0,0 +1,127 @@
|
||||
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_MISPRO;
|
||||
using GThinking.N_MODEL.Page;
|
||||
using GThinking.N_MISPRO.Data;
|
||||
using GThinking.N_PUBLIC;
|
||||
using GThinking.N_MISPRO.Utility;
|
||||
|
||||
namespace GThinking.N_XLXSBJ
|
||||
{
|
||||
public partial class TZYZJJ_YZZList : SingleGridBase
|
||||
{
|
||||
TZYZJJ_YZZ entity = new TZYZJJ_YZZ();
|
||||
TZYZJJ_YZZ_M queryentity = new TZYZJJ_YZZ_M();
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.UMID = 100860004;
|
||||
this.UMName = "线缆销售报价价格表调价因子";
|
||||
this.CurMaster = Master;
|
||||
this.ModuleGV = grdContentGrid;
|
||||
this.CurEntity = entity;
|
||||
this.CurQueryEntity = queryentity;
|
||||
this.sURLTarget = "TZYZJJ_YZZInfo.aspx";
|
||||
this.sQueryURLTarget = "TZYZJJ_YZZQuery.aspx";
|
||||
this.PageHeight = 600;
|
||||
this.PageWidth = 750;
|
||||
this.Master.EnableNewBtn = false;
|
||||
this.Master.EnableCopyBtn = false;
|
||||
this.Master.EnableDeleteBtn = false;
|
||||
|
||||
base.DataKeyNames = new string[] { "XLXSJGBYZZ_JGBID", "XLXSJGBYZZ_YZID" };
|
||||
|
||||
grdContentGrid.FindColumnByFieldName("XLXSJGBYZZ_JGBID").Visible = false;
|
||||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
CurQueryEntity.FieldByName("JGBID").Value = PageParam.GetRTrimString("JGBID");
|
||||
}
|
||||
|
||||
base.InitPage();
|
||||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Master_OnStandardQuery(null, null);
|
||||
}
|
||||
}
|
||||
|
||||
#region 模板事件继承
|
||||
protected override void Master_OnStandardQuery(object sender, EventArgs e)
|
||||
{
|
||||
base.InitEntityByCondition();
|
||||
entity.EntityTable.QuerySelSql = GetSQL();
|
||||
base.Master_OnStandardQuery(sender, e);
|
||||
entity.GridDataBind(grdContentGrid, tSession);
|
||||
}
|
||||
|
||||
protected override void BeforeDelete(TDatabase db, ref bool ActionIsDone)
|
||||
{
|
||||
entity.Param.Add("XLXSJGBYZZ_JGBID", this.grdContentGrid.SelectedDataKey["XLXSJGBYZZ_JGBID"].ToString());
|
||||
entity.Param.Add("XLXSJGBYZZ_YZID", this.grdContentGrid.SelectedDataKey["XLXSJGBYZZ_YZID"].ToString());
|
||||
base.BeforeDelete(db, ref ActionIsDone);
|
||||
}
|
||||
|
||||
protected override bool Master_AfterDeleteAction(object sender, EventArgs e)
|
||||
{
|
||||
if (!base.Master_AfterDeleteAction(sender, e)) { return false; }
|
||||
|
||||
base.InitEntityByCondition();
|
||||
entity.EntityTable.QuerySelSql = GetSQL();
|
||||
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("XLXSJGBYZZ_JGBID", grdContentGrid.DataKeys[e.Row.RowIndex]["XLXSJGBYZZ_JGBID"].ToString().Trim());
|
||||
LinkPageParam.AddString("XLXSJGBYZZ_YZID", grdContentGrid.DataKeys[e.Row.RowIndex]["XLXSJGBYZZ_YZID"].ToString().Trim());
|
||||
}
|
||||
|
||||
base.moduleGV_RowDataBound(sender, e);
|
||||
}
|
||||
|
||||
protected override void moduleGV_PageIndexChanging(object sender, GridViewPageEventArgs e)
|
||||
{
|
||||
base.InitEntityByCondition();
|
||||
entity.EntityTable.QuerySelSql = GetSQL();
|
||||
grdContentGrid.SelectedIndex = -1;
|
||||
|
||||
base.moduleGV_PageIndexChanging(sender, e);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 自定义函数
|
||||
|
||||
private string GetSQL()
|
||||
{
|
||||
string sSQL = "";
|
||||
sSQL = "select XLXSJGBYZZ_JGBID, XLXSJGBYZZ_YZID, XLXSTZYZ_YZMC, XLXSTZYZ_JJFS, XLXSJGBYZZ_YZZ," + "\r\n"
|
||||
+ " XLXSJGBYZZ_WHRID, XLXSJGBYZZ_WHR, XLXSJGBYZZ_WHSJ" + "\r\n"
|
||||
+ " from XLXSJGBYZZ left join XLXSTZYZ on XLXSTZYZ_YZID=XLXSJGBYZZ_YZID and XLXSTZYZ_MXBH='JZJ' " + "\r\n"
|
||||
+ " where XLXSTZYZ_TJYS=' ' ";
|
||||
if (!CurQueryEntity.FieldByName("JGBID").Value.Trim().Equals(""))
|
||||
{
|
||||
sSQL += " and XLXSJGBYZZ_JGBID=:pJGBID ";
|
||||
entity.Param.Add("pJGBID", CurQueryEntity.FieldByName("JGBID").Value.Trim());
|
||||
}
|
||||
else
|
||||
sSQL += " and 1<>1 ";
|
||||
sSQL += " order by XLXSJGBYZZ_JGBID,XLXSJGBYZZ_YZID,XLXSTZYZ_XSXH ";
|
||||
return sSQL;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user