F_MST_1203.cs 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635
  1. /*******************************************************************************
  2. * Copyright(c) 2014 dongke All rights reserved. / Confidential
  3. * 类的信息:
  4. * 1.程序名称:F_MST_1203.cs
  5. * 2.功能描述:仓库
  6. * 编辑履历:
  7. * 作者 日期 版本 修改内容
  8. * 张忠帅 2024/1/15 1.00 新建
  9. *******************************************************************************/
  10. using System;
  11. using System.Data;
  12. using System.Windows.Forms;
  13. using Dongke.IBOSS.PRD.Basics.BaseResources;
  14. using Dongke.IBOSS.PRD.Basics.BaseControls;
  15. using Dongke.IBOSS.PRD.Client.CommonModule;
  16. using Dongke.IBOSS.PRD.Basics.Library;
  17. using Dongke.IBOSS.PRD.WCF.Proxys;
  18. using Dongke.IBOSS.PRD.Client.DataModels;
  19. using Dongke.IBOSS.PRD.WCF.DataModels;
  20. namespace Dongke.IBOSS.PRD.Client.SystemModule
  21. {
  22. /// <summary>
  23. /// 仓库管理
  24. /// </summary>
  25. public partial class F_MST_1203 : FormBase
  26. {
  27. #region 成员变量
  28. // 窗体的单例模式
  29. private static F_MST_1203 _instance;
  30. // 仓库管理数据源
  31. private DataTable _dtSourse;
  32. #endregion
  33. #region 构造函数
  34. /// <summary>
  35. /// 构造函数
  36. /// </summary>
  37. public F_MST_1203()
  38. {
  39. InitializeComponent();
  40. // 窗口标题
  41. this.Text = FormTitles.F_MST_1203;
  42. // 按钮
  43. this.btnSave.Text = ButtonText.BTN_SAVE;
  44. this.btnCancel.Text = ButtonText.BTN_CLOSE;
  45. }
  46. #endregion
  47. #region 单例模式
  48. /// <summary>
  49. /// 单例模式,防止重复创建窗体
  50. /// </summary>
  51. public static F_MST_1203 Instance
  52. {
  53. get
  54. {
  55. if (_instance == null)
  56. {
  57. _instance = new F_MST_1203();
  58. }
  59. return _instance;
  60. }
  61. }
  62. #endregion
  63. #region 事件
  64. /// <summary>
  65. /// 窗体加载
  66. /// </summary>
  67. /// <param name="sender"></param>
  68. /// <param name="e"></param>
  69. private void F_MST_1203_Load(object sender, System.EventArgs e)
  70. {
  71. try
  72. {
  73. // 设置datagridview不自动创建列
  74. this.dgvDataDefect.AutoGenerateColumns = false;
  75. // 窗体启动立即加载全部仓库信息
  76. this.GetSendWareHouse();
  77. //权限控制
  78. FormPermissionManager.FormPermissionControl(this.Name, this,
  79. LogInUserInfo.CurrentUser.CurrentUserEntity.UserRightData, LogInUserInfo.CurrentUser.CurrentUserEntity.FunctionData);
  80. this.dgvDataDefect.SelectionMode = DataGridViewSelectionMode.RowHeaderSelect;
  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 F_MST_1203_FormClosing(object sender, FormClosingEventArgs e)
  95. {
  96. try
  97. {
  98. // 关闭的时候需要判断是否有数据变化
  99. if (DataJudge.IsChange((DataTable)this.dgvDataDefect.DataSource))
  100. {
  101. DialogResult dialogResult = MessageBox.Show(Messages.MSG_CMN_Q001, this.Text,
  102. MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
  103. // 保存改变的数据
  104. if (dialogResult == DialogResult.Yes)
  105. {
  106. DataGridViewRow row = dgvDataDefect.CurrentRow;
  107. if (!row.IsNewRow)
  108. {
  109. // 判断产品缺陷编码不能为空
  110. if (row.Cells["WAREHOUSECODE"].Value == null
  111. || string.IsNullOrEmpty(row.Cells["WAREHOUSECODE"].Value + string.Empty))
  112. {
  113. // 错误消息
  114. MessageBox.Show(string.Format(Messages.MSG_CMN_W005, "仓库代码"),
  115. this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
  116. e.Cancel = true;
  117. this.btnSave.Enabled = false;
  118. return;
  119. }
  120. // 判断产品缺陷名称不能为空
  121. if (row.Cells["WAREHOUSENAME"].Value == null
  122. || string.IsNullOrEmpty(row.Cells["WAREHOUSENAME"].Value + string.Empty))
  123. {
  124. // 单元格的错误消息
  125. MessageBox.Show(string.Format(Messages.MSG_CMN_W005, "仓库名称"),
  126. this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
  127. e.Cancel = true;
  128. this.btnSave.Enabled = false;
  129. return;
  130. }
  131. // 判断缺陷类别不能为空
  132. if (row.Cells["WAREHOUSETYPE"].Value == null
  133. || string.IsNullOrEmpty(row.Cells["WAREHOUSETYPE"].Value + string.Empty))
  134. {
  135. // 单元格的错误消息
  136. MessageBox.Show(string.Format(Messages.MSG_CMN_W005, "仓库类型"),
  137. this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
  138. e.Cancel = true;
  139. this.btnSave.Enabled = false;
  140. return;
  141. }
  142. }
  143. // 异步处理
  144. object result = DoAsync(new BaseAsyncMethod(SaveDefectData));
  145. if (result.Equals(Constant.INT_IS_ONE))
  146. {
  147. MessageBox.Show(string.Format(Messages.MSG_CMN_W006, "仓库代码"),
  148. this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
  149. e.Cancel = true;
  150. this.btnSave.Enabled = false;
  151. return;
  152. }
  153. // 保存成功,不关闭窗体
  154. if (Convert.ToInt32(result) > Constant.INT_IS_ZERO)
  155. {
  156. e.Cancel = true;
  157. MessageBox.Show(string.Format(Messages.MSG_CMN_I001, "仓库管理", "保存"),
  158. this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
  159. this.btnSave.Enabled = false;
  160. // 加载产品缺陷管理数据
  161. GetSendWareHouse();
  162. }
  163. else if (Convert.ToInt32(result) == (int)Constant.RETURN_IS_EXIST)
  164. {
  165. e.Cancel = true;
  166. MessageBox.Show(string.Format(Messages.MSG_CMN_W006, "仓库代码"),
  167. this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
  168. }
  169. else
  170. {
  171. e.Cancel = true;
  172. MessageBox.Show(string.Format(Messages.MSG_CMN_W001, "仓库管理", "保存"),
  173. this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
  174. }
  175. }
  176. else if (dialogResult == DialogResult.Cancel)
  177. {
  178. e.Cancel = true;
  179. }
  180. }
  181. }
  182. catch (Exception ex)
  183. {
  184. // 对异常进行共通处理
  185. ExceptionManager.HandleEventException(this.ToString(),
  186. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  187. }
  188. }
  189. /// <summary>
  190. /// 窗体关闭后,释放单例资源
  191. /// </summary>
  192. /// <param name="sender"></param>
  193. /// <param name="e"></param>
  194. private void F_MST_1203_FormClosed(object sender, FormClosedEventArgs e)
  195. {
  196. _instance = null;
  197. }
  198. /// <summary>
  199. /// 选中新行时,设置默认值
  200. /// </summary>
  201. /// <param name="sender"></param>
  202. /// <param name="e"></param>
  203. private void dgvDataDefect_DefaultValuesNeeded(object sender, DataGridViewRowEventArgs e)
  204. {
  205. // 设置有效属性为选中状态
  206. e.Row.Cells["ValueFlag"].Value = Constant.INT_IS_ONE;
  207. }
  208. /// <summary>
  209. /// 仓库管理信息输入格式控制
  210. /// </summary>
  211. /// <param name="sender"></param>
  212. /// <param name="e"></param>
  213. private void dgvDataDefect_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
  214. {
  215. try
  216. {
  217. TextBox tb = (e.Control as TextBox);
  218. if (tb != null)
  219. {
  220. if ("WAREHOUSECODE" == this.dgvDataDefect.Columns[this.dgvDataDefect.CurrentCell.ColumnIndex].Name)
  221. {
  222. tb.CharacterCasing = CharacterCasing.Upper;
  223. }
  224. else
  225. {
  226. tb.CharacterCasing = CharacterCasing.Normal;
  227. }
  228. }
  229. }
  230. catch (Exception ex)
  231. {
  232. // 对异常进行共通处理
  233. ExceptionManager.HandleEventException(this.ToString(),
  234. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  235. }
  236. }
  237. /// <summary>
  238. /// 单元格验证,检查
  239. /// </summary>
  240. /// <param name="sender"></param>
  241. /// <param name="e"></param>
  242. private void dgvDataDefect_CellValidating(object sender, DataGridViewCellValidatingEventArgs e)
  243. {
  244. try
  245. {
  246. if (this.ActiveControl != null && "btnClose".Equals(this.ActiveControl.Name))
  247. {
  248. return;
  249. }
  250. if (!dgvDataDefect.CurrentRow.IsNewRow)
  251. {
  252. DataGridViewRow rowItem = dgvDataDefect.Rows[e.RowIndex];
  253. DataGridViewColumn columnItem = dgvDataDefect.Columns[e.ColumnIndex];
  254. object columnvalue = rowItem.Cells[columnItem.Name].EditedFormattedValue;
  255. // 仓库编码
  256. if ("WAREHOUSECODE".Equals(columnItem.Name))
  257. {
  258. if (columnvalue != null && !string.IsNullOrEmpty(columnvalue + string.Empty))
  259. {
  260. if (!Utility.IsUnique(columnvalue.ToString(),
  261. dgvDataDefect.CurrentRow.Index, this.dgvDataDefect, "WAREHOUSECODE"))
  262. {
  263. // 单元格的错误消息
  264. this.dgvDataDefect.CurrentRow.ErrorText = string.Format(
  265. Messages.MSG_CMN_W006, "仓库编码");
  266. e.Cancel = true;
  267. this.btnSave.Enabled = false;
  268. return;
  269. }
  270. }
  271. }
  272. // 清除单元格的错误消息
  273. this.dgvDataDefect.CurrentRow.ErrorText = string.Empty;
  274. }
  275. }
  276. catch (Exception ex)
  277. {
  278. // 对异常进行共通处理
  279. ExceptionManager.HandleEventException(this.ToString(),
  280. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  281. }
  282. }
  283. /// <summary>
  284. /// 根据数据是否变化,设置保存按钮的可用状态
  285. /// </summary>
  286. /// <param name="sender"></param>
  287. /// <param name="e"></param>
  288. private void dgvDataDefect_CellValidated(object sender, DataGridViewCellEventArgs e)
  289. {
  290. try
  291. {
  292. this.SetSaveBtnStatus();
  293. }
  294. catch (Exception ex)
  295. {
  296. // 对异常进行共通处理
  297. ExceptionManager.HandleEventException(this.ToString(),
  298. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  299. }
  300. }
  301. /// <summary>
  302. /// 行校验
  303. /// </summary>
  304. /// <param name="sender"></param>
  305. /// <param name="e"></param>
  306. private void dgvDataDefect_RowValidating(object sender, DataGridViewCellCancelEventArgs e)
  307. {
  308. try
  309. {
  310. // 按Esc键时不校验
  311. if (!dgvDataDefect.IsCurrentRowDirty)
  312. {
  313. this.dgvDataDefect.IsSetInputColumnsColor = true;
  314. return;
  315. }
  316. if (this.ActiveControl != null && "btnClose".Equals(this.ActiveControl.Name))
  317. {
  318. // 清除单元格的错误消息
  319. this.dgvDataDefect.CurrentRow.ErrorText = string.Empty;
  320. return;
  321. }
  322. DataGridViewRow row = dgvDataDefect.CurrentRow;
  323. if (!row.IsNewRow)
  324. {
  325. // 判断仓库编码能为空
  326. if (row.Cells["WAREHOUSECODE"].Value == null
  327. || string.IsNullOrEmpty(row.Cells["WAREHOUSECODE"].Value + string.Empty))
  328. {
  329. // 单元格的错误消息
  330. this.dgvDataDefect.CurrentRow.ErrorText = string.Format(Messages.MSG_CMN_W005, "仓库编码");
  331. e.Cancel = true;
  332. this.btnSave.Enabled = false;
  333. return;
  334. }
  335. // 判断仓库名称不能为空
  336. if (row.Cells["WAREHOUSENAME"].Value == null
  337. || string.IsNullOrEmpty(row.Cells["WAREHOUSENAME"].Value + string.Empty))
  338. {
  339. // 单元格的错误消息
  340. this.dgvDataDefect.CurrentRow.ErrorText = string.Format(Messages.MSG_CMN_W005, "仓库名称");
  341. e.Cancel = true;
  342. this.btnSave.Enabled = false;
  343. return;
  344. }
  345. // 判断仓库类别不能为空
  346. if (row.Cells["WAREHOUSETYPE"].Value == null
  347. || string.IsNullOrEmpty(row.Cells["WAREHOUSETYPE"].Value + string.Empty))
  348. {
  349. // 单元格的错误消息
  350. this.dgvDataDefect.CurrentRow.ErrorText = string.Format(Messages.MSG_CMN_W005, "仓库类型");
  351. e.Cancel = true;
  352. this.btnSave.Enabled = false;
  353. return;
  354. }
  355. // 清除单元格的错误消息
  356. this.dgvDataDefect.CurrentRow.ErrorText = string.Empty;
  357. }
  358. }
  359. catch (Exception ex)
  360. {
  361. // 对异常进行共通处理
  362. ExceptionManager.HandleEventException(this.ToString(),
  363. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  364. }
  365. }
  366. /// <summary>
  367. /// 根据数据是否变化,设置保存按钮的可用状态
  368. /// </summary>
  369. /// <param name="sender"></param>
  370. /// <param name="e"></param>
  371. private void dgvDataDefect_RowValidated(object sender, DataGridViewCellEventArgs e)
  372. {
  373. try
  374. {
  375. this.SetSaveBtnStatus();
  376. }
  377. catch (Exception ex)
  378. {
  379. // 对异常进行共通处理
  380. ExceptionManager.HandleEventException(this.ToString(),
  381. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  382. }
  383. }
  384. /// <summary>
  385. /// 根据是否选中停用数据,加载数据
  386. /// </summary>
  387. /// <param name="sender"></param>
  388. /// <param name="e"></param>
  389. private void chkDisplayDisabledData_CheckedChanged(object sender, EventArgs e)
  390. {
  391. try
  392. {
  393. this.SetSaveBtnStatus();
  394. this.dgvDataDefect.IsSetInputColumnsColor = true;
  395. }
  396. catch (Exception ex)
  397. {
  398. // 对异常进行共通处理
  399. ExceptionManager.HandleEventException(this.ToString(),
  400. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  401. }
  402. }
  403. /// <summary>
  404. /// 单元格输入时,给自动生成的行设置颜色
  405. /// </summary>
  406. /// <param name="sender"></param>
  407. /// <param name="e"></param>
  408. private void dgvDataDefect_UserAddedRow(object sender, DataGridViewRowEventArgs e)
  409. {
  410. this.dgvDataDefect.IsSetInputColumnsColor = true;
  411. }
  412. /// <summary>
  413. /// 设置排序时列表的颜色
  414. /// </summary>
  415. private void dgvDataDefect_Sorted(object sender, EventArgs e)
  416. {
  417. this.dgvDataDefect.IsSetInputColumnsColor = true;
  418. }
  419. /// <summary>
  420. /// 保存仓库数据
  421. /// </summary>
  422. /// <param name="sender"></param>
  423. /// <param name="e"></param>
  424. private void btnSave_Click(object sender, EventArgs e)
  425. {
  426. try
  427. {
  428. int results = Conservation();
  429. //判断单元格必输项不能为空
  430. if (results == Constant.INT_IS_ONE)
  431. {
  432. MessageBox.Show(string.Format(Messages.MSG_CMN_W005, "仓库代码"),
  433. this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
  434. this.btnSave.Enabled = false;
  435. return;
  436. }
  437. if (results == Constant.INT_IS_TWO)
  438. {
  439. MessageBox.Show(string.Format(Messages.MSG_CMN_W005, "仓库名称"),
  440. this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
  441. this.btnSave.Enabled = false;
  442. return;
  443. }
  444. if (results == Constant.INT_IS_THREE)
  445. {
  446. MessageBox.Show(string.Format(Messages.MSG_CMN_W005, "仓库类别"),
  447. this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
  448. this.btnSave.Enabled = false;
  449. return;
  450. }
  451. // 异步处理
  452. this.btnSave.Enabled = false;
  453. this.btnCancel.Enabled = false;
  454. int result = (int)DoAsync(new BaseAsyncMethod(SaveDefectData));
  455. this.btnSave.Enabled = true;
  456. this.btnCancel.Enabled = true;
  457. // 产品缺陷数据保存成功
  458. if (result == Constant.INT_IS_TWO)
  459. {
  460. MessageBox.Show(string.Format(Messages.MSG_CMN_I001, "仓库管理", "保存"),
  461. this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
  462. // 加载产品缺陷管理数据
  463. GetSendWareHouse();
  464. this.btnSave.Enabled = false;
  465. }
  466. else if (result == Constant.INT_IS_ONE)
  467. {
  468. MessageBox.Show(string.Format(Messages.MSG_CMN_W006, "仓库代码"),
  469. this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
  470. return;
  471. }
  472. else
  473. {
  474. MessageBox.Show(string.Format(Messages.MSG_CMN_W001, "仓库管理", "保存"),
  475. this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
  476. }
  477. this.dgvDataDefect.IsSetInputColumnsColor = true;
  478. }
  479. catch (Exception ex)
  480. {
  481. this.btnSave.Enabled = true;
  482. this.btnCancel.Enabled = true;
  483. // 对异常进行共通处理
  484. ExceptionManager.HandleEventException(this.ToString(),
  485. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  486. }
  487. }
  488. /// <summary>
  489. /// 点击关闭按钮
  490. /// </summary>
  491. /// <param name="sender"></param>
  492. /// <param name="e"></param>
  493. private void btnCancel_Click(object sender, EventArgs e)
  494. {
  495. this.Close();
  496. }
  497. #endregion
  498. #region 私有方法
  499. /// <summary>
  500. /// 获取产品缺陷管理的全部数据
  501. /// </summary>
  502. /// <param name="sUserInfo">用户信息</param>
  503. /// <returns></returns>
  504. /// <remarks>
  505. /// 2014.10.30 任海 新建
  506. /// </remarks>
  507. private void GetSendWareHouse()
  508. {
  509. try
  510. {
  511. ClientRequestEntity cre = new ClientRequestEntity();
  512. cre.NameSpace = "F_MST_1203";
  513. cre.Name = "GetSendWareHouse";
  514. ServiceResultEntity sre = CommonModuleProxy.Service.DoRequest(cre);
  515. if (sre.Status == Constant.ServiceResultStatus.NoSearchResults ||
  516. sre.Data == null || sre.Data.Tables.Count == 0 || sre.Data.Tables[0].Rows.Count == 0)
  517. {
  518. // 提示未查找到数据
  519. MessageBox.Show(Messages.MSG_CMN_I002, this.Text,
  520. MessageBoxButtons.OK, MessageBoxIcon.Information);
  521. }
  522. dgvDataDefect.DataSource = sre.Data.Tables[0];
  523. }
  524. catch (Exception ex)
  525. {
  526. throw ex;
  527. }
  528. }
  529. /// <summary>
  530. /// 保存数据
  531. /// </summary>
  532. /// <returns>是否成功</returns>
  533. private object SaveDefectData()
  534. {
  535. try
  536. {
  537. // 获取当前dataDefectData数据源
  538. DataTable dataDefectData = new DataTable();
  539. DataSet ds = new DataSet();
  540. dataDefectData = ((DataTable)this.dgvDataDefect.DataSource).Copy();
  541. ds.Tables.Add(dataDefectData);
  542. ClientRequestEntity cre = new ClientRequestEntity();
  543. cre.NameSpace = "F_MST_1203";
  544. cre.Name = "AddSendWareHouse";
  545. cre.Data = ds;
  546. ServiceResultEntity sre = CommonModuleProxy.Service.DoRequest(cre);
  547. return sre.Result;
  548. }
  549. catch (Exception ex)
  550. {
  551. throw ex;
  552. }
  553. }
  554. /// <summary>
  555. /// 设置保存按钮的可用状态
  556. /// </summary>
  557. private void SetSaveBtnStatus()
  558. {
  559. if (DataJudge.IsChange((DataTable)this.dgvDataDefect.DataSource))
  560. {
  561. this.btnSave.Enabled = true;
  562. }
  563. else
  564. {
  565. this.btnSave.Enabled = false;
  566. }
  567. }
  568. /// <summary>
  569. /// 保存时单元格必输项不能为空
  570. /// </summary>
  571. private int Conservation()
  572. {
  573. int isConservation = Constant.INT_IS_ZERO;
  574. DataTable dataDefectData = (DataTable)this.dgvDataDefect.DataSource;
  575. foreach (DataRow drproductionData in dataDefectData.Rows)
  576. {
  577. //判断必输项是否为空
  578. if (drproductionData["WAREHOUSECODE"].ToString() == string.Empty)
  579. {
  580. isConservation = Constant.INT_IS_ONE;
  581. break;
  582. }
  583. if (drproductionData["WAREHOUSENAME"].ToString() == string.Empty)
  584. {
  585. isConservation = Constant.INT_IS_TWO;
  586. break;
  587. }
  588. if (drproductionData["WAREHOUSETYPE"].ToString() == string.Empty)
  589. {
  590. isConservation = Constant.INT_IS_THREE;
  591. break;
  592. }
  593. }
  594. return isConservation;
  595. }
  596. #endregion
  597. }
  598. }