/******************************************************************************* * Copyright(c) 2014 DongkeSoft All rights reserved. / Confidential * 类的信息: * 1.程序名称:F_PC_0101_1_7.cs * 2.功能描述:操作时间及备注录入 * 编辑履历: * 作者 日期 版本 修改内容 * 王鑫 2015/09/25 1.00 新建 *******************************************************************************/ using System; using System.Windows.Forms; using System.Data; using Dongke.IBOSS.PRD.Basics.BaseControls; using Dongke.IBOSS.PRD.Basics.BaseResources; using Dongke.IBOSS.PRD.WCF.Proxys; using Dongke.IBOSS.PRD.Client.CommonModule; using Dongke.IBOSS.PRD.WCF.DataModels; namespace Dongke.IBOSS.PRD.Client.PCModule { public partial class F_PC_0101_1_7 : FormBase { #region 成员变量 // 窗体标题 private string _titleStr = ""; private DataTable _dtBindSource = null; private string _S_PC_001 = ""; private int _gridIndex = -1; private DataRowView _currentRow = null; #endregion #region 构造函数 /// /// /// /// /// public F_PC_0101_1_7() { InitializeComponent(); } #endregion #region 属性 public DataTable SelData { set; get; } #endregion #region 事件 /// /// 窗体加载事件 /// /// /// private void F_PC_0101_1_2_Load(object sender, EventArgs e) { try { DataTable dt = new DataTable(); dt.Columns.Add("TestMouldFlag"); dt.Columns.Add("TestMouldFlagName"); dt.Rows.Add("0", "正常"); dt.Rows.Add("1", "试验"); cmbTestMouldFlag.ValueMember = "TestMouldFlag"; cmbTestMouldFlag.DisplayMember = "TestMouldFlagName"; cmbTestMouldFlag.DataSource = dt; cmbTestMouldFlag.SelectedValue = SelData.Rows[0]["TestMouldFlag"]; } catch (Exception ex) { // 对异常进行共通处理 ExceptionManager.HandleEventException(this.ToString(), System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex); } } /// /// 保存按钮事件 /// /// /// private void btnSave_Click(object sender, EventArgs e) { try { ClientRequestEntity cre = new ClientRequestEntity(); cre.NameSpace = "F_PC_0101_1_7"; cre.Name = "SaveTestMouldFlag"; cre.Properties["TestMouldFlag"] = cmbTestMouldFlag.SelectedValue; string mouldIDs = ","; foreach (DataRow row in SelData.Rows) { mouldIDs += row["MouldID"] + ","; } cre.Properties["MouldIDs"] = mouldIDs; ServiceResultEntity sre = (ServiceResultEntity)DoAsync(() => { return PCModuleProxyNew.Service.HandleRequest(cre); }); if (sre.OtherStatus > 0) { MessageBox.Show(this.Text + "成功", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information); this.DialogResult = DialogResult.OK; } else if (sre.OtherStatus < 0 && !string.IsNullOrEmpty(sre.Message)) { MessageBox.Show(this.Text + "失败,原因:" + sre.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning); } else { MessageBox.Show(this.Text + "失败", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning); } } catch (Exception ex) { // 对异常进行共通处理 ExceptionManager.HandleEventException(this.ToString(), System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex); } } /// /// 取消按钮事件 /// /// /// private void btnCancel_Click(object sender, EventArgs e) { this.Close(); } #endregion } }