2026821
This commit is contained in:
@@ -0,0 +1,440 @@
|
||||
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_MISPRO.Data;
|
||||
using GThinking.N_MODEL.Page;
|
||||
using GThinking.N_MISPRO.Utility;
|
||||
using GThinking.N_PUBLIC;
|
||||
using GThinking.N_MODEL.Dialog;
|
||||
using GThinking.N_CONTROL;
|
||||
|
||||
namespace GThinking.N_XLXSBJ
|
||||
{
|
||||
public partial class TZYZBJDInfo : SingleCardBase
|
||||
{
|
||||
TZYZBJ_YZZD entity = new TZYZBJ_YZZD();
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.UMID = 100860085;
|
||||
this.UMName = "按颜色主芯截面范围调报价";
|
||||
this.CurMaster = Master;
|
||||
this.CurEntity = entity;
|
||||
this.PageHeight = 400;
|
||||
this.PageWidth = 500;
|
||||
|
||||
SetTJYZLable();
|
||||
|
||||
if (!this.IsPostBack)
|
||||
{
|
||||
InitControls();
|
||||
}
|
||||
|
||||
base.InitPage();
|
||||
}
|
||||
|
||||
#region 模板事件继承
|
||||
|
||||
protected override void ReportDataSetAdd()
|
||||
{
|
||||
TDatabase db = TContextDatabases.GetDatabase("DBERP");
|
||||
TSQL sql = new TSQL(db);
|
||||
sql.Add("select XLXSTZYZ_YZID, XLXSTZYZ_YZMC from XLXSTZYZ where XLXSTZYZ_MXBH='BJD' and XLXSTZYZ_TJYS='D' order by XLXSTZYZ_XSXH,XLXSTZYZ_YZID ");
|
||||
DataSet ds = db.OpenDataSet(sql);
|
||||
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
|
||||
{
|
||||
string sYZID = "TZYZ_" + ds.Tables[0].Rows[i]["XLXSTZYZ_YZID"].ToString().Trim();
|
||||
string sYZMC = ds.Tables[0].Rows[i]["XLXSTZYZ_YZMC"].ToString().Trim();
|
||||
AddUserReportField("XLXSBJDYZZD", sYZID, sYZMC, "N");
|
||||
}
|
||||
|
||||
base.ReportDataSetAdd();
|
||||
}
|
||||
|
||||
protected override void ReportRecordSetAdd()
|
||||
{
|
||||
TDatabase dberp = TContextDatabases.GetDatabase("DBERP");
|
||||
|
||||
TSQL sSQL = new TSQL(dberp);
|
||||
TSQL SQL = new TSQL(dberp);
|
||||
SQL.Clear();
|
||||
SQL.Add("select XLXSTZYZ_YZID, XLXSTZYZ_YZMC ");
|
||||
SQL.Add(" from XLXSTZYZ");
|
||||
SQL.Add(" where XLXSTZYZ_MXBH = 'BJD' and XLXSTZYZ_TJYS='D' order by XLXSTZYZ_XSXH,XLXSTZYZ_YZID ");
|
||||
DataSet ds = dberp.OpenDataSet(SQL);
|
||||
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
|
||||
{
|
||||
sSQL.Add(string.Format(",sum(decode(XLXSBJDYZZD_YZID, '{0}', XLXSBJDYZZD_YZZ, 0)) as TZYZ_{0}", ds.Tables[0].Rows[i][0].ToString().Trim()));
|
||||
}
|
||||
sSQL.Text = "select 1" + sSQL.Text + " from XLXSBJDYZZD where XLXSBJDYZZD_JGBID='" + txtJGBID.Value.Trim() + "' and XLXSBJDYZZD_XLYSID= '" + cbxXLYSID.SelectedValue.Trim() + "'"
|
||||
+ " and XLXSBJDYZZD_ZXJMSX= " + txtZXJMSX.Value.ToString().Trim() + " and XLXSBJDYZZD_ZXJMXX= " + txtZXJMXX.Value.ToString().Trim() + " ";
|
||||
AddUserReportSQL("XLXSBJDYZZD", sSQL);
|
||||
base.ReportRecordSetAdd();
|
||||
}
|
||||
|
||||
protected override void SetControlState()
|
||||
{
|
||||
base.SetControlState();
|
||||
|
||||
txtWHR.Enabled = false;
|
||||
datWHSJ.Enabled = false;
|
||||
|
||||
# region 给调价因子控件设只读性
|
||||
if (ControlState == TControlState.ctsInsert || ControlState == TControlState.ctsCopy || ControlState == TControlState.ctsEdit)
|
||||
{
|
||||
for (int i = 1; i <= 20; i++)
|
||||
{
|
||||
gtNumTextBox txtTJYZ = (gtNumTextBox)Master.ContentFormControl.FindControl("txt" + "TJYZ" + i);
|
||||
txtTJYZ.Enabled = false;
|
||||
}
|
||||
|
||||
string[] sTJYZList = PageParam.GetRTrimString("TJYZList").Split(',');
|
||||
for (int i = 0; i < sTJYZList.Length; i++)
|
||||
{
|
||||
for (int j = 1; j <= 20; j++)
|
||||
{
|
||||
string sTZYZID = "BJ" + j.ToString().PadLeft(2, '0') + "|";
|
||||
gtNumTextBox txtTJYZ = (gtNumTextBox)Master.ContentFormControl.FindControl("txt" + "TJYZ" + j.ToString().Trim());
|
||||
if (sTJYZList[i].StartsWith(sTZYZID))
|
||||
{
|
||||
txtTJYZ.Enabled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
protected override void LoadRecord()
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
entity.Param.Add("XLXSBJDYZZD_JGBID", PageParam.GetRTrimString("XLXSBJDYZZD_JGBID"));
|
||||
entity.Param.Add("XLXSBJDYZZD_XLYSID", PageParam.GetRTrimString("XLXSBJDYZZD_XLYSID"));
|
||||
entity.Param.Add("XLXSBJDYZZD_YZID", PageParam.GetRTrimString("XLXSBJDYZZD_YZID"));
|
||||
entity.Param.Add("XLXSBJDYZZD_ZXJMSX", PageParam.GetRTrimString("XLXSBJDYZZD_ZXJMSX"));
|
||||
entity.Param.Add("XLXSBJDYZZD_ZXJMXX", PageParam.GetRTrimString("XLXSBJDYZZD_ZXJMXX"));
|
||||
}
|
||||
else
|
||||
{
|
||||
entity.Param.Add("XLXSBJDYZZD_JGBID", txtJGBID.Value.Trim());
|
||||
entity.Param.Add("XLXSBJDYZZD_XLYSID", txtOLD_XLYSID.Value.Trim());
|
||||
entity.Param.Add("XLXSBJDYZZD_YZID", txtYZID.Value.Trim());
|
||||
entity.Param.Add("XLXSBJDYZZD_ZXJMSX", txtZXJMSX.Value.ToString().Trim());
|
||||
entity.Param.Add("XLXSBJDYZZD_ZXJMXX", txtZXJMXX.Value.ToString().Trim());
|
||||
}
|
||||
base.LoadRecord();
|
||||
txtOLD_XLYSID.Value = cbxXLYSID.SelectedValue.Trim();
|
||||
txtOLD_ZXJMSX.Value = txtZXJMSX.Value.ToString().Trim();
|
||||
txtOLD_ZXJMXX.Value = txtZXJMXX.Value.ToString().Trim();
|
||||
|
||||
|
||||
# region 给调价因子控件赋值
|
||||
TDatabase dberp = TContextDatabases.GetDatabase("DBERP");
|
||||
TSQL sql = new TSQL(dberp);
|
||||
sql.Clear();
|
||||
sql.Add(string.Format(" select XLXSBJDYZZ{0}_YZID, XLXSBJDYZZ{0}_YZZ from XLXSBJDYZZ{0} ", "D"));
|
||||
sql.Add(string.Format(" where XLXSBJDYZZ{0}_JGBID=:pJGBID and XLXSBJDYZZ{0}_XLYSID=:pXLYSID ", "D"));
|
||||
sql.Add(string.Format(" and XLXSBJDYZZ{0}_ZXJMSX=:pZXJMSX and XLXSBJDYZZ{0}_ZXJMXX=:pZXJMXX ", "D"));
|
||||
sql.Add(string.Format(" order by XLXSBJDYZZ{0}_YZID ", "D"));
|
||||
sql.ParamByName("pJGBID").Value = txtJGBID.Value.Trim();
|
||||
sql.ParamByName("pXLYSID").Value = cbxXLYSID.SelectedValue.Trim();
|
||||
sql.ParamByName("pZXJMSX").Value = txtZXJMSX.Value;
|
||||
sql.ParamByName("pZXJMXX").Value = txtZXJMXX.Value;
|
||||
DataSet ds = dberp.OpenDataSet(sql);
|
||||
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
|
||||
{
|
||||
string sYZID = ds.Tables[0].Rows[i][0].ToString().Trim();
|
||||
double dYZZ = CMISproConvert.StrToFloat(ds.Tables[0].Rows[i][1].ToString().Trim());
|
||||
if (PageParam.GetRTrimString("TJYZList").Contains(sYZID + "|"))
|
||||
{
|
||||
for (int j = 1; j <= 20; j++)
|
||||
{
|
||||
string sTZYZID = "BJ" + j.ToString().PadLeft(2, '0');
|
||||
gtNumTextBox txtTJYZ = (gtNumTextBox)Master.ContentFormControl.FindControl("txt" + "TJYZ" + j.ToString().Trim());
|
||||
if (sYZID.Equals(sTZYZID))
|
||||
txtTJYZ.Value = dYZZ;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
protected override void OnNewRecorder()
|
||||
{
|
||||
base.OnNewRecorder();
|
||||
txtJGBID.Value = PageParam.GetRTrimString("XLXSBJDYZZD_JGBID");
|
||||
txtWHR.Text = tSession.UserName;
|
||||
txtWHRID.Value = tSession.UserId;
|
||||
datWHSJ.Text = CMISproConvert.ConvertTime(System.DateTime.Now);
|
||||
}
|
||||
|
||||
protected override void OnCopyRecorder()
|
||||
{
|
||||
base.OnCopyRecorder();
|
||||
txtJGBID.Value = PageParam.GetRTrimString("XLXSBJDYZZD_JGBID");
|
||||
txtWHR.Text = tSession.UserName;
|
||||
txtWHRID.Value = tSession.UserId;
|
||||
datWHSJ.Text = CMISproConvert.ConvertTime(System.DateTime.Now);
|
||||
}
|
||||
|
||||
protected override bool DataLogicValid()
|
||||
{
|
||||
if (!base.DataLogicValid()) return false;
|
||||
|
||||
if (txtZXJMXX.Value < 0)
|
||||
{
|
||||
ShowMessage("主芯截面下限--不允许为负数!");
|
||||
return false;
|
||||
}
|
||||
if (txtZXJMSX.Value < 0)
|
||||
{
|
||||
ShowMessage("主芯截面上限--不允许为负数!");
|
||||
return false;
|
||||
}
|
||||
if (txtZXJMSX.Value != 0)
|
||||
{
|
||||
if (txtZXJMXX.Value > txtZXJMSX.Value)
|
||||
{
|
||||
ShowMessage("主芯截面下限不允许超过主芯截面上限!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
TDatabase dberp = TContextDatabases.GetDatabase("DBERP");
|
||||
TSQL sql = new TSQL(dberp);
|
||||
string[] sTJYZList = PageParam.GetRTrimString("TJYZList").Split(',');
|
||||
for (int i = 0; i < sTJYZList.Length; i++)
|
||||
{
|
||||
if (ControlState == TControlState.ctsInsert || ControlState == TControlState.ctsCopy)
|
||||
{
|
||||
sql.Clear();
|
||||
sql.Add("select XLXSBJDYZZD_XLYSID,XLXSBJDYZZD_ZXJMSX,XLXSBJDYZZD_ZXJMXX ");
|
||||
sql.Add("from XLXSBJDYZZD ");
|
||||
sql.Add("where XLXSBJDYZZD_JGBID=:pJGBID and XLXSBJDYZZD_YZID=:pYZID and XLXSBJDYZZD_XLYSID =:pXLYSID ");
|
||||
sql.Add(" and ((XLXSBJDYZZD_ZXJMXX>=:pZXJMXX ");
|
||||
if (txtZXJMSX.Value != 0)
|
||||
{
|
||||
sql.Add(" and XLXSBJDYZZD_ZXJMXX<=:pZXJMSX ");
|
||||
}
|
||||
sql.Add(" ) ");
|
||||
sql.Add(" or (");
|
||||
if (txtZXJMSX.Value != 0)
|
||||
{
|
||||
sql.Add(" XLXSBJDYZZD_ZXJMSX>0 and XLXSBJDYZZD_ZXJMSX>=:pZXJMXX and XLXSBJDYZZD_ZXJMSX<=:pZXJMSX ");
|
||||
}
|
||||
else
|
||||
{
|
||||
sql.Add(" (XLXSBJDYZZD_ZXJMSX>0 and XLXSBJDYZZD_ZXJMSX>=:pZXJMXX) or (XLXSBJDYZZD_ZXJMSX=0) ");
|
||||
}
|
||||
sql.Add(" ) ");
|
||||
sql.Add(" or (XLXSBJDYZZD_ZXJMXX<=:pZXJMXX and (XLXSBJDYZZD_ZXJMSX=0 or XLXSBJDYZZD_ZXJMSX>=:pZXJMSX))");
|
||||
sql.Add(" ) ");
|
||||
sql.ParamByName("pJGBID").Value = txtJGBID.Value.Trim();
|
||||
sql.ParamByName("pYZID").Value = sTJYZList[i].Split('|')[0];
|
||||
sql.ParamByName("pXLYSID").Value = cbxXLYSID.SelectedValue.Trim();
|
||||
sql.ParamByName("pZXJMXX").Value = txtZXJMXX.Value;
|
||||
if (txtZXJMSX.Value != 0)
|
||||
{
|
||||
sql.ParamByName("pZXJMSX").Value = txtZXJMSX.Value;
|
||||
}
|
||||
DataSet ds = dberp.OpenDataSet(sql);
|
||||
if (ds.Tables[0].Rows.Count > 0)
|
||||
{
|
||||
string sYS = getYSMC(cbxXLYSID.SelectedValue.Trim());
|
||||
string sZXJMQJ = "";
|
||||
if (CMISproConvert.StrToFloat(ds.Tables[0].Rows[0]["XLXSBJDYZZD_ZXJMSX"].ToString()) != 0)
|
||||
sZXJMQJ = ds.Tables[0].Rows[0]["XLXSBJDYZZD_ZXJMXX"].ToString().Trim() + "~" + ds.Tables[0].Rows[0]["XLXSBJDYZZD_ZXJMSX"].ToString().Trim();
|
||||
else
|
||||
sZXJMQJ = ds.Tables[0].Rows[0]["XLXSBJDYZZD_ZXJMXX"].ToString().Trim() + "~" + "--";
|
||||
ShowMessage(string.Format("因子{0}与已有主芯截面区间【{1}】【{2}】的记录有交集,不允许保存!", sTJYZList[i], sZXJMQJ, sYS));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sql.Clear();
|
||||
sql.Add(" select XLXSBJDYZZD_XLYSID,XLXSBJDYZZD_ZXJMSX,XLXSBJDYZZD_ZXJMXX ");
|
||||
sql.Add(" from XLXSBJDYZZD ");
|
||||
sql.Add(" where XLXSBJDYZZD_JGBID=:pJGBID and XLXSBJDYZZD_YZID=:pYZID ");
|
||||
sql.Add(" and (XLXSBJDYZZD_ZXJMXX<>:pOLDZXJMXX or XLXSBJDYZZD_ZXJMSX<>:pOLDZXJMSX ");
|
||||
sql.Add(" or XLXSBJDYZZD_XLYSID<>:pOLDXLYSID )");
|
||||
sql.Add( "and XLXSBJDYZZD_XLYSID =:pXLYSID ");
|
||||
sql.Add(" and ((XLXSBJDYZZD_ZXJMXX>=:pZXJMXX ");
|
||||
if (txtZXJMSX.Value != 0)
|
||||
{
|
||||
sql.Add(" and XLXSBJDYZZD_ZXJMXX<=:pZXJMSX ");
|
||||
}
|
||||
sql.Add(" ) ");
|
||||
sql.Add(" or (");
|
||||
if (txtZXJMSX.Value != 0)
|
||||
{
|
||||
sql.Add(" XLXSBJDYZZD_ZXJMSX>0 and XLXSBJDYZZD_ZXJMSX>=:pZXJMXX and XLXSBJDYZZD_ZXJMSX<=:pZXJMSX ");
|
||||
}
|
||||
else
|
||||
{
|
||||
sql.Add(" (XLXSBJDYZZD_ZXJMSX>0 and XLXSBJDYZZD_ZXJMSX>=:pZXJMXX) or (XLXSBJDYZZD_ZXJMSX=0) ");
|
||||
}
|
||||
sql.Add(" ) ");
|
||||
sql.Add(" or (XLXSBJDYZZD_ZXJMXX<=:pZXJMXX and (XLXSBJDYZZD_ZXJMSX=0 or XLXSBJDYZZD_ZXJMSX>=:pZXJMSX))");
|
||||
sql.Add(" ) ");
|
||||
sql.ParamByName("pJGBID").Value = txtJGBID.Value.Trim();
|
||||
sql.ParamByName("pYZID").Value = sTJYZList[i].Split('|')[0];
|
||||
sql.ParamByName("pXLYSID").Value = cbxXLYSID.SelectedValue.Trim();
|
||||
sql.ParamByName("pZXJMXX").Value = txtZXJMXX.Value;
|
||||
if (txtZXJMSX.Value != 0)
|
||||
{
|
||||
sql.ParamByName("pZXJMSX").Value = txtZXJMSX.Value;
|
||||
}
|
||||
sql.ParamByName("pOLDZXJMXX").Value = txtOLD_ZXJMXX.Value;
|
||||
sql.ParamByName("pOLDZXJMSX").Value = txtOLD_ZXJMSX.Value;
|
||||
sql.ParamByName("pOLDXLYSID").Value = txtOLD_XLYSID.Value.Trim();
|
||||
DataSet ds = dberp.OpenDataSet(sql);
|
||||
if (ds.Tables[0].Rows.Count > 0)
|
||||
{
|
||||
string sYS = getYSMC(cbxXLYSID.SelectedValue.Trim());
|
||||
string sZXJMQJ = "";
|
||||
if (CMISproConvert.StrToFloat(ds.Tables[0].Rows[0]["XLXSBJDYZZD_ZXJMSX"].ToString()) != 0)
|
||||
sZXJMQJ = ds.Tables[0].Rows[0]["XLXSBJDYZZD_ZXJMXX"].ToString().Trim() + "~" + ds.Tables[0].Rows[0]["XLXSBJDYZZD_ZXJMSX"].ToString().Trim();
|
||||
else
|
||||
sZXJMQJ = ds.Tables[0].Rows[0]["XLXSBJDYZZD_ZXJMXX"].ToString().Trim() + "~" + "--";
|
||||
ShowMessage(string.Format("因子{0}与已有主芯截面区间【{1}】【{2}】的记录有交集,不允许保存!", sTJYZList[i], sZXJMQJ, sYS));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override bool Master_BeforeSaveAction(object sender, EventArgs e)
|
||||
{
|
||||
if (!base.Master_BeforeSaveAction(sender, e)) return false;
|
||||
|
||||
txtWHR.Text = tSession.UserName;
|
||||
txtWHRID.Value = tSession.UserId;
|
||||
datWHSJ.Text = CMISproConvert.ConvertTime(System.DateTime.Now);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override bool Master_AfterSaveAction(object sender, EventArgs e)
|
||||
{
|
||||
txtOLD_XLYSID.Value = cbxXLYSID.SelectedValue.Trim();
|
||||
txtOLD_ZXJMSX.Value = txtZXJMSX.Value.ToString().Trim();
|
||||
txtOLD_ZXJMXX.Value = txtZXJMXX.Value.ToString().Trim();
|
||||
txtYZID.Value = PageParam.GetRTrimString("FirstYZID");
|
||||
|
||||
string sJGBID = txtJGBID.Value.Trim();
|
||||
string sXLYSID = cbxXLYSID.SelectedValue.Trim();
|
||||
string sZXJMSX = txtZXJMSX.Value.ToString().Trim();
|
||||
string sZXJMXX = txtZXJMXX.Value.ToString().Trim();
|
||||
# region 将调价因子控件值更新至数据库中
|
||||
TDatabase dberp = TContextDatabases.GetDatabase("DBERP");
|
||||
TSQL sql = new TSQL(dberp);
|
||||
sql.Clear();
|
||||
dberp.ExecSQL(string.Format("delete from XLXSBJDYZZ{0} where XLXSBJDYZZ{0}_JGBID='{1}' and XLXSBJDYZZ{0}_XLYSID='{2}' "
|
||||
+ "and XLXSBJDYZZ{0}_ZXJMSX= {3} and XLXSBJDYZZ{0}_ZXJMXX= {4} ", "D", sJGBID, sXLYSID, sZXJMSX, sZXJMXX));
|
||||
string[] sTJYZList = PageParam.GetRTrimString("TJYZList").Split(',');
|
||||
DateTime tNow = DateTime.Now;
|
||||
for (int i = 0; i < sTJYZList.Length; i++)
|
||||
{
|
||||
sql.Clear();
|
||||
sql.Add(string.Format("insert into XLXSBJDYZZ{0}(XLXSBJDYZZ{0}_JGBID, XLXSBJDYZZ{0}_XLYSID, XLXSBJDYZZ{0}_ZXJMSX, XLXSBJDYZZ{0}_ZXJMXX, "
|
||||
+ " XLXSBJDYZZ{0}_YZID, XLXSBJDYZZ{0}_YZZ, XLXSBJDYZZ{0}_WHR, XLXSBJDYZZ{0}_WHRID, XLXSBJDYZZ{0}_WHSJ)", "D"));
|
||||
sql.Add(string.Format(" values(:pJGBID,:XLYSID,:pZXJMSX,:pZXJMXX,:pYZID,:pYZZ,:pWHR,:pWHRID,:pWHSJ)"));
|
||||
sql.ParamByName("pJGBID").Value = sJGBID;
|
||||
sql.ParamByName("XLYSID").Value = sXLYSID;
|
||||
sql.ParamByName("pZXJMSX").Value = sZXJMSX;
|
||||
sql.ParamByName("pZXJMXX").Value = sZXJMXX;
|
||||
sql.ParamByName("pWHR").Value = tSession.UserName;
|
||||
sql.ParamByName("pWHRID").Value = tSession.UserId;
|
||||
sql.ParamByName("pWHSJ").Value = tNow;
|
||||
|
||||
for (int j = 1; j <= 20; j++)
|
||||
{
|
||||
string sTZYZID = "BJ" + j.ToString().PadLeft(2, '0') + "|";
|
||||
gtNumTextBox txtTJYZ = (gtNumTextBox)Master.ContentFormControl.FindControl("txt" + "TJYZ" + j.ToString().Trim());
|
||||
if (sTJYZList[i].StartsWith(sTZYZID))
|
||||
{
|
||||
sql.ParamByName("pYZID").Value = sTZYZID.TrimEnd('|');
|
||||
sql.ParamByName("pYZZ").Value = txtTJYZ.Value;
|
||||
dberp.ExecSQL(sql);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
return base.Master_AfterSaveAction(sender, e);
|
||||
}
|
||||
|
||||
protected override bool Master_BeforeDeleteAction(object sender, EventArgs e)
|
||||
{
|
||||
string sYZIDlist = TZYZBJAInfo.GetYZIDList(PageParam.GetRTrimString("TJYZList"));
|
||||
entity.EntityTable.DeleteSql = " delete from XLXSBJDYZZD where XLXSBJDYZZD_JGBID =:XLXSBJDYZZD_JGBID and XLXSBJDYZZD_XLYSID=:XLXSBJDYZZD_XLYSID "
|
||||
+ " and XLXSBJDYZZD_ZXJMSX=:XLXSBJDYZZD_ZXJMSX and XLXSBJDYZZD_ZXJMXX=:XLXSBJDYZZD_ZXJMXX and "
|
||||
+ CMISproDataBase.GetWhereEqual("XLXSBJDYZZD_YZID", sYZIDlist);
|
||||
return base.Master_BeforeDeleteAction(sender, e);
|
||||
}
|
||||
|
||||
protected override void SetComboxItems()
|
||||
{
|
||||
TComboBox.SetComboBox("DBERP", cbxXLYSID, "select XLYSB_XLYSID as ID,XLYSB_XLYSMC as Name from XLYSB where 1=1 order by ID ", false);
|
||||
base.SetComboxItems();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 自定义函数
|
||||
|
||||
private void InitControls()
|
||||
{
|
||||
txtYZID.Value = PageParam.GetRTrimString("FirstYZID");
|
||||
}
|
||||
|
||||
private void SetTJYZLable()
|
||||
{
|
||||
string[] sTJYZList = PageParam.GetRTrimString("TJYZList").Split(',');
|
||||
for (int i = 0; i < sTJYZList.Length; i++)
|
||||
{
|
||||
|
||||
for (int j = 1; j <= 20; j++)
|
||||
{
|
||||
string sTZYZID = "BJ" + j.ToString().PadLeft(2, '0') + "|";
|
||||
gtNumTextBox txtTJYZ = (gtNumTextBox)Master.ContentFormControl.FindControl("txt" + "TJYZ" + j.ToString().Trim());
|
||||
gtLabel lblTJYZ = (gtLabel)Master.ContentFormControl.FindControl("lbl" + "TJYZ" + j.ToString().Trim());
|
||||
if (sTJYZList[i].StartsWith(sTZYZID))
|
||||
{
|
||||
string s = sTJYZList[i].Replace(sTZYZID, "") + ":";
|
||||
lblTJYZ.Text = s;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private string getYSMC(string sYSID)
|
||||
{
|
||||
string sYSMC = "";
|
||||
TDatabase dberp = TContextDatabases.GetDatabase("DBERP");
|
||||
TSQL SQL = new TSQL(dberp);
|
||||
SQL.Clear();
|
||||
SQL.Add(" select XLYSB_XLYSID,XLYSB_XLYSMC from XLYSB where XLYSB_XLYSID = :pXLYSID ");
|
||||
SQL.ParamByName("pXLYSID").Value = sYSID;
|
||||
DataSet ds = dberp.OpenDataSet(SQL);
|
||||
if (ds.Tables[0].Rows.Count > 0)
|
||||
{
|
||||
sYSMC = ds.Tables[0].Rows[0]["XLYSB_XLYSMC"].ToString().Trim();
|
||||
}
|
||||
return sYSMC;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user