F_RPT_080111.cs 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. /*******************************************************************************
  2. * Copyright(c) 2014 DongkeSoft All rights reserved. / Confidential
  3. * 类的信息:
  4. * 1.程序名称:F_RPT_080111.cs
  5. * 2.功能描述:产品装配编辑
  6. * 编辑履历:
  7. * 作者 日期 版本 修改内容
  8. * 秦祺 2022/12/9 1.00 新建
  9. *******************************************************************************/
  10. using System;
  11. using System.Data;
  12. using System.Windows.Forms;
  13. using Dongke.IBOSS.PRD.Basics.BaseResources;
  14. using Dongke.IBOSS.PRD.Client.CommonModule;
  15. using Dongke.IBOSS.PRD.Client.Controls;
  16. using Dongke.IBOSS.PRD.WCF.DataModels;
  17. using Dongke.IBOSS.PRD.WCF.Proxys;
  18. namespace Dongke.IBOSS.PRD.Client.PMModule
  19. {
  20. /// <summary>
  21. /// 成品检验-新增、编辑
  22. /// </summary>
  23. public partial class F_RPT_080111 : DKDockPanelBase
  24. {
  25. #region 成员变量
  26. #endregion
  27. #region 构造函数
  28. /// <summary>
  29. ///
  30. /// </summary>
  31. public F_RPT_080111()
  32. {
  33. InitializeComponent();
  34. this.btnSave.Text = ButtonText.BTN_SAVE;
  35. this.btnCancel.Text = ButtonText.BTN_CLOSE;
  36. }
  37. #endregion
  38. #region 属性
  39. public DataRow DrValue
  40. {
  41. set;
  42. get;
  43. }
  44. #endregion
  45. #region 事件
  46. /// <summary>
  47. /// 窗体加载事件
  48. /// </summary>
  49. /// <param name="sender"></param>
  50. /// <param name="e"></param>
  51. private void F_PM_1203_Load(object sender, EventArgs e)
  52. {
  53. this.txtBarCode.Text = DrValue["BARCODE"] + "";
  54. this.txtIdnrk.Text = DrValue["IDNRK"] + "";
  55. this.txtIdnrkName.Text = DrValue["IDNRKNAME"] + "";
  56. this.txtMatnr.Text = DrValue["MATNR"] + "";
  57. this.txtMeins.Text = DrValue["MEINS"] + "";
  58. this.txtIdnrkOnlyCode.Text = DrValue["IDNRKONLYCODE"] + "";
  59. }
  60. /// <summary>
  61. /// 保存按钮事件
  62. /// </summary>
  63. /// <param name="sender"></param>
  64. /// <param name="e"></param>
  65. private void btnSave_Click(object sender, EventArgs e)
  66. {
  67. try
  68. {
  69. //保存
  70. ClientRequestEntity cre = new ClientRequestEntity();
  71. cre.NameSpace = "F_RPT_080111";
  72. cre.Name = "SaveIdnrkOnlyCode";
  73. cre.Properties["RelationID"] = DrValue["RELATIONID"];
  74. cre.Properties["IdnrkOnlyCode"] = this.txtIdnrkOnlyCode.Text.Trim();
  75. ServiceResultEntity sre = DoAsync(() =>
  76. {
  77. return PCModuleProxyNew.Service.HandleRequest(cre);
  78. });
  79. if (sre.OtherStatus > 0)
  80. {
  81. // 提示信息
  82. MessageBox.Show(string.Format(Messages.MSG_CMN_I001, "组件唯一编码", "保存"),
  83. this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
  84. this.DialogResult = DialogResult.OK;
  85. this.Close();
  86. }
  87. }
  88. catch (Exception ex)
  89. {
  90. // 对异常进行共通处理
  91. ExceptionManager.HandleEventException(this.ToString(),
  92. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  93. }
  94. }
  95. /// <summary>
  96. /// 关闭按钮事件
  97. /// </summary>
  98. /// <param name="sender"></param>
  99. /// <param name="e"></param>
  100. private void btnCancel_Click(object sender, EventArgs e)
  101. {
  102. this.DialogResult = DialogResult.Cancel;
  103. this.Close();
  104. }
  105. #endregion
  106. }
  107. }