| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- using Dongke.IBOSS.PRD.Basics.BaseResources;
- using Dongke.IBOSS.PRD.Client.CommonModule;
- using Dongke.IBOSS.PRD.Client.Controls;
- using Dongke.IBOSS.PRD.WCF.DataModels;
- using Dongke.IBOSS.PRD.WCF.Proxys;
- using System;
- using System.Reflection;
- using System.Windows.Forms;
- namespace Dongke.IBOSS.PRD.Client.PMModule
- {
- public partial class F_PM_0101_2 :DKFormBase
- {
- #region 成员变量
- //成型线ID
- string Groutingid = "";
- #endregion
- public F_PM_0101_2(string groutinglineid,string GROUTINGLINECODE, string NEWMOLDFLAG, string CONVERTPRODUCEFLAG, string CONVERTLINEGLAG)
- {
- InitializeComponent();
- Groutingid = groutinglineid;
- //金蝶代码
- this.groutinglineCode.Text = GROUTINGLINECODE;
- if (NEWMOLDFLAG == "1")
- {
- Newmold.SelectedIndex = 0;
- }
- else {
- Newmold.SelectedIndex = 1;
- }
- if (CONVERTPRODUCEFLAG == "1")
- {
- convertproduceflag.SelectedIndex = 0;
- }
- else
- {
- convertproduceflag.SelectedIndex = 1;
- }
- if (CONVERTLINEGLAG == "1")
- {
- convertLine.SelectedIndex = 0;
- }
- else
- {
- convertLine.SelectedIndex = 1;
- }
- }
- private void F_PM_0101_2_Load(object sender, EventArgs e)
- {
- this.groutinglineCode.ReadOnly = true;
- }
- private void btnSave_Click(object sender, EventArgs e)
- {
-
- try{
- ServiceResultEntity returnValue=EditData();
- if (returnValue != null && returnValue.Status == Constant.ServiceResultStatus.Success)
- {
- // 提示信息
- MessageBox.Show(string.Format(Messages.MSG_CMN_I001, this.Text, "保存"),
- this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
- this.DialogResult = DialogResult.OK;
- }
- else
- {
- // 提示信息
- MessageBox.Show("保存失败",
- this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
- }
- }
- catch (Exception ex)
- {
- // 对异常进行共通处理
- ExceptionManager.HandleEventException(this.ToString(),
- System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
- }
- this.Close();
- }
- private void btnCancel_Click(object sender, EventArgs e)
- {
- try {
-
- this.Close();
- }
- catch (Exception ex)
- {
- throw ex;
- }
- }
- private ServiceResultEntity EditData()
- {
- try
- {
- string NewMold = "0";
- string Convertprduceflag = "0";
- string ConvertLine = "0";
- if (Newmold.SelectedIndex ==0) {
- NewMold = "1";
- }
- if (convertproduceflag.SelectedIndex==0) {
- Convertprduceflag = "1";
- }
- if (convertLine.SelectedIndex==0) {
- ConvertLine = "1";
- }
- ClientRequestEntity cre = new ClientRequestEntity();
- cre.NameSpace = "F_PM_0101_1";
- cre.Name = "GroutingSpecialEtid";
- cre.Properties["GroutingLineID"] = Groutingid;
- cre.Properties["GroutingLineCode"] = this.groutinglineCode.Text.Trim();
- cre.Properties["NEWMOLDFLAG"] = NewMold;
- cre.Properties["CONVERTPRODUCEFLAG"] = Convertprduceflag;
- cre.Properties["CONVERTLINEGLAG"] = ConvertLine;
- ServiceResultEntity sre = DoAsync<ServiceResultEntity>(() =>
- {
- return PCModuleProxyNew.Service.HandleRequest(cre);
- }
- );
- return sre;
- }
- catch (Exception ex)
- {
- throw ex;
- }
- }
- }
- }
|