F_MST_0409.cs 24 KB

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