| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614 |
- /*******************************************************************************
- * Copyright(c) 2014 DongkeSoft All rights reserved. / Confidential
- * 类的信息:
- * 1.程序名称:F_PC_0103.cs
- * 2.功能描述:编辑成型线信息
- * 编辑履历:
- * 作者 日期 版本 修改内容
- * 庄天威 2014/09/13 1.00 新建
- *******************************************************************************/
- using System;
- using System.Collections.Generic;
- using System.Data;
- using System.Text;
- using System.Windows.Forms;
- using Dongke.IBOSS.PRD.Basics.BaseControls;
- using Dongke.IBOSS.PRD.Basics.BaseResources;
- using Dongke.IBOSS.PRD.Client.CommonModule;
- using Dongke.IBOSS.PRD.Client.DataModels;
- using Dongke.IBOSS.PRD.WCF.DataModels;
- using Dongke.IBOSS.PRD.WCF.Proxys;
- using Dongke.IBOSS.PRD.WCF.Proxys.PCModuleService;
- namespace Dongke.IBOSS.PRD.Client.PCModule
- {
- /// <summary>
- /// 编辑成型线信息
- /// </summary>
- public partial class F_PC_0103 : FormBase
- {
- #region 成员变量
- //当前编辑成型线ID
- private int _groutingLineId;
- //当前编辑成型线实体
- private GroutingLineEntity _lineEntity = new GroutingLineEntity();
- //当前编辑成型线明细集合
- private List<GroutingLineDetailEntity> _detailList = new List<GroutingLineDetailEntity>();
- //当前编辑成型线新增明细集合
- private List<GroutingLineDetailEntity> _AddDetailList = new List<GroutingLineDetailEntity>();
- //模具总数量
- private int _mouldCount = 0;
- //修改前成型线编号
- private string _lineCode = "";
- //范围权限
- private string _purview;
- #endregion
- #region 构造函数
- /// <summary>
- /// 编辑成型线窗体构造
- /// </summary>
- public F_PC_0103(int GroutingLineId)
- {
- InitializeComponent();
- this._groutingLineId = GroutingLineId;
- this.Text = FormTitles.F_PC_0103;
- this.btnSave.Text = ButtonText.BTN_SAVE;
- this.btnCancel.Text = ButtonText.BTN_CLOSE;
- this.btnAddMould.Text = ButtonText.BTN_ADDMOULD;
- this.btnDeleteSelected.Text = ButtonText.BTN_DELETESELECTED;
- this.dkUser.IsWorker = true;
- }
- #endregion
- #region 事件
- /// <summary>
- /// 窗体加载
- /// </summary>
- private void F_PC_0103_Load(object sender, EventArgs e)
- {
- try
- {
- this.BindGrouting();
- }
- catch (Exception ex)
- {
- // 对异常进行共通处理
- ExceptionManager.HandleEventException(this.ToString(),
- System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
- }
- }
- /// <summary>
- /// 提交编辑
- /// </summary>
- private void btnSave_Click(object sender, EventArgs e)
- {
- try
- {
- int ErrorId = ValidationText();
- if (ErrorId != Constant.INT_IS_ZERO)
- {
- string errorAddress = "";
- switch (ErrorId)
- {
- case 1:
- this.txtBuildingNo.Focus();
- errorAddress = "楼号";
- break;
- case 2:
- this.txtFloorNo.Focus();
- errorAddress = "楼层";
- break;
- case 3:
- this.txtGroutingLineNo.Focus();
- errorAddress = "线号";
- break;
- case 4:
- this.txtGroutingLineCode.Focus();
- errorAddress = "成型线编码";
- break;
- case 5:
- this.txtGroutingLineName.Focus();
- errorAddress = "成型线名称";
- break;
- case 7:
- this.dkUser.Focus();
- errorAddress = "工号";
- break;
- case 8:
- this.dkType.Focus();
- errorAddress = "成型线类别";
- break;
- default:
- break;
- };
- MessageBox.Show(string.Format(Messages.MSG_CMN_W005, errorAddress),
- this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1);
- return;
- }
- this._lineEntity.BUILDINGNO = this.txtBuildingNo.Text.Trim();
- this._lineEntity.FLOORNO = this.txtFloorNo.Text.Trim();
- this._lineEntity.GROUTINGLINENO = this.txtGroutingLineNo.Text.Trim();
- this._lineEntity.GROUTINGLINECODE = this.txtGroutingLineCode.Text.Trim();
- this._lineEntity.GROUTINGLINENAME = this.txtGroutingLineName.Text.Trim();
- this._lineEntity.REMARKS = this.txtRemarks.Text.Trim();
- this._lineEntity.USERID = this.dkUser.UserID;
- this._lineEntity.MOULDTYPEID = this.dkType.MouldTypeID;
- this._lineEntity.CANMANYTIMES = this.dkType.IsCanManyTimes;
- this._lineEntity.MOULDQUANTITY = _detailList.Count + _AddDetailList.Count;
- if (this.cbValueFlag.Checked == false)
- {
- this._lineEntity.VALUEFLAG = Convert.ToInt32(Constant.ValueFlag.Invalid);
- }
- else
- {
- this._lineEntity.VALUEFLAG = Convert.ToInt32(Constant.ValueFlag.Effective);
- }
- if (this._lineCode != this._lineEntity.GROUTINGLINECODE)
- {
- bool isHaveGroutingLineCode = (bool)DoAsync(new BaseAsyncMethod(() =>
- {
- return PCModuleProxy.Service.GroutingLineCodeIsRepeat(this.txtGroutingLineCode.Text);
- }));
- if (isHaveGroutingLineCode == false)
- {
- MessageBox.Show(string.Format(Messages.MSG_CMN_W005, "成型线编码"),
- this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
- return;
- }
- }
- int myReturn = (int)DoAsync(new BaseAsyncMethod(() =>
- {
- return PCModuleProxy.Service.UpdateGroutingLine(_lineEntity, _AddDetailList);
- }));
- if (myReturn > Constant.INT_IS_ZERO)
- {
- MessageBox.Show(string.Format(Messages.MSG_CMN_I001, "成型线信息", "保存"),
- this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
- this.DialogResult = DialogResult.OK;
- return;
- }
- else if (myReturn == -500)
- {
- MessageBox.Show(Messages.MSG_CMN_W012, this.Text,
- MessageBoxButtons.OK, MessageBoxIcon.Warning);
- this.Close();
- }
- else
- {
- MessageBox.Show(string.Format(Messages.MSG_CMN_W001, "成型线信息", "保存"),
- this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
- }
- }
- catch (Exception ex)
- {
- // 对异常进行共通处理
- ExceptionManager.HandleEventException(this.ToString(),
- System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
- }
- }
- /// <summary>
- /// 关闭窗体
- /// </summary>
- private void btnCancel_Click(object sender, EventArgs e)
- {
- this.Close();
- }
- /// <summary>
- /// 删除新建明细信息
- /// </summary>
- private void btnDeleteSelected_Click(object sender, EventArgs e)
- {
- try
- {
- DataGridViewRow currentRow = this.dgvDetail.CurrentRow;
- if (currentRow == null || currentRow.Index < Constant.INT_IS_ZERO)
- {
- return;
- }
- int DeleteIndex = currentRow.Index - _detailList.Count;
- if (DeleteIndex >= Constant.INT_IS_ZERO)
- {
- this._AddDetailList.RemoveAt(DeleteIndex);
- }
- else
- {
- MessageBox.Show(Messages.MSG_PC_W002, this.Text,
- MessageBoxButtons.OK, MessageBoxIcon.Warning);
- return;
- }
- this.dgvDetail.DataSource = this.ListToTable();
- }
- catch (Exception ex)
- {
- // 对异常进行共通处理
- ExceptionManager.HandleEventException(this.ToString(),
- System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
- }
- }
- /// <summary>
- /// 新建明细信息
- /// </summary>
- private void btnAddMould_Click(object sender, EventArgs e)
- {
- try
- {
- if (this.txtGroutingLineCode.Text == string.Empty)
- {
- MessageBox.Show(string.Format(Messages.MSG_CMN_W005, "成型线编码"), this.Text,
- MessageBoxButtons.OK, MessageBoxIcon.Warning);
- return;
- }
- if (this.txtCount.Text == "")
- {
- MessageBox.Show(string.Format(Messages.MSG_CMN_W005, "模具数量"), this.Text,
- MessageBoxButtons.OK, MessageBoxIcon.Warning);
- return;
- }
- if (this.dkGoods.GoodsID == null)
- {
- MessageBox.Show(string.Format(Messages.MSG_CMN_W005, "模具产品"), this.Text,
- MessageBoxButtons.OK, MessageBoxIcon.Warning);
- return;
- }
- if (this._mouldCount == 999)
- {
- MessageBox.Show("成型线模具数量不可超过999个!", this.Text,
- MessageBoxButtons.OK, MessageBoxIcon.Warning);
- return;
- }
- for (int i = 0; i < Convert.ToInt32(this.txtCount.Text); i++)
- {
- int GroutingMouldCodeNum = i + _mouldCount;
- GroutingLineDetailEntity detailInfo = new GroutingLineDetailEntity();
- detailInfo.GROUTINGMOULDCODE = this.txtGroutingLineCode.Text + "-" + (GroutingMouldCodeNum + 1).ToString().PadLeft(3, '0');
- detailInfo.MOULDCODE = Guid.NewGuid().ToString();
- detailInfo.GOODSID = Convert.ToInt32(this.dkGoods.GoodsID);
- detailInfo.GOODSNAME = this.dkGoods.GoodsName;
- detailInfo.GOODSCODE = this.dkGoods.GoodsCode;
- detailInfo.GoodsSpecification = this.dkGoods.GoodsSpecification;
- detailInfo.GROUTINGCOUNT = Constant.INT_IS_ZERO;
- detailInfo.MOULDSTATUS = Convert.ToInt32(Constant.GMouldStatus.Normal);
- detailInfo.REMARKS = "-";
- this._AddDetailList.Add(detailInfo);
- }
- this._mouldCount += Convert.ToInt32(this.txtCount.Text);
- this.dgvDetail.AutoGenerateColumns = false;
- this.dgvDetail.DataSource = ListToTable();
- }
- catch (Exception ex)
- {
- // 对异常进行共通处理
- ExceptionManager.HandleEventException(this.ToString(),
- System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
- }
- }
- /// <summary>
- /// 编号更改
- /// </summary>
- private void txtBuildingNo_TextChanged(object sender, EventArgs e)
- {
- this.txtGroutingLineCode.Text = this.txtBuildingNo.Text + this.txtFloorNo.Text
- + this.txtGroutingLineNo.Text;
- }
- /// <summary>
- /// 编号更改
- /// </summary>
- private void txtFloorNo_TextChanged(object sender, EventArgs e)
- {
- this.txtGroutingLineCode.Text = this.txtBuildingNo.Text + this.txtFloorNo.Text
- + this.txtGroutingLineNo.Text;
- }
- /// <summary>
- /// 编号更改
- /// </summary>
- private void txtGroutingLineNo_TextChanged(object sender, EventArgs e)
- {
- this.txtGroutingLineCode.Text = this.txtBuildingNo.Text + this.txtFloorNo.Text
- + this.txtGroutingLineNo.Text;
- }
- #endregion
- #region 私有方法
- /// <summary>
- /// 加载成型线数据
- /// </summary>
- private void BindGrouting()
- {
- try
- {
- //首先绑定成型线基础信息
- GroutingLineEntity ginfo = new GroutingLineEntity();
- ginfo.GROUTINGLINEID = _groutingLineId;
- DataSet dsGroutingLine = (DataSet)DoAsync(new BaseAsyncMethod(() =>
- {
- return PCModuleProxy.Service.GetGroutingLine(ginfo);
- }));
- if (dsGroutingLine.Tables[0].Rows.Count != Constant.INT_IS_ZERO)
- {
- //给实体绑定值
- BindGroutingEntity(dsGroutingLine.Tables[0].Rows[0]);
- //将实体值绑定给界面控件
- this.txtBuildingNo.Text = _lineEntity.BUILDINGNO;
- this.txtFloorNo.Text = _lineEntity.FLOORNO;
- this.txtGroutingLineNo.Text = _lineEntity.GROUTINGLINENO;
- this.txtGroutingLineCode.Text = _lineEntity.GROUTINGLINECODE;
- this.txtGroutingLineName.Text = _lineEntity.GROUTINGLINENAME;
- this.txtRemarks.Text = _lineEntity.REMARKS;
- this.dkUser.UserID = _lineEntity.USERID;
- this.dkUser.UserName = dsGroutingLine.Tables[0].Rows[0]["UserName"].ToString();
- this.dkUser.UserCode = dsGroutingLine.Tables[0].Rows[0]["UserCode"].ToString();
- this.dkUser.Text = dsGroutingLine.Tables[0].Rows[0]["UserCode"].ToString();
- this.dkType.MouldTypeID = _lineEntity.MOULDTYPEID;
- this.dkType.MouldTypeName = dsGroutingLine.Tables[0].Rows[0]["GMouldTypeName"].ToString();
- this.dkType.Text = dsGroutingLine.Tables[0].Rows[0]["GMouldTypeName"].ToString();
- if (this._lineEntity.VALUEFLAG == Convert.ToInt32(Constant.ValueFlag.Effective))
- {
- this.cbValueFlag.Checked = true;
- }
- this._lineCode = _lineEntity.GROUTINGLINECODE;
- }
- //然后绑定该成型线所属的明细信息
- BindDetailInfo(_groutingLineId);
- }
- catch (Exception ex)
- {
- throw ex;
- }
- }
- /// <summary>
- /// 将DataRow转换为实体
- /// </summary>
- private void BindGroutingEntity(DataRow drGrouting)
- {
- try
- {
- this._lineEntity.GROUTINGLINEID = Convert.ToInt32(drGrouting["GROUTINGLINEID"]);
- this._lineEntity.BUILDINGNO = drGrouting["BUILDINGNO"].ToString();
- this._lineEntity.FLOORNO = drGrouting["FLOORNO"].ToString();
- this._lineEntity.GROUTINGLINENO = drGrouting["GROUTINGLINENO"].ToString();
- this._lineEntity.GROUTINGLINECODE = drGrouting["GROUTINGLINECODE"].ToString();
- this._lineEntity.GROUTINGLINENAME = drGrouting["GROUTINGLINENAME"].ToString();
- this._lineEntity.MOULDQUANTITY = Convert.ToDecimal(drGrouting["MOULDQUANTITY"]);
- this._lineEntity.MOULDTYPEID = Convert.ToInt32(drGrouting["GMOULDTYPEID"]);
- this._lineEntity.USERID = Convert.ToInt32(drGrouting["USERID"]);
- this._lineEntity.BEGINUSEDDATE = Convert.ToDateTime(drGrouting["BEGINUSEDDATE"]);
- if (drGrouting["ENDUSEDDATE"].ToString() != string.Empty && drGrouting["ENDUSEDDATE"] != DBNull.Value)
- {
- this._lineEntity.ENDUSEDDATE = Convert.ToDateTime(drGrouting["ENDUSEDDATE"]);
- }
- this._lineEntity.MouldStatus = Convert.ToInt32(drGrouting["GMouldStatus"]);
- if (drGrouting["REMARKS"].ToString() != string.Empty && drGrouting["REMARKS"] != DBNull.Value)
- {
- this._lineEntity.REMARKS = drGrouting["REMARKS"].ToString();
- }
- this._lineEntity.ACCOUNTID = Convert.ToInt32(drGrouting["ACCOUNTID"]);
- this._lineEntity.VALUEFLAG = Convert.ToInt32(drGrouting["VALUEFLAG"]);
- this._lineEntity.CREATETIME = Convert.ToDateTime(drGrouting["CREATETIME"]);
- this._lineEntity.CREATEUSERID = Convert.ToInt32(drGrouting["CREATEUSERID"]);
- this._lineEntity.UPDATETIME = Convert.ToDateTime(drGrouting["UPDATETIME"]);
- this._lineEntity.UPDATEUSERID = Convert.ToInt32(drGrouting["UPDATEUSERID"]);
- this._lineEntity.OPTIMESTAMP = Convert.ToDateTime(drGrouting["OPTIMESTAMP"]);
- }
- catch (Exception ex)
- {
- throw ex;
- }
- }
- /// <summary>
- /// 根据成型线ID绑定该成型线所属成型线模具信息
- /// </summary>
- private void BindDetailInfo(int GroutingLineID)
- {
- try
- {
- this.dgvDetail.AutoGenerateColumns = false;
- DataSet dsDetail = (DataSet)DoAsync(new BaseAsyncMethod(() =>
- {
- return PCModuleProxy.Service.GetGroutingLineDetailByMainId(GroutingLineID, null, 0);
- }));
- this.DataTableToListByDetail(dsDetail);
- }
- catch (Exception ex)
- {
- throw ex;
- }
- }
- /// <summary>
- /// 将成型线明细DataSet数据集转换为实体集合
- /// </summary>
- private void DataTableToListByDetail(DataSet dsDetail)
- {
- try
- {
- this._detailList.Clear();
- foreach (DataRow drFor in dsDetail.Tables[0].Rows)
- {
- GroutingLineDetailEntity detailEntity = new GroutingLineDetailEntity();
- detailEntity.GROUTINGLINEDETAILID = Convert.ToInt32(drFor["GROUTINGLINEDETAILID"]);
- detailEntity.GROUTINGLINEID = Convert.ToInt32(drFor["GROUTINGLINEID"]);
- detailEntity.GROUTINGMOULDCODE = drFor["GROUTINGMOULDCODE"].ToString();
- detailEntity.MOULDCODE = drFor["MOULDCODE"].ToString();
- detailEntity.GOODSID = Convert.ToInt32(drFor["GOODSID"]);
- detailEntity.GROUTINGCOUNT = Convert.ToDecimal(drFor["GROUTINGCOUNT"]);
- detailEntity.MOULDSTATUS = Convert.ToInt32(drFor["GMOULDSTATUS"]);
- detailEntity.BEGINUSEDDATE = Convert.ToDateTime(drFor["BEGINUSEDDATE"]);
- detailEntity.REMARKS = drFor["REMARKS"].ToString();
- detailEntity.ACCOUNTID = Convert.ToInt32(drFor["ACCOUNTID"]);
- detailEntity.VALUEFLAG = Convert.ToInt32(drFor["VALUEFLAG"]);
- detailEntity.CREATETIME = Convert.ToDateTime(drFor["CREATETIME"]);
- detailEntity.CREATEUSERID = Convert.ToInt32(drFor["CREATEUSERID"]);
- detailEntity.UPDATETIME = Convert.ToDateTime(drFor["UPDATETIME"]);
- detailEntity.UPDATEUSERID = Convert.ToInt32(drFor["UPDATEUSERID"]);
- detailEntity.OPTIMESTAMP = Convert.ToDateTime(drFor["OPTIMESTAMP"]);
- detailEntity.GOODSNAME = drFor["GOODSNAME"].ToString();
- detailEntity.GROUTINGLINENAME = drFor["GMOULDSTATUSNAME"].ToString();
- detailEntity.GOODSCODE = drFor["GOODSCODE"].ToString();
- detailEntity.GoodsSpecification = drFor["GoodsSpecification"].ToString();
- this._detailList.Add(detailEntity);
- }
- //获取最后一个模具编号的最后数字
- int lineIndexOf = _detailList[_detailList.Count - 1].GROUTINGMOULDCODE.LastIndexOf("-") + 1;
- this._mouldCount = Convert.ToInt32(_detailList[_detailList.Count - 1].GROUTINGMOULDCODE.Substring(lineIndexOf));
- this.dgvDetail.AutoGenerateColumns = false;
- this.dgvDetail.DataSource = ListToTable();
- }
- catch (Exception ex)
- {
- throw ex;
- }
- }
- /// <summary>
- /// 验证添加项
- /// </summary>
- private int ValidationText()
- {
- try
- {
- int ErrorId = 0;
- string txtBuildingNo = this.txtBuildingNo.Text.Trim();
- string txtFloorNo = this.txtFloorNo.Text.Trim();
- string txtGroutingLineNo = this.txtGroutingLineNo.Text.Trim();
- string txtGroutingLineCode = this.txtGroutingLineCode.Text.Trim();
- string txtGroutingLineName = this.txtGroutingLineName.Text.Trim();
- string txtRemarks = this.txtRemarks.Text.Trim();
- if (txtBuildingNo == string.Empty)
- {
- ErrorId = 1;
- return ErrorId;
- }
- if (txtFloorNo == string.Empty)
- {
- ErrorId = 2;
- return ErrorId;
- }
- if (txtGroutingLineNo == string.Empty)
- {
- ErrorId = 3;
- return ErrorId;
- }
- if (txtGroutingLineCode == string.Empty)
- {
- ErrorId = 4;
- return ErrorId;
- }
- if (txtGroutingLineName == string.Empty)
- {
- ErrorId = 5;
- return ErrorId;
- }
- if (dkUser.UserID == null)
- {
- ErrorId = 7;
- return ErrorId;
- }
- if (dkType.MouldTypeID == null)
- {
- ErrorId = 8;
- return ErrorId;
- }
- return ErrorId;
- }
- catch (Exception ex)
- {
- throw ex;
- }
- }
- /// <summary>
- /// 将实体数据转换为DataTable,绑定到控件中
- /// </summary>
- private DataTable ListToTable()
- {
- try
- {
- DataTable dtDataSourse = new DataTable();
- dtDataSourse.Columns.Add("GROUTINGMOULDCODE", System.Type.GetType("System.String"));
- dtDataSourse.Columns.Add("GOODSID", System.Type.GetType("System.String"));
- dtDataSourse.Columns.Add("GOODSNAME", System.Type.GetType("System.String"));
- dtDataSourse.Columns.Add("GoodsCode", System.Type.GetType("System.String"));
- dtDataSourse.Columns.Add("GoodsSpecification", System.Type.GetType("System.String"));
- dtDataSourse.Columns.Add("REMARKS", System.Type.GetType("System.String"));
- dtDataSourse.Columns.Add("MOULDSTATUS", System.Type.GetType("System.String"));
- for (int i = 0; i < this._detailList.Count; i++)
- {
- DataRow drRow = dtDataSourse.NewRow();
- drRow["GROUTINGMOULDCODE"] = this._detailList[i].GROUTINGMOULDCODE;
- drRow["GOODSID"] = this._detailList[i].GOODSID;
- drRow["GOODSNAME"] = this._detailList[i].GOODSNAME;
- drRow["GoodsCode"] = this._detailList[i].GOODSCODE;
- drRow["GoodsSpecification"] = this._detailList[i].GoodsSpecification;
- drRow["REMARKS"] = this._detailList[i].REMARKS;
- drRow["MOULDSTATUS"] = this._detailList[i].GROUTINGLINENAME;
- dtDataSourse.Rows.Add(drRow);
- }
- for (int i = 0; i < this._AddDetailList.Count; i++)
- {
- DataRow dr = dtDataSourse.NewRow();
- dr["GROUTINGMOULDCODE"] = _AddDetailList[i].GROUTINGMOULDCODE;
- dr["GOODSID"] = this._AddDetailList[i].GOODSID;
- dr["GOODSNAME"] = this._AddDetailList[i].GOODSNAME;
- dr["GoodsCode"] = this._AddDetailList[i].GOODSCODE;
- dr["GoodsSpecification"] = this._AddDetailList[i].GoodsSpecification;
- dr["REMARKS"] = this._AddDetailList[i].REMARKS;
- dr["MOULDSTATUS"] = "新建";
- dtDataSourse.Rows.Add(dr);
- }
- return dtDataSourse;
- }
- catch (Exception ex)
- {
- throw ex;
- }
- }
- /// <summary>
- /// 获取权限
- /// </summary>
- protected void getPurview()
- {
- try
- {
- StringBuilder sbPurview = new StringBuilder();
- DataSet dsPurview = SystemModuleProxy.Service.GetUserPurview(6, LogInUserInfo.CurrentUser.UserID);
- if (dsPurview != null)
- {
- foreach (DataRow dr in dsPurview.Tables[0].Rows)
- {
- sbPurview.Append(dr[0].ToString() + ",");
- }
- if (sbPurview.Length != 0)
- {
- this._purview = sbPurview.ToString().Substring(0, sbPurview.Length - 1);
- }
- }
- }
- catch (Exception ex)
- {
- throw ex;
- }
- }
- #endregion
- }
- }
|