103 lines
3.4 KiB
C#
103 lines
3.4 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_MISPRO.Utility;
|
|
using GThinking.N_PUBLIC;
|
|
|
|
namespace GThinking.N_XLXSBJ
|
|
{
|
|
[TableMap(DB = "DBERP", DbTableName = "XLDYDJB", Umid = 100860000, IsWorkFlow = false, UseWhr = false, IsAttach = false,
|
|
|
|
QuerySelSql = "",
|
|
|
|
EntitySelSql = "",
|
|
|
|
UpdateSql = "",
|
|
|
|
InsertSql = " ")]
|
|
|
|
public class MXOperDYDJ : EntityManager
|
|
{
|
|
}
|
|
|
|
public partial class XLBJD_MXOperDYDJ : SingleCardBase
|
|
{
|
|
MXOperDYDJ entity = new MXOperDYDJ();
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
this.UMID = 100860000;
|
|
this.UMName = "线缆销售报价单";
|
|
this.CurMaster = Master;
|
|
this.CurEntity = entity;
|
|
this.PageHeight = 180;
|
|
this.PageWidth = 420;
|
|
|
|
Master.EnableAttachBtn = false;
|
|
Master.EnableCancelBtn = false;
|
|
Master.EnableCopyBtn = false;
|
|
Master.EnableDeleteBtn = false;
|
|
Master.EnableEditBtn = false;
|
|
Master.EnableInsertBtn = false;
|
|
Master.EnablePrintBtn = false;
|
|
Master.EnableRefreshBtn = false;
|
|
Master.EnableSaveBtn = false;
|
|
|
|
base.InitPage();
|
|
if (!IsPostBack)
|
|
{
|
|
InitControls();
|
|
}
|
|
}
|
|
|
|
#region 自定义函数
|
|
private void InitControls()
|
|
{
|
|
TComboBox.SetComboBox("DBERP", cbxDYDJFL, "select distinct XLDYDJB_DYDJFL as ID,XLDYDJB_DYDJFL as Name from XLDYDJB where isnull(XLDYDJB_TYBZ,'N')<>'Y' order by ID", false);
|
|
|
|
TDatabase dberp = TContextDatabases.GetDatabase("DBERP");
|
|
TSQL sSQL = new TSQL(dberp);
|
|
sSQL.Clear();
|
|
sSQL.Add("select XLDYDJB_DYDJFL,XLDYDJB_XH from XLDYDJB where XLDYDJB_DYDJID=:pDYDJID");
|
|
sSQL.ParamByName("pDYDJID").Value = PageParam.GetRTrimString("DYDJID");
|
|
DataSet ds = dberp.OpenDataSet(sSQL);
|
|
txtDYDJID.Text = PageParam.GetRTrimString("DYDJID");
|
|
if (ds.Tables[0].Rows.Count > 0)
|
|
{
|
|
cbxDYDJFL.SelectedValue = ds.Tables[0].Rows[0]["XLDYDJB_DYDJFL"].ToString().Trim();
|
|
txtXH.Value = CMISproConvert.StrToFloat(ds.Tables[0].Rows[0]["XLDYDJB_XH"].ToString());
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region 控件事件
|
|
protected void btnQD_Click(object sender, EventArgs e)
|
|
{
|
|
TDatabase dberp = TContextDatabases.GetDatabase("DBERP");
|
|
TSQL sSQL = new TSQL(dberp);
|
|
sSQL.Add("update XLDYDJB set XLDYDJB_DYDJFL=:pDYDJFL,XLDYDJB_XH=:pXH where XLDYDJB_DYDJID=:pDYDJID");
|
|
sSQL.ParamByName("pDYDJFL").Value = cbxDYDJFL.SelectedValue.Trim();
|
|
sSQL.ParamByName("pXH").Value = txtXH.Value;
|
|
sSQL.ParamByName("pDYDJID").Value = PageParam.GetRTrimString("DYDJID");
|
|
dberp.ExecSQL(sSQL);
|
|
|
|
DialogOperationScript dos = new DialogOperationScript(this);
|
|
dos.ClickOwnerButton(PageParam.GetRTrimString("RefreshCtrlID"));
|
|
dos.CloseSelf();
|
|
dos.Execute();
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|