F_PM_0101_1.cs 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. /*******************************************************************************
  2. * Copyright(c) 2014 DongkeSoft All rights reserved. / Confidential
  3. * 类的信息:
  4. * 1.程序名称:F_PM_0101_1.cs
  5. * 2.功能描述:成型特殊记录
  6. * 编辑履历:
  7. * 作者 日期 版本 修改内容
  8. * 冯林勇 2023/06/14 1.00 新建
  9. *******************************************************************************/
  10. using Dongke.IBOSS.PRD.Basics.BaseResources;
  11. using Dongke.IBOSS.PRD.Client.CommonModule;
  12. using Dongke.IBOSS.PRD.Client.Controls;
  13. using Dongke.IBOSS.PRD.WCF.DataModels;
  14. using Dongke.IBOSS.PRD.WCF.Proxys;
  15. using System;
  16. using System.Reflection;
  17. using System.Windows.Forms;
  18. namespace Dongke.IBOSS.PRD.Client.PMModule
  19. {
  20. /// <summary>
  21. /// 成型特殊记录
  22. /// </summary>
  23. public partial class F_PM_0101_1 : DKFormBase
  24. {
  25. #region 成员变量
  26. #endregion
  27. #region 构造函数
  28. /// <summary>
  29. /// 构造函数
  30. /// </summary>
  31. public F_PM_0101_1()
  32. {
  33. this.InitializeComponent();
  34. this.InitializeControls();
  35. }
  36. #endregion
  37. #region 属性
  38. #endregion
  39. #region 事件
  40. /// <summary>
  41. /// 窗体加载
  42. /// </summary>
  43. private void F_PM_0101_1_Load(object sender, EventArgs e)
  44. {
  45. try
  46. {
  47. }
  48. catch (Exception ex)
  49. {
  50. // 对异常进行共通处理
  51. ExceptionManager.HandleEventException(this.ToString(),
  52. MethodBase.GetCurrentMethod().Name, this.Text, ex);
  53. }
  54. }
  55. /// <summary>
  56. /// 页面关闭
  57. /// </summary>
  58. /// <param name="sender"></param>
  59. /// <param name="e"></param>
  60. private void tsbtnClose_Click(object sender, EventArgs e)
  61. {
  62. this.Close();
  63. }
  64. /// <summary>
  65. /// 关闭窗体
  66. /// </summary>
  67. private void btnCancel_Click(object sender, EventArgs e)
  68. {
  69. this.Close();
  70. }
  71. /// <summary>
  72. /// 查询
  73. /// </summary>
  74. /// <param name="sender"></param>
  75. /// <param name="e"></param>
  76. private void btnSearch_Click(object sender, EventArgs e)
  77. {
  78. try
  79. {
  80. this.QueryDataFromOther();
  81. this.dgvDetail.IsSetInputColumnsColor = true;
  82. }
  83. catch (Exception ex)
  84. {
  85. // 对异常进行共通处理
  86. ExceptionManager.HandleEventException(this.ToString(),
  87. MethodBase.GetCurrentMethod().Name, this.Text, ex);
  88. }
  89. }
  90. /// <summary>
  91. /// 编辑
  92. /// </summary>
  93. /// <param name="sender"></param>
  94. /// <param name="e"></param>
  95. private void toolStripButton2_Click(object sender, EventArgs e)
  96. {
  97. try
  98. {
  99. if (this.dgvDetail.SelectedRows.Count != 0)
  100. { string groutinglineId= this.dgvDetail.SelectedRows[0].Cells["成型线ID"].Value.ToString();
  101. string GROUTINGLINECODE = this.dgvDetail.SelectedRows[0].Cells["成型线编码"].Value.ToString();
  102. string NEWMOLDFLAG = this.dgvDetail.SelectedRows[0].Cells["新模"].Value.ToString();
  103. string CONVERTPRODUCEFLAG = this.dgvDetail.SelectedRows[0].Cells["转产"].Value.ToString();
  104. string CONVERTLINEGLAG = this.dgvDetail.SelectedRows[0].Cells["转线"].Value.ToString();
  105. F_PM_0101_2 fpm01012 = new F_PM_0101_2(groutinglineId,GROUTINGLINECODE, NEWMOLDFLAG, CONVERTPRODUCEFLAG, CONVERTLINEGLAG);
  106. DialogResult dialogresult = fpm01012.ShowDialog();
  107. btnSearch_Click(sender, null);
  108. }
  109. }
  110. catch (Exception ex)
  111. {
  112. // 对异常进行共通处理
  113. ExceptionManager.HandleEventException(this.ToString(),
  114. MethodBase.GetCurrentMethod().Name, this.Text, ex);
  115. }
  116. }
  117. /// <summary>
  118. /// 清空条件
  119. /// </summary>
  120. /// <param name="sender"></param>
  121. /// <param name="e"></param>
  122. private void btnClearCondition_Click(object sender, EventArgs e)
  123. {
  124. try
  125. {
  126. //新模标识
  127. this.NEWMOLDFLAG.Checked = false;
  128. //转产标识
  129. this.CONVERTPRODUCEFLAG.Checked = false;
  130. //转线标识
  131. this.CONVERTLINEGLAG.Checked = false;
  132. //成型线编码
  133. this.scbGroutingLine.ClearValue();
  134. }
  135. catch (Exception ex)
  136. {
  137. // 对异常进行共通处理
  138. ExceptionManager.HandleEventException(this.ToString(),
  139. MethodBase.GetCurrentMethod().Name, this.Text, ex);
  140. }
  141. }
  142. /// <summary>
  143. /// 自适应列宽
  144. /// </summary>
  145. /// <param name="sender"></param>
  146. /// <param name="e"></param>
  147. private void toolStripButton1_Click(object sender, EventArgs e)
  148. {
  149. try
  150. {
  151. this.dgvDetail.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells);
  152. }
  153. catch (Exception ex)
  154. {
  155. // 对异常进行共通处理
  156. ExceptionManager.HandleEventException(this.ToString(),
  157. MethodBase.GetCurrentMethod().Name, this.Text, ex);
  158. }
  159. }
  160. #endregion
  161. #region 私有方法
  162. /// <summary>
  163. /// 初始化控件
  164. /// </summary>
  165. private void InitializeControls()
  166. {
  167. }
  168. private void QueryDataFromOther()
  169. {
  170. try
  171. {
  172. string NEWMOLDFLAGS = "0";
  173. string CONVERTPRODUCEFLAGS = "0";
  174. string CONVERTLINEGLAGS = "0";
  175. ClientRequestEntity cre = new ClientRequestEntity();
  176. cre.NameSpace = "F_PM_0101_1";
  177. cre.Name = "GROUTINGSPECIAL";
  178. cre.Properties["GroutingLineCode"] = this.scbGroutingLine.Text.Trim();
  179. if (CONVERTLINEGLAG.Checked == true) {
  180. CONVERTLINEGLAGS="1";
  181. }
  182. if (CONVERTPRODUCEFLAG.Checked == true)
  183. {
  184. CONVERTPRODUCEFLAGS = "1";
  185. }
  186. if (NEWMOLDFLAG.Checked == true)
  187. {
  188. NEWMOLDFLAGS = "1";
  189. }
  190. cre.Properties["NEWMOLDFLAG"] = NEWMOLDFLAGS;
  191. cre.Properties["CONVERTPRODUCEFLAG"] = CONVERTPRODUCEFLAGS;
  192. cre.Properties["CONVERTLINEGLAG"] = CONVERTLINEGLAGS;
  193. ServiceResultEntity sre = DoAsync<ServiceResultEntity>(() =>
  194. {
  195. return PCModuleProxyNew.Service.HandleRequest(cre);
  196. }
  197. );
  198. if (sre.Status == Constant.ServiceResultStatus.Success)
  199. {
  200. // 查询成功
  201. this.dgvDetail.DataSource = sre.Data.Tables[0];
  202. }
  203. }
  204. catch (Exception ex)
  205. {
  206. throw ex;
  207. }
  208. }
  209. #endregion
  210. }
  211. }