F_PC_0104.cs 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597
  1. /*******************************************************************************
  2. * Copyright(c) 2014 DongkeSoft All rights reserved. / Confidential
  3. * 类的信息:
  4. * 1.程序名称:F_PC_0104.cs
  5. * 2.功能描述:成型线管理
  6. * 编辑履历:
  7. * 作者 日期 版本 修改内容
  8. * 庄天威 2014/09/28 1.00 新建
  9. *******************************************************************************/
  10. using System;
  11. using System.Collections.Generic;
  12. using System.Data;
  13. using System.Windows.Forms;
  14. using Dongke.IBOSS.PRD.Basics.BaseResources;
  15. using Dongke.IBOSS.PRD.Basics.DockPanel;
  16. using Dongke.IBOSS.PRD.Client.CommonModule;
  17. using Dongke.IBOSS.PRD.WCF.DataModels;
  18. using Dongke.IBOSS.PRD.WCF.Proxys;
  19. using Dongke.IBOSS.PRD.WCF.Proxys.PCModuleService;
  20. namespace Dongke.IBOSS.PRD.Client.PCModule
  21. {
  22. /// <summary>
  23. /// 成型线管理
  24. /// </summary>
  25. public partial class F_PC_0104 : DockPanelBase
  26. {
  27. #region 成员变量
  28. // 单例模式使用
  29. private static F_PC_0104 _instance;
  30. // 成型线集合
  31. private List<GroutingLineEntity> _groutingLineList = new List<GroutingLineEntity>();
  32. //选择的成型线状态
  33. private int? _mouldStatus;
  34. #endregion
  35. #region 构造函数
  36. /// <summary>
  37. /// 构造函数
  38. /// </summary>
  39. public F_PC_0104()
  40. {
  41. InitializeComponent();
  42. // 为控件名赋值
  43. this.btnSearch.Text = ButtonText.BTN_SEARCH;
  44. this.btnClearCondition.Text = ButtonText.BTN_CLEARCONDITION;
  45. this.tsbtnAdd.Text = ButtonText.TSBTN_ADD;
  46. this.tsbtnEdit.Text = ButtonText.TSBTN_EDIT;
  47. this.tsbtnClose.Text = ButtonText.TSBTN_CLOSE;
  48. this.tsbtnAdaptive.Text = ButtonText.TSBTN_ADAPTIVE;
  49. this.tsbtnQueryRecord.Text = ButtonText.TSBTN_QUERYRECORD;
  50. this.gbxCondition.Text = Constant.LABEL_QUERY_CONDITIONS;
  51. this.Text = FormTitles.F_PC_0104;
  52. }
  53. #endregion
  54. #region 单例模式
  55. /// <summary>
  56. /// 单例模式,防止重复创建窗体
  57. /// </summary>
  58. public static F_PC_0104 Instance
  59. {
  60. get
  61. {
  62. if (_instance == null)
  63. {
  64. _instance = new F_PC_0104();
  65. }
  66. return _instance;
  67. }
  68. }
  69. #endregion
  70. #region 事件处理
  71. /// <summary>
  72. /// 页面加载事件
  73. /// </summary>
  74. /// <param name="sender"></param>
  75. /// <param name="e"></param>
  76. private void F_PC_0104_Load(object sender, System.EventArgs e)
  77. {
  78. try
  79. {
  80. // 加载权限
  81. FormPermissionManager.FormPermissionControl(this.Name, this,
  82. Dongke.IBOSS.PRD.Client.DataModels.LogInUserInfo.CurrentUser.CurrentUserEntity.UserRightData,
  83. Dongke.IBOSS.PRD.Client.DataModels.LogInUserInfo.CurrentUser.CurrentUserEntity.FunctionData);
  84. // 为成型线绑定数据源
  85. this.BindMouldType();
  86. // 设置日期控件不可用
  87. this.SetBeginTimePickerEnable(false);
  88. this.SetEndTimePickerEnable(false);
  89. this.chkValueFlag.AllItemCheck();
  90. }
  91. catch (Exception ex)
  92. {
  93. // 对异常进行共通处理
  94. ExceptionManager.HandleEventException(this.ToString(),
  95. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  96. }
  97. }
  98. /// <summary>
  99. /// 自动列宽按钮按下处理
  100. /// </summary>
  101. /// <param name="sender"></param>
  102. /// <param name="e"></param>
  103. private void tsbtnAdaptive_Click(object sender, EventArgs e)
  104. {
  105. this.dgvGroutingLine.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells);
  106. this.dgvGroutingLineDetail.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells);
  107. }
  108. /// <summary>
  109. /// 开始日期条件选中状态改变处理事件
  110. /// </summary>
  111. /// <param name="sender"></param>
  112. /// <param name="e"></param>
  113. private void cbStartTime_CheckedChanged(object sender, EventArgs e)
  114. {
  115. this.SetBeginTimePickerEnable(this.cbStartTime.Checked);
  116. }
  117. /// <summary>
  118. /// 结束日期条件选中状态改变处理事件
  119. /// </summary>
  120. /// <param name="sender"></param>
  121. /// <param name="e"></param>
  122. private void cbEndTime_CheckedChanged(object sender, EventArgs e)
  123. {
  124. this.SetEndTimePickerEnable(this.cbEndTime.Checked);
  125. }
  126. /// <summary>
  127. /// 查询按钮按下处理
  128. /// </summary>
  129. /// <param name="sender"></param>
  130. /// <param name="e"></param>
  131. private void btnSearch_Click(object sender, EventArgs e)
  132. {
  133. try
  134. {
  135. this.dgvGroutingLine.DataSource = null;
  136. this.dgvGroutingLineDetail.DataSource = null;
  137. this._mouldStatus = this.lstcbxGMouldStatus.SelectedValue == null
  138. ? null : (int?)Convert.ToInt32(this.lstcbxGMouldStatus.SelectedValue);
  139. DataSet dsGroutingLine = (DataSet)DoAsync(new Dongke.IBOSS.PRD.Basics.DockPanel.AsyncMethod(() =>
  140. {
  141. return GetGroutingLine();
  142. }));
  143. if (dsGroutingLine != null)
  144. {
  145. this.DataTableToListByLine(dsGroutingLine);
  146. if (dsGroutingLine.Tables.Count != Constant.INT_IS_ZERO)
  147. {
  148. this.dgvGroutingLine.DataSource = ((DataSet)dsGroutingLine).Tables[0];
  149. this.dgvGroutingLine.ReadOnly = true;
  150. if (this.dgvGroutingLine.Rows.Count == Constant.INT_IS_ZERO)
  151. {
  152. // 提示未查找到数据
  153. MessageBox.Show(Messages.MSG_CMN_I002, this.Text,
  154. MessageBoxButtons.OK, MessageBoxIcon.Information);
  155. }
  156. }
  157. this.dgvGroutingLineDetail.DataSource = null;
  158. }
  159. else
  160. {
  161. // 提示未查找到数据
  162. MessageBox.Show(Messages.MSG_CMN_I002, this.Text,
  163. MessageBoxButtons.OK, MessageBoxIcon.Warning);
  164. }
  165. }
  166. catch (Exception ex)
  167. {
  168. // 对异常进行共通处理
  169. ExceptionManager.HandleEventException(this.ToString(),
  170. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  171. }
  172. }
  173. /// <summary>
  174. /// 清空查询条件处理
  175. /// </summary>
  176. /// <param name="sender"></param>
  177. /// <param name="e"></param>
  178. private void btnClearCondition_Click(object sender, EventArgs e)
  179. {
  180. this.txtBuildingNo.Text = "";
  181. this.txtFloorNo.Text = "";
  182. this.txtGroutingLineNo.Text = "";
  183. this.lstcbxGMouldStatus.Text = "";
  184. this.lstcbxGMouldStatus.SelectedValue = "";
  185. this.txtGroutingLineCode.Text = "";
  186. this.txtGroutingLineName.Text = "";
  187. this.cbStartTime.Checked = false;
  188. this.cbEndTime.Checked = false;
  189. this.txtBeginUsedDateStart.Enabled = false;
  190. this.txtBeginUsedDateEnd.Enabled = false;
  191. this.txtEndUsedDateStart.Enabled = false;
  192. this.txtEndUsedDateEnd.Enabled = false;
  193. this.txtRemarks.Text = "";
  194. this.txtGroutingUserCode.Text = "";
  195. this.chkValueFlag.AllItemCheck();
  196. }
  197. /// <summary>
  198. /// 窗体关闭事件处理
  199. /// </summary>
  200. /// <param name="sender"></param>
  201. /// <param name="e"></param>
  202. private void tsbtnClose_Click(object sender, System.EventArgs e)
  203. {
  204. this.Close();
  205. }
  206. /// <summary>
  207. /// 窗体关闭后,释放单例模式
  208. /// </summary>
  209. /// <param name="sender"></param>
  210. /// <param name="e"></param>
  211. private void F_PC_0104_FormClosed(object sender, System.Windows.Forms.FormClosedEventArgs e)
  212. {
  213. _instance = null;
  214. }
  215. /// <summary>
  216. /// 双击某成型线进行编辑
  217. /// </summary>
  218. /// <param name="sender"></param>
  219. /// <param name="e"></param>
  220. private void dgvGroutingLine_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
  221. {
  222. try
  223. {
  224. if (e.RowIndex == -Constant.INT_IS_ONE || e.ColumnIndex == -Constant.INT_IS_ONE)
  225. {
  226. return;
  227. }
  228. DataGridViewRow currentRow = this.dgvGroutingLine.CurrentRow;
  229. int GroutingLineId = Convert.ToInt32(currentRow.Cells["GroutingLineId"].Value);
  230. F_PC_0103 frmFPC0103 = new F_PC_0103(GroutingLineId);
  231. DialogResult dialogresult = frmFPC0103.ShowDialog();
  232. if (dialogresult.Equals(DialogResult.OK))
  233. {
  234. this.dgvGroutingLine.DataSource = null;
  235. object obResult = DoAsync(new Dongke.IBOSS.PRD.Basics.DockPanel.AsyncMethod(GetGroutingLine));
  236. if (obResult != null)
  237. {
  238. DataSet dsGroutingLine = (DataSet)obResult;
  239. if (dsGroutingLine.Tables.Count != Constant.INT_IS_ZERO)
  240. {
  241. this.dgvGroutingLine.DataSource = dsGroutingLine.Tables[0];
  242. this.dgvGroutingLine.ReadOnly = true;
  243. }
  244. }
  245. }
  246. }
  247. catch (Exception ex)
  248. {
  249. // 对异常进行共通处理
  250. ExceptionManager.HandleEventException(this.ToString(),
  251. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  252. }
  253. }
  254. /// <summary>
  255. /// 添加新成型线
  256. /// </summary>
  257. /// <param name="sender"></param>
  258. /// <param name="e"></param>
  259. private void tsbtnAdd_Click(object sender, EventArgs e)
  260. {
  261. try
  262. {
  263. F_PC_0102 frmFPC0102 = new F_PC_0102();
  264. DialogResult dialogresult = frmFPC0102.ShowDialog();
  265. if (dialogresult.Equals(DialogResult.OK))
  266. {
  267. this.dgvGroutingLine.DataSource = null;
  268. DataSet dsGroutingLine = (DataSet)DoAsync(new Dongke.IBOSS.PRD.Basics.DockPanel.AsyncMethod(() =>
  269. {
  270. return GetGroutingLine();
  271. }));
  272. if (dsGroutingLine != null)
  273. {
  274. if (dsGroutingLine.Tables.Count != Constant.INT_IS_ZERO)
  275. {
  276. this.dgvGroutingLine.DataSource = ((DataSet)dsGroutingLine).Tables[0];
  277. this.dgvGroutingLine.ReadOnly = true;
  278. }
  279. }
  280. }
  281. }
  282. catch (Exception ex)
  283. {
  284. // 对异常进行共通处理
  285. ExceptionManager.HandleEventException(this.ToString(),
  286. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  287. }
  288. }
  289. /// <summary>
  290. /// 编辑选中成型线
  291. /// </summary>
  292. /// <param name="sender"></param>
  293. /// <param name="e"></param>
  294. private void tsbtnEdit_Click(object sender, EventArgs e)
  295. {
  296. try
  297. {
  298. DataGridViewRow currentRow = this.dgvGroutingLine.CurrentRow;
  299. if (currentRow != null)
  300. {
  301. int GroutingLineId = Convert.ToInt32(currentRow.Cells["GroutingLineId"].Value);
  302. F_PC_0103 frmFPC0103 = new F_PC_0103(GroutingLineId);
  303. DialogResult dialogresult = frmFPC0103.ShowDialog();
  304. if (dialogresult.Equals(DialogResult.OK))
  305. {
  306. this.dgvGroutingLine.DataSource = null;
  307. object obResult = DoAsync(new Dongke.IBOSS.PRD.Basics.DockPanel.AsyncMethod(GetGroutingLine));
  308. if (obResult != null)
  309. {
  310. DataSet dsGroutingLine = (DataSet)obResult;
  311. if (dsGroutingLine.Tables.Count != Constant.INT_IS_ZERO)
  312. {
  313. this.dgvGroutingLine.DataSource = dsGroutingLine.Tables[0];
  314. this.dgvGroutingLine.ReadOnly = true;
  315. }
  316. }
  317. }
  318. }
  319. }
  320. catch (Exception ex)
  321. {
  322. // 对异常进行共通处理
  323. ExceptionManager.HandleEventException(this.ToString(),
  324. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  325. }
  326. }
  327. /// <summary>
  328. /// 选择某成型线查看模具明细
  329. /// </summary>
  330. /// <param name="sender"></param>
  331. /// <param name="e"></param>
  332. private void dgvGroutingLine_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
  333. {
  334. try
  335. {
  336. if (e.RowIndex == -Constant.INT_IS_ONE || e.ColumnIndex == -Constant.INT_IS_ONE)
  337. {
  338. return;
  339. }
  340. int GroutingLineID = Convert.ToInt32(this.dgvGroutingLine.Rows[e.RowIndex].Cells["GroutingLineID"].Value);
  341. this.BindDetailInfo(GroutingLineID);
  342. }
  343. catch (Exception ex)
  344. {
  345. // 对异常进行共通处理
  346. ExceptionManager.HandleEventException(this.ToString(),
  347. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  348. }
  349. }
  350. /// <summary>
  351. /// 打开履历查询界面
  352. /// </summary>
  353. /// <param name="sender"></param>
  354. /// <param name="e"></param>
  355. private void tsbtnQueryRecord_Click(object sender, EventArgs e)
  356. {
  357. try
  358. {
  359. F_PC_0105 frmFPC0105 = new F_PC_0105();
  360. DialogResult dialogresult = frmFPC0105.ShowDialog();
  361. }
  362. catch (Exception ex)
  363. {
  364. // 对异常进行共通处理
  365. ExceptionManager.HandleEventException(this.ToString(),
  366. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  367. }
  368. }
  369. /// <summary>
  370. /// 成型线列头点击事件
  371. /// </summary>
  372. /// <param name="sender"></param>
  373. /// <param name="e"></param>
  374. private void dgvGroutingLine_ColumnHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
  375. {
  376. try
  377. {
  378. if (this.dgvGroutingLine.SelectedRows.Count != Constant.INT_IS_ZERO)
  379. {
  380. int GroutingLineID = Convert.ToInt32(this.dgvGroutingLine.SelectedRows[0].Cells["GroutingLineID"].Value);
  381. this.BindDetailInfo(GroutingLineID);
  382. }
  383. }
  384. catch (Exception ex)
  385. {
  386. // 对异常进行共通处理
  387. ExceptionManager.HandleEventException(this.ToString(),
  388. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  389. }
  390. }
  391. #endregion
  392. #region 私有方法
  393. /// <summary>
  394. /// 为页面的成型线类型绑定数据源
  395. /// </summary>
  396. private void BindMouldType()
  397. {
  398. try
  399. {
  400. DataTable dtDataSourse = new DataTable();
  401. dtDataSourse.Columns.Add("GMouldType", System.Type.GetType("System.String"));
  402. dtDataSourse.Columns.Add("GMouldTypeName", System.Type.GetType("System.String"));
  403. for (int i = 0; i < Constant.ConGMouldStatusCount; i++)
  404. {
  405. DataRow drRow = dtDataSourse.NewRow();
  406. drRow["GMouldType"] = Constant.ConGMouldStatus[i, 0];
  407. drRow["GMouldTypeName"] = Constant.ConGMouldStatus[i, 1];
  408. dtDataSourse.Rows.Add(drRow);
  409. }
  410. this.lstcbxGMouldStatus.ListBox.DisplayMember = "GMouldTypeName";
  411. this.lstcbxGMouldStatus.ListBox.ValueMember = "GMouldType";
  412. this.lstcbxGMouldStatus.ListBox.DataSource = dtDataSourse;
  413. }
  414. catch (Exception ex)
  415. {
  416. throw ex;
  417. }
  418. }
  419. /// <summary>
  420. /// 设置开始使用时间可用状态
  421. /// </summary>
  422. /// <param name="isEnable">
  423. /// false:不可用
  424. /// true:可用
  425. /// </param>
  426. private void SetBeginTimePickerEnable(bool isEnable)
  427. {
  428. this.txtBeginUsedDateStart.Enabled = isEnable;
  429. this.txtBeginUsedDateEnd.Enabled = isEnable;
  430. }
  431. /// <summary>
  432. /// 设置结束使用时间可用状态
  433. /// </summary>
  434. /// <param name="isEnable">
  435. /// false:不可用
  436. /// true:可用
  437. /// </param>
  438. private void SetEndTimePickerEnable(bool isEnable)
  439. {
  440. this.txtEndUsedDateStart.Enabled = isEnable;
  441. this.txtEndUsedDateEnd.Enabled = isEnable;
  442. }
  443. /// <summary>
  444. /// 根据条件取得成型线数据
  445. /// </summary>
  446. /// <returns></returns>
  447. private DataSet GetGroutingLine()
  448. {
  449. try
  450. {
  451. this.dgvGroutingLine.AutoGenerateColumns = false;
  452. GroutingLineEntity groutingLineEntity = new GroutingLineEntity();
  453. groutingLineEntity.VALUEFLAG = null;
  454. groutingLineEntity.BUILDINGNO = this.txtBuildingNo.Text.Trim();
  455. groutingLineEntity.FLOORNO = this.txtFloorNo.Text.Trim();
  456. groutingLineEntity.GROUTINGLINENO = this.txtGroutingLineNo.Text.Trim();
  457. if (_mouldStatus != null)
  458. {
  459. groutingLineEntity.MouldStatus = _mouldStatus;
  460. }
  461. groutingLineEntity.GROUTINGLINECODE = this.txtGroutingLineCode.Text.Trim();
  462. groutingLineEntity.GROUTINGLINENAME = this.txtGroutingLineName.Text.Trim();
  463. if (this.cbStartTime.Checked)
  464. {
  465. groutingLineEntity.BEGINUSEDDATE = Convert.ToDateTime(this.txtBeginUsedDateStart.Text.Trim());
  466. groutingLineEntity.BEGINUSEDDATEEND = Convert.ToDateTime(this.txtBeginUsedDateEnd.Text.Trim()).AddHours(23)
  467. .AddMinutes(59).AddSeconds(59);
  468. }
  469. if (this.cbEndTime.Checked)
  470. {
  471. groutingLineEntity.ENDUSEDDATE = Convert.ToDateTime(this.txtEndUsedDateStart.Text.Trim());
  472. groutingLineEntity.ENDUSEDDATEEND = Convert.ToDateTime(this.txtEndUsedDateEnd.Text.Trim()).AddHours(23)
  473. .AddMinutes(59).AddSeconds(59);
  474. }
  475. groutingLineEntity.REMARKS = this.txtRemarks.Text.Trim();
  476. if (this.mtType.MouldTypeID != null)
  477. {
  478. groutingLineEntity.MOULDTYPEID = this.mtType.MouldTypeID;
  479. }
  480. object[] objListValue = chkValueFlag.SelectedValues;
  481. if (objListValue.Length == Constant.INT_IS_ONE)
  482. {
  483. groutingLineEntity.VALUEFLAG = (int)objListValue[0];
  484. }
  485. else if (objListValue.Length == Constant.INT_IS_ZERO)
  486. {
  487. return null;
  488. }
  489. groutingLineEntity.USERCODE = this.txtGroutingUserCode.Text.Trim();
  490. return PCModuleProxy.Service.GetGroutingLine(groutingLineEntity);
  491. }
  492. catch (Exception ex)
  493. {
  494. throw ex;
  495. }
  496. }
  497. /// <summary>
  498. /// 将成型线DataSet数据集转入集合中
  499. /// </summary>
  500. /// <param name="dsLine"></param>
  501. private void DataTableToListByLine(DataSet dsLine)
  502. {
  503. try
  504. {
  505. this._groutingLineList.Clear();
  506. foreach (DataRow drFor in dsLine.Tables[0].Rows)
  507. {
  508. GroutingLineEntity lineEntity = new GroutingLineEntity();
  509. lineEntity.GROUTINGLINEID = Convert.ToInt32(drFor["GROUTINGLINEID"]);
  510. lineEntity.BUILDINGNO = drFor["BUILDINGNO"].ToString();
  511. lineEntity.FLOORNO = drFor["FLOORNO"].ToString();
  512. lineEntity.GROUTINGLINENO = drFor["GROUTINGLINENO"].ToString();
  513. lineEntity.GROUTINGLINECODE = drFor["GROUTINGLINECODE"].ToString();
  514. lineEntity.GROUTINGLINENAME = drFor["GROUTINGLINENAME"].ToString();
  515. lineEntity.MOULDQUANTITY = Convert.ToDecimal(drFor["MOULDQUANTITY"]);
  516. lineEntity.MOULDTYPEID = Convert.ToInt32(drFor["GMOULDTYPEID"]);
  517. lineEntity.USERID = Convert.ToInt32(drFor["USERID"]);
  518. lineEntity.BEGINUSEDDATE = Convert.ToDateTime(drFor["BEGINUSEDDATE"]);
  519. if (drFor["ENDUSEDDATE"].ToString() != string.Empty)
  520. {
  521. lineEntity.ENDUSEDDATE = Convert.ToDateTime(drFor["ENDUSEDDATE"].ToString());
  522. }
  523. lineEntity.MouldStatus = Convert.ToInt32(drFor["GMouldStatus"]);
  524. lineEntity.REMARKS = drFor["REMARKS"].ToString();
  525. lineEntity.ACCOUNTID = Convert.ToInt32(drFor["ACCOUNTID"]);
  526. lineEntity.VALUEFLAG = Convert.ToInt32(drFor["VALUEFLAG"]);
  527. lineEntity.CREATETIME = Convert.ToDateTime(drFor["CREATETIME"]);
  528. lineEntity.CREATEUSERID = Convert.ToInt32(drFor["CREATEUSERID"]);
  529. lineEntity.UPDATETIME = Convert.ToDateTime(drFor["UPDATETIME"]);
  530. lineEntity.UPDATEUSERID = Convert.ToInt32(drFor["UPDATEUSERID"]);
  531. lineEntity.OPTIMESTAMP = Convert.ToDateTime(drFor["OPTIMESTAMP"]);
  532. lineEntity.MOULDTYPENAME = drFor["GMOULDTYPENAME"].ToString();
  533. this._groutingLineList.Add(lineEntity);
  534. }
  535. }
  536. catch (Exception ex)
  537. {
  538. throw ex;
  539. }
  540. }
  541. /// <summary>
  542. /// 根据成型线ID获取明细信息
  543. /// </summary>
  544. private void BindDetailInfo(int GroutingLineID)
  545. {
  546. try
  547. {
  548. this.dgvGroutingLineDetail.AutoGenerateColumns = false;
  549. DataSet dsDetail = (DataSet)DoAsync(new Dongke.IBOSS.PRD.Basics.DockPanel.AsyncMethod(() =>
  550. {
  551. return PCModuleProxy.Service.GetGroutingLineDetailByMainId(GroutingLineID, null, 0);
  552. }));
  553. this.dgvGroutingLineDetail.DataSource = dsDetail.Tables[0];
  554. this.dgvGroutingLineDetail.ReadOnly = true;
  555. }
  556. catch (Exception ex)
  557. {
  558. throw ex;
  559. }
  560. }
  561. #endregion
  562. }
  563. }