159 lines
4.0 KiB
C#
159 lines
4.0 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_PUBLIC;
|
|
using GThinking.N_MISPRO.Utility;
|
|
using System.Text.RegularExpressions;
|
|
using GThinking.N_CONTROL;
|
|
|
|
namespace GThinking.N_XLXSBJ
|
|
{
|
|
public partial class XLBJD_WBBJDMX_XHGZInfo : SingleCardBase
|
|
{
|
|
XLBJD_WBBJDMX_XHGZ entity = new XLBJD_WBBJDMX_XHGZ();
|
|
|
|
#region 页面初始化
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
this.UMID = 100860043;
|
|
this.UMName = "外部线缆产品导入";
|
|
this.CurMaster = Master;
|
|
this.CurEntity = entity;
|
|
this.Master.EnableAttachBtn = false;
|
|
this.Master.EnablePrintBtn = false;
|
|
this.PageWidth = 500;
|
|
this.PageHeight = 400;
|
|
|
|
|
|
base.InitPage();
|
|
|
|
|
|
if (!IsPostBack)
|
|
{
|
|
InitControl();
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region 模板事件继承
|
|
|
|
protected override void LoadRecord()
|
|
{
|
|
if (!IsPostBack)
|
|
{
|
|
this.CurEntity.Param.Add("XLXHTHGZ_XH", PageParam.GetRTrimString("XLXHTHGZ_XH"));
|
|
}
|
|
else
|
|
{
|
|
this.CurEntity.Param.Add("XLXHTHGZ_XH", txtXH.Value.ToString().Trim());
|
|
}
|
|
|
|
base.LoadRecord();
|
|
}
|
|
|
|
protected override void OnNewRecorder()
|
|
{
|
|
|
|
base.OnNewRecorder();
|
|
|
|
txtWHR.Text = tSession.UserName;
|
|
datWHSJ.Value = CMISproConvert.ConvertTime(DateTime.Now);
|
|
txtWHRID.Value = tSession.UserId;
|
|
}
|
|
|
|
protected override void OnCopyRecorder()
|
|
{
|
|
base.OnCopyRecorder();
|
|
|
|
txtWHR.Text = tSession.UserName;
|
|
txtWHRID.Value = tSession.UserId;
|
|
datWHSJ.Value = CMISproConvert.ConvertTime(DateTime.Now);
|
|
}
|
|
|
|
protected override void SetControlState()
|
|
{
|
|
base.SetControlState();
|
|
txtXH.Enabled = false;
|
|
txtWHR.Enabled = false;
|
|
datWHSJ.Enabled = false;
|
|
}
|
|
|
|
protected override void SetComboxItems()
|
|
{
|
|
base.SetComboxItems();
|
|
}
|
|
|
|
protected override bool DataLogicValid()
|
|
{
|
|
if (txtTHQ.Text.Trim().Equals(""))
|
|
{
|
|
ShowMessage("替换前---不允许为空!");
|
|
return false;
|
|
}
|
|
if (txtTHH.Text.Trim().Equals(""))
|
|
{
|
|
ShowMessage("替换后---不允许为空!");
|
|
return false;
|
|
}
|
|
|
|
|
|
return base.DataLogicValid();
|
|
}
|
|
|
|
protected override bool Master_BeforeSaveAction(object sender, EventArgs e)
|
|
{
|
|
if ((ControlState == TControlState.ctsInsert) || (ControlState == TControlState.ctsCopy))
|
|
txtXH.Value = CMISproDataBase.GetMaxXH("DBERP", "XLXHTHGZ", "XLXHTHGZ_XH", "") + 1;
|
|
txtWHR.Text = tSession.UserName;
|
|
txtWHRID.Value = tSession.UserId;
|
|
datWHSJ.Text = CMISproConvert.ConvertTime(System.DateTime.Now);
|
|
|
|
return base.Master_BeforeSaveAction(sender, e);
|
|
}
|
|
|
|
protected override void BeforeSave(TDatabase db, ref bool ActionIsDone)
|
|
{
|
|
base.BeforeSave(db, ref ActionIsDone);
|
|
}
|
|
|
|
protected override void AfterSave(TDatabase db, ref bool ActionIsDone)
|
|
{
|
|
base.BeforeSave(db, ref ActionIsDone);
|
|
}
|
|
|
|
protected override bool Master_AfterSaveAction(object sender, EventArgs e)
|
|
{
|
|
return base.Master_AfterSaveAction(sender, e);
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
#region 控件事件
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
#region 私有函数
|
|
private void InitControl()
|
|
{
|
|
|
|
}
|
|
#endregion
|
|
}
|
|
}
|