F_PC_1203.cs 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. /*******************************************************************************
  2. * Copyright(c) 2014 dongke All rights reserved. / Confidential
  3. * 类的信息:
  4. * 1.程序名称:F_PC_1203.cs
  5. * 2.功能描述:反结
  6. * 编辑履历:
  7. * 作者 日期 版本 修改内容
  8. * 陈晓野 2017/12/14 1.00 新建
  9. *******************************************************************************/
  10. using System;
  11. using System.Windows.Forms;
  12. using Dongke.IBOSS.PRD.Basics.BaseResources;
  13. using Dongke.IBOSS.PRD.Client.CommonModule;
  14. using Dongke.IBOSS.PRD.Client.Controls;
  15. using Dongke.IBOSS.PRD.WCF.DataModels;
  16. using Dongke.IBOSS.PRD.WCF.Proxys;
  17. namespace Dongke.IBOSS.PRD.Client.PCModule
  18. {
  19. /// <summary>
  20. /// 反结
  21. /// </summary>
  22. public partial class F_PC_1203 : DKFormBase
  23. {
  24. #region 成员变量
  25. private static F_PC_1203 _instance = null;
  26. #endregion
  27. #region 单例模式
  28. /// <summary>
  29. /// 单例模式,防止重复创建窗体
  30. /// </summary>
  31. public static F_PC_1203 Instance
  32. {
  33. get
  34. {
  35. if (_instance == null)
  36. {
  37. _instance = new F_PC_1203();
  38. }
  39. return _instance;
  40. }
  41. }
  42. #endregion
  43. #region 构造函数
  44. /// <summary>
  45. /// 结转
  46. /// </summary>
  47. private F_PC_1203()
  48. {
  49. InitializeComponent();
  50. this.Text = "模具库存反结转";
  51. }
  52. #endregion
  53. #region 事件处理
  54. /// <summary>
  55. ///
  56. /// </summary>
  57. /// <param name="sender"></param>
  58. /// <param name="e"></param>
  59. private void F_PC_1202_FormClosed(object sender, FormClosedEventArgs e)
  60. {
  61. _instance = null;
  62. }
  63. /// <summary>
  64. /// 关闭
  65. /// </summary>
  66. /// <param name="sender"></param>
  67. /// <param name="e"></param>
  68. private void btnCancel_Click(object sender, EventArgs e)
  69. {
  70. this.Close();
  71. }
  72. /// <summary>
  73. /// 画面加载
  74. /// </summary>
  75. /// <param name="sender"></param>
  76. /// <param name="e"></param>
  77. private void F_PC_1202_Load(object sender, EventArgs e)
  78. {
  79. try
  80. {
  81. }
  82. catch (Exception ex)
  83. {
  84. // 对异常进行共通处理
  85. ExceptionManager.HandleEventException(this.ToString(),
  86. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  87. }
  88. }
  89. /// <summary>
  90. /// 结转
  91. /// </summary>
  92. /// <param name="sender"></param>
  93. /// <param name="e"></param>
  94. private void btnSave_Click(object sender, EventArgs e)
  95. {
  96. try
  97. {
  98. // 异步处理,获取系统参数信息
  99. ClientRequestEntity cre = new ClientRequestEntity();
  100. cre.NameSpace = "FPC1201";
  101. cre.Name = "SetFPC1202Data";
  102. //cre.Properties["CarryoverMonth"] = this.dtpMonth.Value.Value;
  103. //cre.Properties["Remarks"] = this.txtRemarks.Text;
  104. ServiceResultEntity sre = (ServiceResultEntity)DoAsync(() =>
  105. {
  106. return PCModuleProxyNew.Service.HandleRequest(cre);
  107. }
  108. );
  109. if (sre.Status == Constant.ServiceResultStatus.Success)
  110. {
  111. MessageBox.Show(string.Format(Messages.MSG_CMN_I001, this.Text, "结转"),
  112. this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
  113. // 关闭窗体
  114. this.Close();
  115. }
  116. else
  117. {
  118. MessageBox.Show(string.Format(Messages.MSG_CMN_W001, this.Text, "结转"),
  119. this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
  120. }
  121. }
  122. catch (Exception ex)
  123. {
  124. // 对异常进行共通处理
  125. ExceptionManager.HandleEventException(this.ToString(),
  126. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  127. }
  128. }
  129. #endregion
  130. }
  131. }