F_PM_1201.cs 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579
  1. /*******************************************************************************
  2. * Copyright(c) 2014 DongkeSoft All rights reserved. / Confidential
  3. * 类的信息:
  4. * 1.程序名称:F_PM_1201.cs
  5. * 2.功能描述:成品检验一览
  6. * 编辑履历:
  7. * 作者 日期 版本 修改内容
  8. * 王鑫 2014/10/18 1.00 新建
  9. *******************************************************************************/
  10. using Dongke.IBOSS.PRD.Basics.BaseResources;
  11. using Dongke.IBOSS.PRD.Basics.DockPanel;
  12. using Dongke.IBOSS.PRD.Client.CommonModule;
  13. using Dongke.IBOSS.PRD.Client.DataModels;
  14. using Dongke.IBOSS.PRD.WCF.DataModels.PMModule;
  15. using Dongke.IBOSS.PRD.WCF.Proxys;
  16. using System;
  17. using System.Collections.Generic;
  18. using System.Data;
  19. using System.Windows.Forms;
  20. namespace Dongke.IBOSS.PRD.Client.PMModule
  21. {
  22. /// <summary>
  23. /// 成品检验一览
  24. /// </summary>
  25. public partial class F_PM_1201 : DockPanelBase
  26. {
  27. #region 成员变量
  28. // 窗体的单例模式
  29. private static Dictionary<int, F_PM_1201> _dicInstance;
  30. // 当前工序ID
  31. private int _currentProcedureID = 0;
  32. // 最后选择行
  33. private int _selecedRow;
  34. // 窗体显示的Title
  35. private string _fromTitle;
  36. #endregion
  37. #region 构造函数
  38. public F_PM_1201()
  39. {
  40. InitializeComponent();
  41. this.tsbtnAdd.Text = ButtonText.TSBTN_ADD;
  42. //编辑
  43. this.tsbtnEdit.Text = ButtonText.TSBTN_EDIT;
  44. //自动适应列宽
  45. this.tsbtnAdaptive.Text = ButtonText.TSBTN_ADAPTIVE;
  46. //关闭
  47. this.tsbtnClose.Text = ButtonText.TSBTN_CLOSE;
  48. //查询
  49. this.btnSearch.Text = ButtonText.BTN_SEARCH;
  50. //清空条件
  51. this.btnClearCondition.Text = ButtonText.BTN_CLEARCONDITION;
  52. //查询条件
  53. this.gbxCondition.Text = Constant.LABEL_QUERY_CONDITIONS;
  54. this.Text = _fromTitle;
  55. }
  56. #endregion
  57. #region 单例模式
  58. /// <summary>
  59. /// 一个工序ID有一个单例,防止重复创建窗体
  60. /// </summary>
  61. /// <param name="procedureID">工序ID</param>
  62. /// <returns></returns>
  63. public static F_PM_1201 Instance(int procedureID, string fromTitle)
  64. {
  65. F_PM_1201 fInstance = null;
  66. if (_dicInstance == null)
  67. {
  68. _dicInstance = new Dictionary<int, F_PM_1201>();
  69. fInstance = new F_PM_1201();
  70. _dicInstance.Add(procedureID, fInstance);
  71. }
  72. else if (_dicInstance.ContainsKey(procedureID))
  73. {
  74. fInstance = _dicInstance[procedureID];
  75. }
  76. else
  77. {
  78. fInstance = new F_PM_1201();
  79. _dicInstance.Add(procedureID, fInstance);
  80. }
  81. fInstance._currentProcedureID = procedureID;
  82. fInstance._fromTitle = fromTitle;
  83. fInstance.Text = fromTitle;
  84. return fInstance;
  85. }
  86. #endregion
  87. #region 事件
  88. /// <summary>
  89. /// 窗体加载事件
  90. /// </summary>
  91. /// <param name="sender"></param>
  92. /// <param name="e"></param>
  93. private void F_PM_1201_Load(object sender, System.EventArgs e)
  94. {
  95. try
  96. {
  97. if (_currentProcedureID == 16 || _currentProcedureID == 28)
  98. {
  99. this.dgvProduction.Columns["CheckTime"].Visible = false;
  100. }
  101. else
  102. {
  103. this.dgvProduction.Columns["CheckTime"].Visible = true;
  104. }
  105. if (_currentProcedureID != 28 && _currentProcedureID != 61)
  106. {
  107. this.dgvProduction.Columns["datasource"].Visible = false;
  108. }
  109. // 加载权限
  110. FormPermissionManager.FormPermissionControl(this.Name, this,
  111. LogInUserInfo.CurrentUser.CurrentUserEntity.UserRightData, LogInUserInfo.CurrentUser.CurrentUserEntity.FunctionData);
  112. this.tsbtnAdd.Visible = true;
  113. // 设置表格不自动创建列
  114. this.dgvProduction.AutoGenerateColumns = false;
  115. // 初始化时间控件为当前日期
  116. this.dtpStartTime.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day);
  117. this.dtpEndTime.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day).AddDays(1).AddMinutes(-1);
  118. // 初始化时间控件为当前日期
  119. this.dtpUpdateTimeStart.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day);
  120. this.dtpUpdateTimeEnd.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day).AddDays(1).AddMinutes(-1);
  121. // 设置ToolStripButton状态
  122. this.SetToolStripButtonEnable();
  123. #region 设置下拉列表框的数据源
  124. this.cobKilnName.DataSource = GetMSTKilnInfo();
  125. this.cobKilnName.DisplayMember = "KilnName";
  126. this.cobKilnName.ValueMember = "KilnCode";
  127. this.cobKilnCarPosition.DataSource = GetMSTKilnCarPositionInfo();
  128. this.cobKilnCarPosition.DisplayMember = "DictionaryValue";
  129. this.cobKilnCarPosition.ValueMember = "DictionaryID";
  130. #endregion
  131. }
  132. catch (Exception ex)
  133. {
  134. // 对异常进行共通处理
  135. ExceptionManager.HandleEventException(this.ToString(),
  136. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  137. }
  138. }
  139. /// <summary>
  140. /// 窗体关闭事件
  141. /// </summary>
  142. /// <param name="sender"></param>
  143. /// <param name="e"></param>
  144. private void F_PM_1201_FormClosed(object sender, System.Windows.Forms.FormClosedEventArgs e)
  145. {
  146. _dicInstance = null;
  147. }
  148. /// <summary>
  149. /// 自动适应列宽
  150. /// </summary>
  151. /// <param name="sender"></param>
  152. /// <param name="e"></param>
  153. private void tsbtnAdaptive_Click(object sender, EventArgs e)
  154. {
  155. this.dgvProduction.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells);
  156. this.dgvDefect.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells);
  157. }
  158. /// <summary>
  159. /// 清空条件按钮事件
  160. /// </summary>
  161. /// <param name="sender"></param>
  162. /// <param name="e"></param>
  163. private void btnClearCondition_Click(object sender, EventArgs e)
  164. {
  165. this.txtBarCode.Text = string.Empty;
  166. this.txtGoodsCode.Text = string.Empty;
  167. this.txtGoodsName.Text = string.Empty;
  168. this.txtUserCode.Text = string.Empty;
  169. this.scbOrganization.ClearValue();
  170. //this.txtRemarks.Text = string.Empty;
  171. this.scbGoodsType.ClearValue();
  172. this.dtpStartTime.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day);
  173. this.dtpEndTime.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day).AddDays(1).AddMinutes(-1);
  174. this.cobKilnName.SelectedIndex = Constant.INT_IS_ZERO;
  175. this.txtKilnCarName.Text = string.Empty;
  176. this.cobKilnCarPosition.SelectedIndex = Constant.INT_IS_ZERO;
  177. this.cobworkshop.SelectedIndex = Constant.INT_IS_NEGATIE_ONE;
  178. this.txtGroutingUserCode.Text = string.Empty;
  179. this.chkCreateTime.Checked = false;
  180. this.dtpStartTime.Enabled = false;
  181. this.dtpEndTime.Enabled = false;
  182. this.chkUpdateTime.Checked = true;
  183. this.dtpUpdateTimeStart.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day);
  184. this.dtpUpdateTimeEnd.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day).AddDays(1).AddMinutes(-1);
  185. this.dtpUpdateTimeStart.Enabled = true;
  186. this.dtpUpdateTimeEnd.Enabled = true;
  187. this.chkChangeDayFlag.Checked = false;
  188. this.chkChangeMontFlag.Checked = false;
  189. }
  190. /// <summary>
  191. /// 查询按钮事件
  192. /// </summary>
  193. /// <param name="sender"></param>
  194. /// <param name="e"></param>
  195. private void btnSearch_Click(object sender, EventArgs e)
  196. {
  197. try
  198. {
  199. if (this.chkCreateTime.Checked == false && this.chkUpdateTime.Checked == false)
  200. {
  201. MessageBox.Show("操作时间和首检时间至少选取一个", this.Text,
  202. MessageBoxButtons.OK, MessageBoxIcon.Information);
  203. return;
  204. }
  205. // 记录当前选中行
  206. int selectRowIndex = this._selecedRow;
  207. // 异步处理
  208. this.btnSearch.Enabled = false;
  209. this.btnClearCondition.Enabled = false;
  210. SearchProductionDataEntity requestEntity = CreatesearchProductionDataRequestEntity();
  211. DataTable dtProductionData = (DataTable)DoAsync(new AsyncMethod(() =>
  212. {
  213. return PMModuleProxy.Service.GetProductionData(requestEntity);
  214. }));
  215. DataSet dsProductionData = new DataSet();
  216. dsProductionData.Tables.Add(dtProductionData);
  217. this.btnSearch.Enabled = true;
  218. this.btnClearCondition.Enabled = true;
  219. if (dsProductionData != null)
  220. {
  221. base.DataSource = dsProductionData;
  222. if (this.DataSource != null && this.DataSource.Tables.Count > Constant.INT_IS_ZERO)
  223. {
  224. tsbtnEdit.Enabled = true;
  225. this.dgvProduction.DataSource = this.DataSource.Tables[0];
  226. selectRowIndex = 0;
  227. if (this.DataSource.Tables[0].Rows.Count <= Constant.INT_IS_ZERO)
  228. {
  229. tsbtnEdit.Enabled = false;
  230. this.dgvDefect.DataSource = null;
  231. // 提示未查找到数据
  232. MessageBox.Show(Messages.MSG_CMN_I002, this.Text,
  233. MessageBoxButtons.OK, MessageBoxIcon.Information);
  234. }
  235. else
  236. {
  237. if (selectRowIndex >= Constant.INT_IS_ZERO)
  238. {
  239. if (selectRowIndex >= dsProductionData.Tables[0].Rows.Count)
  240. {
  241. this.dgvProduction.Rows[this.dgvProduction.Rows.Count - 1].Selected = true;
  242. this.dgvProduction.CurrentCell = this.dgvProduction.Rows[this.dgvProduction.Rows.Count - 1].Cells["GoodsCode"];
  243. }
  244. else
  245. {
  246. this.dgvProduction.Rows[selectRowIndex].Selected = true;
  247. this.dgvProduction.CurrentCell = this.dgvProduction.Rows[selectRowIndex].Cells["GoodsCode"];
  248. }
  249. }
  250. }
  251. }
  252. }
  253. }
  254. catch (Exception ex)
  255. {
  256. this.btnSearch.Enabled = true;
  257. this.btnClearCondition.Enabled = true;
  258. // 对异常进行共通处理
  259. ExceptionManager.HandleEventException(this.ToString(),
  260. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  261. }
  262. }
  263. /// <summary>
  264. /// 关闭按钮事件
  265. /// </summary>
  266. /// <param name="sender"></param>
  267. /// <param name="e"></param>
  268. private void tsbtnClose_Click(object sender, EventArgs e)
  269. {
  270. this.Close();
  271. }
  272. /// <summary>
  273. /// 新建按钮事件
  274. /// </summary>
  275. /// <param name="sender"></param>
  276. /// <param name="e"></param>
  277. private void tsbtnAdd_Click(object sender, EventArgs e)
  278. {
  279. try
  280. {
  281. F_PM_1202 frmPM1202 = new F_PM_1202(_currentProcedureID, _fromTitle);
  282. DialogResult dialogResult = frmPM1202.ShowDialog();
  283. // 重新加载GridView
  284. if (dialogResult == DialogResult.OK)
  285. {
  286. SearchProductionDataEntity requestEntity = CreatesearchProductionDataRequestEntity();
  287. DataTable dtProductionData = (DataTable)DoAsync(new AsyncMethod(() =>
  288. {
  289. return PMModuleProxy.Service.GetProductionData(requestEntity);
  290. }));
  291. if (dtProductionData != null && dtProductionData.Rows.Count > Constant.INT_IS_ZERO)
  292. {
  293. this.dgvProduction.DataSource = null;
  294. this.dgvProduction.DataSource = dtProductionData;
  295. // 设置ToolStripButton按钮状态
  296. this.SetToolStripButtonEnable();
  297. this.dgvProduction.ReadOnly = true;
  298. }
  299. }
  300. }
  301. catch (Exception ex)
  302. {
  303. // 对异常进行共通处理
  304. ExceptionManager.HandleEventException(this.ToString(),
  305. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  306. }
  307. }
  308. /// <summary>
  309. /// 数据表格选定项改变事件
  310. /// </summary>
  311. /// <param name="sender"></param>
  312. /// <param name="e"></param>
  313. private void dgvProduction_SelectionChanged(object sender, EventArgs e)
  314. {
  315. try
  316. {
  317. if (this.dgvProduction.CurrentCell != null)
  318. {
  319. if (!this.txtBarCode.ReadOnly)
  320. {
  321. this._selecedRow = this.dgvProduction.CurrentCell.RowIndex;
  322. this.dgvDefect.DataSource = null;
  323. string flag = this.dgvProduction.Rows[_selecedRow].Cells["ProductionDataID"].Value.ToString();
  324. if (flag != null && flag != "")
  325. {
  326. int ProductionDataID = Convert.ToInt32(this.dgvProduction.Rows[_selecedRow].Cells["ProductionDataID"].Value.ToString());
  327. DataSet dsProductionDefect = (DataSet)DoAsync(new AsyncMethod(() =>
  328. {
  329. return PMModuleProxy.Service.GetProductionDefectByProductionDataID(ProductionDataID);
  330. }));
  331. if (dsProductionDefect != null && dsProductionDefect.Tables.Count > Constant.INT_IS_ZERO
  332. && dsProductionDefect.Tables[0].Rows.Count > Constant.INT_IS_ZERO)
  333. {
  334. this.dgvDefect.DataSource = dsProductionDefect.Tables[0];
  335. }
  336. }
  337. }
  338. }
  339. }
  340. catch (Exception ex)
  341. {
  342. // 对异常进行共通处理
  343. ExceptionManager.HandleEventException(this.ToString(),
  344. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  345. }
  346. }
  347. /// <summary>
  348. /// 编辑按钮事件
  349. /// </summary>
  350. /// <param name="sender"></param>
  351. /// <param name="e"></param>
  352. private void tsbtnEdit_Click(object sender, EventArgs e)
  353. {
  354. try
  355. {
  356. string flag = this.dgvProduction.Rows[_selecedRow].Cells["ProductionDataID"].Value.ToString();
  357. if (this.dgvProduction.CurrentRow != null && (flag != null && flag != ""))
  358. {
  359. int ProductionDataID = Convert.ToInt32(this.dgvProduction.CurrentRow.Cells["ProductionDataID"].Value);
  360. string BarCode = this.dgvProduction.CurrentRow.Cells["BarCode"].Value.ToString();
  361. int CompleteProcedureID = (int)DoAsync(new AsyncMethod(() =>
  362. {
  363. return PMModuleProxy.Service.GetCompleteProcedureID(BarCode);
  364. }));
  365. bool isView = true;
  366. if (CompleteProcedureID != -Constant.INT_IS_ONE && CompleteProcedureID == this._currentProcedureID)
  367. {
  368. // 尽管等于当前工序,但是如果该条码又插入了一条生产数据,在编辑此数据时,也应该为只读,即重烧后添加的生产数据,编辑上一次生产数据ID
  369. int CompleteProductionDataID = (int)DoAsync(new AsyncMethod(() =>
  370. {
  371. return PMModuleProxy.Service.GetCompleteProductionDataID(BarCode);
  372. }));
  373. if (ProductionDataID == CompleteProductionDataID)
  374. {
  375. int auditstatus = (int)DoAsync(new AsyncMethod(() =>
  376. {
  377. return PMModuleProxy.Service.CheckScrapProduct(BarCode);
  378. }));
  379. if (auditstatus != -100)
  380. {
  381. isView = true;
  382. }
  383. else
  384. {
  385. isView = false;
  386. }
  387. // }
  388. }
  389. }
  390. F_PM_1202 frmPM1202 = new F_PM_1202(_currentProcedureID, _fromTitle, ProductionDataID, isView);
  391. DialogResult dialogResult = frmPM1202.ShowDialog();
  392. // 重新加载GridView
  393. if (dialogResult == DialogResult.OK)
  394. {
  395. SearchProductionDataEntity requestEntity = CreatesearchProductionDataRequestEntity();
  396. DataTable dtProductionData = (DataTable)DoAsync(new AsyncMethod(() =>
  397. {
  398. return PMModuleProxy.Service.GetProductionData(requestEntity);
  399. }));
  400. if (dtProductionData != null && dtProductionData.Rows.Count > Constant.INT_IS_ZERO)
  401. {
  402. this.dgvProduction.DataSource = null;
  403. this.dgvProduction.DataSource = dtProductionData;
  404. // 设置ToolStripButton按钮状态
  405. this.SetToolStripButtonEnable();
  406. this.dgvProduction.ReadOnly = true;
  407. }
  408. }
  409. }
  410. else
  411. {
  412. MessageBox.Show("无法编辑小计合计数据 请重新选择", this.Text,
  413. MessageBoxButtons.OK, MessageBoxIcon.Information);
  414. }
  415. }
  416. catch (Exception ex)
  417. {
  418. // 对异常进行共通处理
  419. ExceptionManager.HandleEventException(this.ToString(),
  420. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  421. }
  422. }
  423. #endregion
  424. #region 私有方法
  425. /// <summary>
  426. /// 设置工具按钮的可用状态
  427. /// </summary>
  428. private void SetToolStripButtonEnable()
  429. {
  430. if (this.dgvProduction.CurrentCell != null)
  431. {
  432. this.tsbtnEdit.Enabled = true;
  433. }
  434. else
  435. {
  436. this.tsbtnEdit.Enabled = false;
  437. }
  438. }
  439. /// <summary>
  440. /// 搜索条件
  441. /// </summary>
  442. /// <returns></returns>
  443. private SearchProductionDataEntity CreatesearchProductionDataRequestEntity()
  444. {
  445. SearchProductionDataEntity result = new SearchProductionDataEntity();
  446. result.BarCode = this.txtBarCode.Text.Trim();
  447. result.GoodsCode = this.txtGoodsCode.Text.Trim();
  448. result.GoodsName = this.txtGoodsName.Text.Trim();
  449. result.UserCode = this.txtUserCode.Text.Trim();
  450. result.OrganizationID = this.scbOrganization.SearchedPKMember;
  451. result.Remarks = cobworkshop.Text;//暂传车间(成检部分)
  452. // 客户端质量登记(包含重烧)需增加首检时间数据列,改判(首检非当天)标识,跨月改判(首检为 25 日 23:59:59 之前)标识,以上内容添加在搜索条件内,质量登记默认搜索条件为首次质量登记时间
  453. if (this.chkCreateTime.Checked == true)
  454. {
  455. result.BeginDate = this.dtpStartTime.Value;
  456. result.EndDate = this.dtpEndTime.Value;
  457. result.IsCreateDayFlg = "1";
  458. }
  459. if (this.chkUpdateTime.Checked == true)
  460. {
  461. result.BeginCheckDate = this.dtpUpdateTimeStart.Value;
  462. result.EndCheckDate = this.dtpUpdateTimeEnd.Value;
  463. result.IsCheckDayFlg = "1";
  464. }
  465. result.ChangeDayFlag = this.chkChangeDayFlag.Checked ? "1" : "";
  466. result.ChangeMontFlag = this.chkChangeMontFlag.Checked ? "1" : "";
  467. result.ProcedureID = _currentProcedureID;
  468. if (this.cobKilnName.SelectedValue != null
  469. && !Constant.CBO_SELECT_ALL_VALUE.ToString().Equals(this.cobKilnName.SelectedValue.ToString()))
  470. {
  471. result.KilnCode = this.cobKilnName.SelectedValue.ToString();
  472. }
  473. result.KilnCarCode = this.txtKilnCarName.Text.Trim();
  474. result.GroutingUserCode = this.txtGroutingUserCode.Text.Trim();
  475. if (this.cobKilnCarPosition.SelectedValue != null
  476. && !Constant.CBO_SELECT_ALL_VALUE.ToString().Equals(this.cobKilnCarPosition.SelectedValue.ToString()))
  477. {
  478. result.KilnCarPosition = Convert.ToInt32(this.cobKilnCarPosition.SelectedValue);
  479. }
  480. result.GoodsTypeCode = scbGoodsType.SearchedValue + "";
  481. return result;
  482. }
  483. /// <summary>
  484. /// 获取窑炉字典信息
  485. /// </summary>
  486. /// <returns></returns>
  487. private DataTable GetMSTKilnInfo()
  488. {
  489. DataSet dsKilnInfo = (DataSet)DoAsync(new AsyncMethod(() =>
  490. {
  491. byte byFlage = Convert.ToByte(Constant.ValueFlag.Invalid);
  492. return SystemModuleProxy.Service.GetKilnData(byFlage);
  493. }));
  494. DataTable dtKilnInfo = dsKilnInfo.Tables[Constant.INT_IS_ZERO];
  495. DataRow newRowDic = dtKilnInfo.NewRow();
  496. newRowDic["KilnID"] = Constant.CBO_SELECT_ALL_VALUE;
  497. newRowDic["KilnCode"] = Constant.CBO_SELECT_ALL_VALUE;
  498. newRowDic["KilnName"] = Constant.CBO_SELECT_ALL_NAME;
  499. dtKilnInfo.Rows.InsertAt(newRowDic, Constant.INT_IS_ZERO);
  500. return dtKilnInfo;
  501. }
  502. /// <summary>
  503. /// 获取窑车位置字典表数据
  504. /// </summary>
  505. /// <returns></returns>
  506. public DataTable GetMSTKilnCarPositionInfo()
  507. {
  508. DataTable dtDicInfo = (DataTable)DoAsync(new AsyncMethod(() =>
  509. {
  510. return CommonModuleProxy.Service.GetDataDictionaryByType(Constant.TPC_TPC003);
  511. }));
  512. DataRow newRowDic = dtDicInfo.NewRow();
  513. newRowDic["DictionaryID"] = Constant.CBO_SELECT_ALL_VALUE;
  514. newRowDic["DictionaryValue"] = Constant.CBO_SELECT_ALL_NAME;
  515. dtDicInfo.Rows.InsertAt(newRowDic, Constant.INT_IS_ZERO);
  516. return dtDicInfo;
  517. }
  518. #endregion
  519. /// <summary>
  520. /// 首检日期
  521. /// </summary>
  522. /// <param name="sender"></param>
  523. /// <param name="e"></param>
  524. private void chkUpdateTime_CheckedChanged(object sender, EventArgs e)
  525. {
  526. this.dtpUpdateTimeStart.Enabled = this.chkUpdateTime.Checked;
  527. this.dtpUpdateTimeEnd.Enabled = this.chkUpdateTime.Checked;
  528. }
  529. /// <summary>
  530. /// 操作日期
  531. /// </summary>
  532. /// <param name="sender"></param>
  533. /// <param name="e"></param>
  534. private void chkCreateTime_CheckedChanged(object sender, EventArgs e)
  535. {
  536. this.dtpStartTime.Enabled = this.chkCreateTime.Checked;
  537. this.dtpEndTime.Enabled = this.chkCreateTime.Checked;
  538. }
  539. }
  540. }