F_RPT_030112.cs 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621
  1. /*******************************************************************************
  2. * Copyright(c) 2015 DongkeSoft All rights reserved. / Confidential
  3. * 类的信息:
  4. * 1.程序名称:F_RPT_030102_1.cs
  5. * 2.功能描述:产成品交接汇总表
  6. * 编辑履历:
  7. * 作者 日期 版本 修改内容
  8. * 袁新成 2015/4/14 1.00 新建
  9. *******************************************************************************/
  10. using System;
  11. using System.Data;
  12. using System.Text;
  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.Client.Controls;
  18. using Dongke.IBOSS.PRD.Client.DataModels;
  19. using Dongke.IBOSS.PRD.WCF.DataModels;
  20. using Dongke.IBOSS.PRD.WCF.Proxys;
  21. using Dongke.IBOSS.PRD.WCF.DataModels.PMModule;
  22. namespace Dongke.IBOSS.PRD.Client.ReportModule
  23. {
  24. public partial class F_RPT_030112 : DKDockPanelBase
  25. {
  26. #region 成员变量
  27. // 窗体的单例模式
  28. private static F_RPT_030112 _instance;
  29. //实体类
  30. private RPT030102_SE _rptse = null;
  31. private RPT030102_SE _rptse1 = null;
  32. // 存储查询条件
  33. private SearchFinishedProductEntity _orderEntity = null;
  34. //private SearchFinishedProductEntity _orderEntity2 = null;
  35. private SearchFinishedProductEntity _orderCRE = null;
  36. #endregion
  37. #region 构造函数
  38. public F_RPT_030112()
  39. {
  40. InitializeComponent();
  41. // 窗体显示的Title
  42. this.Text = FormTitles.F_RPT_030112;
  43. this.tsbtnAdaptive.Text = ButtonText.TSBTN_ADAPTIVE;
  44. this.tsbtnClose.Text = ButtonText.TSBTN_CLOSE;
  45. this.btnSearch.Text = ButtonText.BTN_SEARCH;
  46. this.btnClearCondition.Text = ButtonText.BTN_CLEARCONDITION;
  47. this.gbxCondition.Text = Constant.LABEL_QUERY_CONDITIONS;
  48. }
  49. #endregion
  50. #region 单例模式
  51. /// <summary>
  52. /// 单例模式,防止重复创建窗体
  53. /// </summary>
  54. public static F_RPT_030112 Instance
  55. {
  56. get
  57. {
  58. if (_instance == null || _instance.IsDisposed)
  59. {
  60. _instance = new F_RPT_030112();
  61. }
  62. return _instance;
  63. }
  64. }
  65. #endregion
  66. #region 事件处理
  67. /// <summary>
  68. /// 窗体加载事件
  69. /// </summary>
  70. /// <param name="sender"></param>
  71. /// <param name="e"></param>
  72. private void F_RPT_030102_1_Load(object sender, EventArgs e)
  73. {
  74. try
  75. {
  76. // 加载权限
  77. FormPermissionManager.FormPermissionControl(this.Name, this,
  78. LogInUserInfo.CurrentUser.CurrentUserEntity.UserRightData,
  79. LogInUserInfo.CurrentUser.CurrentUserEntity.FunctionData);
  80. // 设置表格不自动创建列
  81. this.dgvOrder.AutoGenerateColumns = false;
  82. this.dgvOrderDetail.AutoGenerateColumns = false;
  83. //this.dtpStartTime.Enabled = false;
  84. //this.dtpEndTime.Enabled = false;
  85. this.dtpStartTime.Value = DateTime.Now.Date;
  86. this.dtpEndTime.Value = DateTime.Now.Date.AddDays(1).AddSeconds(-1);
  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 F_RPT_030102_1_FormClosed(object sender, FormClosedEventArgs e)
  101. {
  102. _instance = null;
  103. }
  104. /// <summary>
  105. /// 关闭按钮
  106. /// </summary>
  107. /// <param name="sender"></param>
  108. /// <param name="e"></param>
  109. private void tsbtnClose_Click(object sender, EventArgs e)
  110. {
  111. this.Close();
  112. }
  113. /// <summary>
  114. /// 自动适应列宽
  115. /// </summary>
  116. /// <param name="sender"></param>
  117. /// <param name="e"></param>
  118. private void tsbtnAdaptive_Click(object sender, EventArgs e)
  119. {
  120. if (this.tblScrapTotalModule.SelectedIndex == Constant.INT_IS_ZERO)
  121. {
  122. this.dgvOrder.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells);
  123. }
  124. else if (this.tblScrapTotalModule.SelectedIndex == Constant.INT_IS_ONE)
  125. {
  126. this.dgvOrderDetail.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells);
  127. }
  128. else if (this.tblScrapTotalModule.SelectedIndex == Constant.INT_IS_FOUR)
  129. {
  130. this.dgvlc.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells);
  131. }
  132. else if (this.tblScrapTotalModule.SelectedIndex == Constant.INT_IS_FIVE)
  133. {
  134. this.dgvlcDetail.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells);
  135. }
  136. }
  137. /// <summary>
  138. /// 查询按钮事件
  139. /// </summary>
  140. /// <param name="sender"></param>
  141. /// <param name="e"></param>
  142. private void btnSearch_Click(object sender, EventArgs e)
  143. {
  144. try
  145. {
  146. GetOrderEntityFromLayout();// 设置查询实体类
  147. if (this.tblScrapTotalModule.SelectedIndex == 0)//交接汇总查询
  148. {
  149. //this._orderEntity2 = this._orderEntity;
  150. //this.dgvOrder.DataSource = null;
  151. //this.dgvOrder.DataSource = this.GetSearchTotalData();
  152. _orderCRE = this._orderEntity;
  153. this.GetSearchTotalData();
  154. }
  155. else if (this.tblScrapTotalModule.SelectedIndex == 1)//交接明细查询
  156. {
  157. this.dgvOrderDetail.DataSource = null;
  158. this.dgvOrderDetail.DataSource = this.GetSearchDetailData();
  159. }
  160. else if (this.tblScrapTotalModule.SelectedIndex == 2)//交接数量查询
  161. {
  162. this.dgvNum.DataSource = null;
  163. ClientRequestEntity cre = new ClientRequestEntity();
  164. cre.NameSpace = "R03";
  165. cre.Name = "R030112Num";
  166. cre.Properties["OrderNo"] = this.txtOrderNo.Text.Trim();
  167. cre.Properties["FHUserCode"] = this.txtFHUserCode.Text.Trim();
  168. if (this.chkDateTime.Checked)
  169. {
  170. cre.Properties["FHTimeStart"] = this.dtpStartTime.Value;
  171. cre.Properties["FHTimeEnd"] = this.dtpEndTime.Value;
  172. }
  173. cre.Properties["GoodsTypeCode"] = scbGoodsType.SearchedValue + "";
  174. cre.Properties["GoodsCode"] = this.txtGoodsCode.Text.Trim();
  175. cre.Properties["GoodsModel"] = this.txtGoodsModel.Text.Trim();
  176. cre.Properties["LogoIDS"] = this.dkLogoSearchBox1.LogoIDS;
  177. ServiceResultEntity resultEntity = DoAsync<ServiceResultEntity>(() =>
  178. {
  179. return ReportModuleProxy.Service.DoRequest(cre);
  180. });
  181. if (resultEntity == null || resultEntity.Data == null ||
  182. resultEntity.Data.Tables.Count == 0 ||
  183. resultEntity.Data.Tables[0].Rows.Count == 0)
  184. {
  185. this.dgvNum.AutoResizeColumns();
  186. return;
  187. }
  188. else
  189. {
  190. this.dgvNum.DataSource = resultEntity.Data.Tables[0];
  191. this.dgvNum.ReadOnly = true;
  192. this.dgvNum.Rows[0].Selected = true;
  193. this.dgvNum.AutoResizeColumns();
  194. }
  195. }
  196. else if (this.tblScrapTotalModule.SelectedIndex == 3)//型号数量查询
  197. {
  198. this.dgvGoodsNum.DataSource = null;
  199. ClientRequestEntity cre = new ClientRequestEntity();
  200. cre.NameSpace = "R03";
  201. cre.Name = "R030112GoodsNum";
  202. cre.Properties["OrderNo"] = this.txtOrderNo.Text.Trim();
  203. cre.Properties["FHUserCode"] = this.txtFHUserCode.Text.Trim();
  204. if (this.chkDateTime.Checked)
  205. {
  206. cre.Properties["FHTimeStart"] = this.dtpStartTime.Value;
  207. cre.Properties["FHTimeEnd"] = this.dtpEndTime.Value;
  208. }
  209. cre.Properties["GoodsTypeCode"] = scbGoodsType.SearchedValue + "";
  210. cre.Properties["GoodsCode"] = this.txtGoodsCode.Text.Trim();
  211. cre.Properties["GoodsModel"] = this.txtGoodsModel.Text.Trim();
  212. cre.Properties["LogoIDS"] = this.dkLogoSearchBox1.LogoIDS;
  213. ServiceResultEntity resultEntity = DoAsync<ServiceResultEntity>(() =>
  214. {
  215. return ReportModuleProxy.Service.DoRequest(cre);
  216. });
  217. if (resultEntity == null || resultEntity.Data == null ||
  218. resultEntity.Data.Tables.Count == 0 ||
  219. resultEntity.Data.Tables[0].Rows.Count == 0)
  220. {
  221. this.dgvGoodsNum.AutoResizeColumns();
  222. return;
  223. }
  224. else
  225. {
  226. this.dgvGoodsNum.DataSource = resultEntity.Data.Tables[0];
  227. this.dgvGoodsNum.ReadOnly = true;
  228. this.dgvGoodsNum.Rows[0].Selected = true;
  229. this.dgvGoodsNum.AutoResizeColumns();
  230. }
  231. }
  232. else if (this.tblScrapTotalModule.SelectedIndex == 4)//裸瓷交接汇总 add by qq 20250605
  233. {
  234. this.dgvlc.DataSource = null;
  235. ClientRequestEntity cre = new ClientRequestEntity();
  236. cre.NameSpace = "R03";
  237. cre.Name = "LCData";
  238. cre.Properties["FHUserCode"] = this.txtFHUserCode.Text.Trim();
  239. if (this.chkDateTime.Checked)
  240. {
  241. cre.Properties["FHTimeStart"] = this.dtpStartTime.Value;
  242. cre.Properties["FHTimeEnd"] = this.dtpEndTime.Value;
  243. }
  244. cre.Properties["GoodsTypeCode"] = scbGoodsType.SearchedValue + "";
  245. cre.Properties["GoodsCode"] = this.txtGoodsCode.Text.Trim();
  246. cre.Properties["GoodsModel"] = this.txtGoodsModel.Text.Trim();
  247. cre.Properties["LogoIDS"] = this.dkLogoSearchBox1.LogoIDS;
  248. ServiceResultEntity resultEntity = DoAsync<ServiceResultEntity>(() =>
  249. {
  250. return ReportModuleProxy.Service.DoRequest(cre);
  251. });
  252. if (resultEntity == null || resultEntity.Data == null ||
  253. resultEntity.Data.Tables.Count == 0 ||
  254. resultEntity.Data.Tables[0].Rows.Count == 0)
  255. {
  256. this.dgvlc.AutoResizeColumns();
  257. return;
  258. }
  259. else
  260. {
  261. this.dgvlc.DataSource = resultEntity.Data.Tables[0];
  262. this.dgvlc.ReadOnly = true;
  263. this.dgvlc.Rows[0].Selected = true;
  264. this.dgvlc.AutoResizeColumns();
  265. }
  266. }
  267. else if (this.tblScrapTotalModule.SelectedIndex == 5)//裸瓷交接明细表 add by qq 20250605
  268. {
  269. this.dgvlcDetail.DataSource = null;
  270. ClientRequestEntity cre = new ClientRequestEntity();
  271. cre.NameSpace = "R03";
  272. cre.Name = "LCDetail";
  273. cre.Properties["FHUserCode"] = this.txtFHUserCode.Text.Trim();
  274. if (this.chkDateTime.Checked)
  275. {
  276. cre.Properties["FHTimeStart"] = this.dtpStartTime.Value;
  277. cre.Properties["FHTimeEnd"] = this.dtpEndTime.Value;
  278. }
  279. cre.Properties["GoodsTypeCode"] = scbGoodsType.SearchedValue + "";
  280. cre.Properties["GoodsCode"] = this.txtGoodsCode.Text.Trim();
  281. cre.Properties["GoodsModel"] = this.txtGoodsModel.Text.Trim();
  282. cre.Properties["LogoIDS"] = this.dkLogoSearchBox1.LogoIDS;
  283. ServiceResultEntity resultEntity = DoAsync<ServiceResultEntity>(() =>
  284. {
  285. return ReportModuleProxy.Service.DoRequest(cre);
  286. });
  287. if (resultEntity == null || resultEntity.Data == null ||
  288. resultEntity.Data.Tables.Count == 0 ||
  289. resultEntity.Data.Tables[0].Rows.Count == 0)
  290. {
  291. this.dgvlcDetail.AutoResizeColumns();
  292. return;
  293. }
  294. else
  295. {
  296. this.dgvlcDetail.DataSource = resultEntity.Data.Tables[0];
  297. this.dgvlcDetail.ReadOnly = true;
  298. this.dgvlcDetail.Rows[0].Selected = true;
  299. this.dgvlcDetail.AutoResizeColumns();
  300. }
  301. }
  302. }
  303. catch (Exception ex)
  304. {
  305. this.btnSearch.Enabled = true;
  306. // 对异常进行共通处理
  307. ExceptionManager.HandleEventException(this.ToString(),
  308. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  309. }
  310. }
  311. /// <summary>
  312. /// 清空条件按钮事件
  313. /// </summary>
  314. /// <param name="sender"></param>
  315. /// <param name="e"></param>
  316. private void btnClearCondition_Click(object sender, EventArgs e)
  317. {
  318. this.txtOrderNo.Clear();
  319. this.txtFHUserCode.Clear();
  320. this.chkDateTime.Checked = false;
  321. this.dtpStartTime.Value = DateTime.Now.Date;
  322. this.dtpEndTime.Value = DateTime.Now.Date.AddDays(1).AddSeconds(-1);
  323. this.scbGoodsType.ClearValue();
  324. this.txtGoodsCode.Clear();
  325. this.dkLogoSearchBox1.ClearControl();
  326. }
  327. /// <summary>
  328. /// 双击单元格事件
  329. /// </summary>
  330. /// <param name="sender"></param>
  331. /// <param name="e"></param>
  332. private void dgvScrapTotalModule_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
  333. {
  334. try
  335. {
  336. //判断是否为空
  337. if (this.dgvOrder.CurrentRow == null)
  338. {
  339. return;
  340. }
  341. //获取数据信息
  342. DataRowView row = dgvOrder.CurrentRow.DataBoundItem as DataRowView;
  343. //this._orderEntity = _orderCRE;
  344. if (row["fhorderid"] == DBNull.Value)
  345. {
  346. this._orderCRE.OrderID = null;
  347. }
  348. else
  349. {
  350. this._orderCRE.OrderID = Convert.ToInt32(row["fhorderid"]);
  351. }
  352. if (row["goodsid"] == DBNull.Value)
  353. {
  354. this._orderCRE.GoodsID = null;
  355. }
  356. else
  357. {
  358. this._orderCRE.GoodsID = Convert.ToInt32(row["goodsid"]);
  359. }
  360. if (row["logoid"] == DBNull.Value)
  361. {
  362. this._orderCRE.LogoID = null;
  363. }
  364. else
  365. {
  366. this._orderCRE.LogoID = Convert.ToInt32(row["logoid"]);
  367. }
  368. this.dgvOrderDetail.DataSource = null;
  369. this.tblScrapTotalModule.SelectTab(1);
  370. this.dgvOrderDetail.DataSource = GetSearchDetailDataByDouble();
  371. }
  372. catch (Exception ex)
  373. {
  374. this.btnSearch.Enabled = true;
  375. this.btnClearCondition.Enabled = true;
  376. // 对异常进行共通处理
  377. ExceptionManager.HandleEventException(this.ToString(),
  378. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  379. }
  380. }
  381. /// <summary>
  382. /// 复选框按钮事件
  383. /// </summary>
  384. /// <param name="sender"></param>
  385. /// <param name="e"></param>
  386. private void chkDateTime_CheckedChanged(object sender, EventArgs e)
  387. {
  388. this.dtpStartTime.Enabled = chkDateTime.Checked;
  389. this.dtpEndTime.Enabled = chkDateTime.Checked;
  390. }
  391. #endregion
  392. #region 私有方法
  393. /// <summary>
  394. /// 搜索条件
  395. /// </summary>
  396. /// <returns></returns>
  397. private SearchFinishedProductEntity GetOrderEntityFromLayout()
  398. {
  399. this._orderEntity = new SearchFinishedProductEntity();
  400. this._orderEntity.OrderNo = this.txtOrderNo.Text.Trim();
  401. this._orderEntity.FHUserCode = this.txtFHUserCode.Text.Trim();
  402. if (this.chkDateTime.Checked)
  403. {
  404. this._orderEntity.FHTimeStart = this.dtpStartTime.Value;
  405. this._orderEntity.FHTimeEnd = this.dtpEndTime.Value;
  406. }
  407. this._orderEntity.GoodsTypeCode = scbGoodsType.SearchedValue + "";
  408. this._orderEntity.GoodsCode = this.txtGoodsCode.Text.Trim();
  409. this._orderEntity.GoodsModel = this.txtGoodsModel.Text.Trim();
  410. this._orderEntity.LogoIDS = this.dkLogoSearchBox1.LogoIDS;
  411. return this._orderEntity;
  412. }
  413. /// <summary>
  414. /// 明细搜索条件
  415. /// </summary>
  416. /// <returns></returns>
  417. private void CreateSearchConditionDetail()
  418. {
  419. this._rptse = new RPT030102_SE();
  420. this._rptse.ProductionLineID = this._rptse1.ProductionLineID;
  421. this._rptse.GoodsTypeCode = this._rptse1.GoodsTypeCode;
  422. this._rptse.GoodsCode = this._rptse1.GoodsCode;
  423. this._rptse.ProcedureIDS = this._rptse1.ProcedureIDS;
  424. this._rptse.ScrapDateStart = this._rptse1.ScrapDateStart;
  425. this._rptse.ScrapDateEnd = this._rptse1.ScrapDateEnd;
  426. this._rptse.ResponProcedureIDS = this._rptse1.ResponProcedureIDS;
  427. this._rptse.ResponUserIDS = this._rptse1.ResponUserIDS;
  428. this._rptse.CreatUser = this._rptse1.CreatUser;
  429. this._rptse.AuditUser = this._rptse1.AuditUser;
  430. this._rptse.SpecialRepairFlag = this._rptse1.SpecialRepairFlag;
  431. }
  432. /// <summary>
  433. /// 查询损坏汇总表
  434. /// </summary>
  435. private DataTable GetSearchTotalData()
  436. {
  437. try
  438. {
  439. //// 调用服务器端获取数据集
  440. //ServiceResultEntity sre = DoAsync<ServiceResultEntity>(() =>
  441. //{
  442. // return ReportModuleProxy.Service.GetRPT0030112SData(this._orderEntity);
  443. //}
  444. //);
  445. //if (sre.Status == Constant.ServiceResultStatus.Success)
  446. //{
  447. // if (sre.Data.Tables[0].Rows.Count <= Constant.INT_IS_ZERO)
  448. // {
  449. // // 提示未查找到数据
  450. // MessageBox.Show(Messages.MSG_CMN_I002, this.Text,
  451. // MessageBoxButtons.OK, MessageBoxIcon.Warning);
  452. // //清空数据
  453. // return null;
  454. // }
  455. // return sre.Data.Tables[0];
  456. //}
  457. this.dgvOrder.DataSource = null;
  458. ClientRequestEntity cre = new ClientRequestEntity();
  459. cre.NameSpace = "R03";
  460. cre.Name = "R030112Sum";
  461. cre.Properties["OrderNo"] = this.txtOrderNo.Text.Trim();
  462. cre.Properties["FHUserCode"] = this.txtFHUserCode.Text.Trim();
  463. if (this.chkDateTime.Checked)
  464. {
  465. cre.Properties["FHTimeStart"] = this.dtpStartTime.Value;
  466. cre.Properties["FHTimeEnd"] = this.dtpEndTime.Value;
  467. }
  468. cre.Properties["GoodsTypeCode"] = scbGoodsType.SearchedValue + "";
  469. cre.Properties["GoodsCode"] = this.txtGoodsCode.Text.Trim();
  470. cre.Properties["GoodsModel"] = this.txtGoodsModel.Text.Trim();
  471. cre.Properties["LogoIDS"] = this.dkLogoSearchBox1.LogoIDS;
  472. ServiceResultEntity resultEntity = DoAsync<ServiceResultEntity>(() =>
  473. {
  474. return ReportModuleProxy.Service.DoRequest(cre);
  475. });
  476. if (resultEntity == null || resultEntity.Data == null ||
  477. resultEntity.Data.Tables.Count == 0 ||
  478. resultEntity.Data.Tables[0].Rows.Count == 0)
  479. {
  480. this.dgvOrder.AutoResizeColumns();
  481. return null;
  482. }
  483. else
  484. {
  485. this.dgvOrder.DataSource = resultEntity.Data.Tables[0];
  486. this.dgvOrder.ReadOnly = true;
  487. this.dgvOrder.Rows[0].Selected = true;
  488. this.dgvOrder.AutoResizeColumns();
  489. }
  490. return null;
  491. }
  492. catch (Exception ex)
  493. {
  494. throw ex;
  495. }
  496. }
  497. /// <summary>
  498. /// 查询损坏明细表
  499. /// </summary>
  500. private DataTable GetSearchDetailData()
  501. {
  502. try
  503. {
  504. // 调用服务器端获取数据集
  505. ServiceResultEntity sre = DoAsync<ServiceResultEntity>(() =>
  506. {
  507. return ReportModuleProxy.Service.GetRPT0030112DetailSData(this._orderEntity);
  508. }
  509. );
  510. if (sre.Status == Constant.ServiceResultStatus.Success)
  511. {
  512. if (sre.Data.Tables[0].Rows.Count <= Constant.INT_IS_ZERO)
  513. {
  514. // 提示未查找到数据
  515. MessageBox.Show(Messages.MSG_CMN_I002, this.Text,
  516. MessageBoxButtons.OK, MessageBoxIcon.Warning);
  517. //清空数据
  518. return null;
  519. }
  520. return sre.Data.Tables[0];
  521. }
  522. return null;
  523. }
  524. catch (Exception ex)
  525. {
  526. throw ex;
  527. }
  528. }
  529. /// <summary>
  530. /// 查询损坏明细表
  531. /// </summary>
  532. private DataTable GetSearchDetailDataByDouble()
  533. {
  534. try
  535. {
  536. // 调用服务器端获取数据集
  537. ServiceResultEntity sre = DoAsync<ServiceResultEntity>(() =>
  538. {
  539. return ReportModuleProxy.Service.GetRPT0030112DetailSData(this._orderCRE);
  540. }
  541. );
  542. if (sre.Status == Constant.ServiceResultStatus.Success)
  543. {
  544. if (sre.Data.Tables[0].Rows.Count <= Constant.INT_IS_ZERO)
  545. {
  546. // 提示未查找到数据
  547. MessageBox.Show(Messages.MSG_CMN_I002, this.Text,
  548. MessageBoxButtons.OK, MessageBoxIcon.Warning);
  549. //清空数据
  550. return null;
  551. }
  552. return sre.Data.Tables[0];
  553. }
  554. return null;
  555. }
  556. catch (Exception ex)
  557. {
  558. throw ex;
  559. }
  560. }
  561. #endregion
  562. }
  563. }