157 lines
4.5 KiB
C#
157 lines
4.5 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_MISPRO;
|
|
using GThinking.N_MISPRO.Data;
|
|
using GThinking.N_MODEL.Page;
|
|
using GThinking.N_MODEL.Dialog;
|
|
using GThinking.N_MISPRO.Utility;
|
|
|
|
namespace GThinking.N_XLXSBJ
|
|
{
|
|
public partial class XLBJD_MsgDefInfo : SingleCardBase
|
|
{
|
|
XLBJD_MsgDef entity = new XLBJD_MsgDef();
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
this.UMID = 100860000;
|
|
this.UMName = "线缆销售报价单";
|
|
this.CurMaster = Master;
|
|
this.CurEntity = entity;
|
|
this.PageHeight = 400;
|
|
this.PageWidth = 500;
|
|
this.Master.EnableAttachBtn = false;
|
|
|
|
if (!IsPostBack)
|
|
{
|
|
InitControls();
|
|
}
|
|
base.InitPage();
|
|
}
|
|
|
|
#region 模板事件继承
|
|
|
|
protected override void LoadRecord()
|
|
{
|
|
if (!IsPostBack)
|
|
{
|
|
this.CurEntity.Param.Add("XLXSBJSM_SMID", PageParam.GetRTrimString("XLXSBJSM_SMID"));
|
|
this.CurEntity.Param.Add("XLXSBJSM_ZDM", PageParam.GetRTrimString("XLXSBJSM_ZDM"));
|
|
}
|
|
else
|
|
{
|
|
this.CurEntity.Param.Add("XLXSBJSM_SMID", txtSMID.Text.Trim());
|
|
this.CurEntity.Param.Add("XLXSBJSM_ZDM", txtZDM.Value.Trim());
|
|
}
|
|
|
|
base.LoadRecord();
|
|
}
|
|
|
|
protected override void OnNewRecorder()
|
|
{
|
|
base.OnNewRecorder();
|
|
|
|
txtWHR.Text = tSession.UserName;
|
|
txtWHRID.Value = tSession.UserId;
|
|
datWHSJ.Value = CMISproConvert.ConvertTime(DateTime.Now);
|
|
}
|
|
|
|
protected override void OnCopyRecorder()
|
|
{
|
|
base.OnCopyRecorder();
|
|
|
|
txtWHR.Text = tSession.UserName;
|
|
txtWHRID.Value = tSession.UserId;
|
|
datWHSJ.Value = CMISproConvert.ConvertTime(DateTime.Now);
|
|
}
|
|
|
|
protected override bool DataLogicValid()
|
|
{
|
|
if (txtSMNR.Text.Trim().Equals(""))
|
|
{
|
|
ShowMessage("信息内容不允许为空!");
|
|
return false;
|
|
}
|
|
return base.DataLogicValid();
|
|
}
|
|
|
|
protected override bool Master_BeforeDeleteAction(object sender, EventArgs e)
|
|
{
|
|
return base.Master_BeforeDeleteAction(sender, e);
|
|
}
|
|
protected override bool Master_BeforeSaveAction(object sender, EventArgs e)
|
|
{
|
|
if (ControlState == TControlState.ctsInsert || ControlState == TControlState.ctsCopy)
|
|
{
|
|
txtSMID.Text = XLBJD_MsgDef.getNewBH(txtZDM.Value.Trim());
|
|
}
|
|
return base.Master_BeforeSaveAction(sender, e);
|
|
}
|
|
|
|
protected override void BeforeSave(TDatabase db, ref bool ActionIsDone)
|
|
{
|
|
txtWHR.Text = tSession.UserName;
|
|
txtWHRID.Value = tSession.UserId;
|
|
datWHSJ.Value = CMISproConvert.ConvertTime(DateTime.Now);
|
|
|
|
base.BeforeSave(db, ref ActionIsDone);
|
|
}
|
|
|
|
protected override void SetControlState()
|
|
{
|
|
base.SetControlState();
|
|
|
|
txtWHR.Enabled = false;
|
|
datWHSJ.Enabled = false;
|
|
txtSMID.Enabled = false;
|
|
}
|
|
|
|
protected override void SetComboxItems()
|
|
{
|
|
|
|
base.SetComboxItems();
|
|
}
|
|
|
|
protected override bool Master_AfterSaveAction(object sender, EventArgs e)
|
|
{
|
|
return base.Master_AfterSaveAction(sender, e);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region 自定义事件
|
|
|
|
private void InitControls()
|
|
{
|
|
if (txtZDM.Value.Trim().Equals(""))
|
|
{
|
|
txtZDM.Value = PageParam.GetRTrimString("ZDMFromList").Equals("") ? PageParam.GetRTrimString("XLXSBJSM_ZDM") : PageParam.GetRTrimString("ZDMFromList");
|
|
if (txtZDM.Value.Equals("FKSM"))
|
|
{
|
|
this.PageName = "付款说明信息类助手";
|
|
txtSMNR.MaxLength = 1500;
|
|
}
|
|
else if (txtZDM.Value.Equals("BZ"))
|
|
{
|
|
this.PageName = "报价备注信息类助手";
|
|
txtSMNR.MaxLength = 1500;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region 控件事件
|
|
|
|
#endregion
|
|
}
|
|
}
|