F_MST_0501.cs 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620
  1. /*******************************************************************************
  2. * Copyright(c) 2014 DongkeSoft All rights reserved. / Confidential
  3. * 类的信息:
  4. * 1.程序名称:F_MST_0501.cs
  5. * 2.功能描述:产品档案
  6. * 编辑履历:
  7. * 作者 日期 版本 修改内容
  8. * 庄天威 2014/09/13 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.DockPanel;
  15. using Dongke.IBOSS.PRD.Client.CommonModule;
  16. using Dongke.IBOSS.PRD.WCF.DataModels;
  17. using Dongke.IBOSS.PRD.WCF.Proxys;
  18. namespace Dongke.IBOSS.PRD.Client.SystemModule
  19. {
  20. /// <summary>
  21. /// 产品档案
  22. /// </summary>
  23. public partial class F_MST_0501 : DockPanelBase
  24. {
  25. #region 成员变量
  26. private static F_MST_0501 _instance; //单例模式
  27. private int? _glazeTypeID = null; //釉料类别
  28. private Boolean _PlateLimit = false; //装板权限
  29. private Boolean _Edit = false; //编辑权限
  30. #endregion
  31. #region 构造函数
  32. public F_MST_0501()
  33. {
  34. InitializeComponent();
  35. this.dgvGoods.AutoGenerateColumns = false;
  36. this.dgvGoodsSap.AutoGenerateColumns = false;
  37. this.Text = FormTitles.F_MST_0501;
  38. this.btnSearch.Text = ButtonText.BTN_SEARCH;
  39. this.btnClearCondition.Text = ButtonText.BTN_CLEARCONDITION;
  40. this.tsbtnAdd.Text = ButtonText.TSBTN_ADD;
  41. this.tsbtnEdit.Text = ButtonText.TSBTN_EDIT;
  42. this.tsbtnClose.Text = ButtonText.TSBTN_CLOSE;
  43. this.tsbtnAdaptive.Text = ButtonText.TSBTN_ADAPTIVE;
  44. this.tsbtnAttachment.Text = ButtonText.TSBTN_ATTACHMENT;
  45. }
  46. #endregion
  47. #region 单例模式
  48. /// <summary>
  49. /// 单例模式,防止重复创建窗体
  50. /// </summary>
  51. public static F_MST_0501 Instance
  52. {
  53. get
  54. {
  55. if (_instance == null)
  56. {
  57. _instance = new F_MST_0501();
  58. }
  59. return _instance;
  60. }
  61. }
  62. #endregion
  63. #region 事件
  64. /// <summary>
  65. /// 窗体加载
  66. /// </summary>
  67. private void F_MST_0501_Load(object sender, EventArgs e)
  68. {
  69. try
  70. {
  71. // 加载权限
  72. FormPermissionManager.FormPermissionControl(this.Name, this,
  73. Dongke.IBOSS.PRD.Client.DataModels.LogInUserInfo.CurrentUser.CurrentUserEntity.UserRightData,
  74. Dongke.IBOSS.PRD.Client.DataModels.LogInUserInfo.CurrentUser.CurrentUserEntity.FunctionData);
  75. this.chkCeaseFlag.AllItemCheck();
  76. this.chkValueFlag.AllItemCheck();
  77. this.chkPlanFlag.AllItemCheck();
  78. this.LoadDataSource();
  79. //装板限制数量权限
  80. PlateLimitNumPrivileges();
  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. private void btnSearch_Click(object sender, EventArgs e)
  93. {
  94. try
  95. {
  96. this.dgvGoods.DataSource = null;
  97. this.dgvGoodsSap.DataSource = null;
  98. this._glazeTypeID = this.ddlGlazeTypeID.SelectedValue == null
  99. ? null : (int?)Convert.ToInt32(this.ddlGlazeTypeID.SelectedValue);
  100. object obGoodsResult = DoAsync(new Dongke.IBOSS.PRD.Basics.DockPanel.AsyncMethod(getGoods));
  101. if (obGoodsResult != null)
  102. {
  103. DataSet dsGoods = (DataSet)obGoodsResult;
  104. if (dsGoods.Tables.Count != Constant.INT_IS_ZERO)
  105. {
  106. this.dgvGoods.DataSource = dsGoods.Tables[Constant.INT_IS_ZERO];
  107. this.dgvGoods.ReadOnly = true;
  108. this.dgvGoodsSap.ReadOnly = true;
  109. if (this.dgvGoods.Rows.Count == Constant.INT_IS_ZERO)
  110. {
  111. // 提示未查找到数据
  112. MessageBox.Show(Messages.MSG_CMN_I002, this.Text,
  113. MessageBoxButtons.OK, MessageBoxIcon.Information);
  114. }
  115. }
  116. }
  117. else
  118. {
  119. // 提示未查找到数据
  120. MessageBox.Show(Messages.MSG_CMN_I002, this.Text,
  121. MessageBoxButtons.OK, MessageBoxIcon.Information);
  122. }
  123. }
  124. catch (Exception ex)
  125. {
  126. // 对异常进行共通处理
  127. ExceptionManager.HandleEventException(this.ToString(),
  128. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  129. }
  130. }
  131. /// <summary>
  132. /// 清空事件
  133. /// </summary>
  134. private void btnClearCondition_Click(object sender, EventArgs e)
  135. {
  136. this.txtGoodsCode.Text = "";
  137. this.txtGoodsModel.Text = "";
  138. this.txtGoodsName.Text = "";
  139. this.txtGoodsSpecification.Text = "";
  140. this.ddlGlazeTypeID.Text = "";
  141. this.txtRemarks.Text = "";
  142. this.scbGoodsType.ClearValue();
  143. this.chkCeaseFlag.AllItemCheck();
  144. this.chkValueFlag.AllItemCheck();
  145. this.chkPlanFlag.AllItemCheck();
  146. }
  147. /// <summary>
  148. /// 关闭窗体事件
  149. /// </summary>
  150. private void tsbtnClose_Click(object sender, EventArgs e)
  151. {
  152. this.Close();
  153. }
  154. /// <summary>
  155. /// 自适应事件
  156. /// </summary>
  157. private void tsbtnAdaptive_Click(object sender, EventArgs e)
  158. {
  159. this.dgvGoods.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells);
  160. dgvGoodsSap.AutoResizeColumns();
  161. }
  162. /// <summary>
  163. /// 窗体关闭事件
  164. /// </summary>
  165. private void F_MST_0501_FormClosed(object sender, FormClosedEventArgs e)
  166. {
  167. _instance = null;
  168. }
  169. /// <summary>
  170. /// 添加产品事件
  171. /// </summary>
  172. private void tsbtnAddGoods_Click(object sender, EventArgs e)
  173. {
  174. try
  175. {
  176. F_MST_0502 frmMST0502 = new F_MST_0502(Constant.FormMode.Add, Constant.INT_IS_ZERO,0);
  177. DialogResult dialogresult = frmMST0502.ShowDialog();
  178. if (dialogresult.Equals(DialogResult.OK))
  179. {
  180. this.dgvGoods.DataSource = null;
  181. object obGoodsResult = DoAsync(new Dongke.IBOSS.PRD.Basics.DockPanel.AsyncMethod(getGoods));
  182. if (obGoodsResult != null)
  183. {
  184. DataSet dsGoods = (DataSet)obGoodsResult;
  185. if (dsGoods.Tables.Count != Constant.INT_IS_ZERO)
  186. {
  187. this.dgvGoods.DataSource = dsGoods.Tables[Constant.INT_IS_ZERO];
  188. this.dgvGoods.ReadOnly = true;
  189. }
  190. }
  191. }
  192. }
  193. catch (Exception ex)
  194. {
  195. // 对异常进行共通处理
  196. ExceptionManager.HandleEventException(this.ToString(),
  197. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  198. }
  199. }
  200. /// <summary>
  201. /// 编辑产品事件
  202. /// </summary>
  203. private void tsbtnEditGoods_Click(object sender, EventArgs e)
  204. {
  205. try
  206. {
  207. DataGridViewRow currentRow = this.dgvGoods.CurrentRow;
  208. if (currentRow != null)
  209. {
  210. int goodsId = Convert.ToInt32(currentRow.Cells["GoodsID"].Value);
  211. F_MST_0502 frmMST0502 = new F_MST_0502(Constant.FormMode.Edit, goodsId,0);
  212. DialogResult dialogresult = frmMST0502.ShowDialog();
  213. if (dialogresult.Equals(DialogResult.OK))
  214. {
  215. this.dgvGoods.DataSource = null;
  216. object obGoodsResult = DoAsync(new Dongke.IBOSS.PRD.Basics.DockPanel.AsyncMethod(getGoods));
  217. if (obGoodsResult != null)
  218. {
  219. DataSet dsGoods = (DataSet)obGoodsResult;
  220. if (dsGoods.Tables.Count != Constant.INT_IS_ZERO)
  221. {
  222. this.dgvGoods.DataSource = dsGoods.Tables[Constant.INT_IS_ZERO];
  223. this.dgvGoods.ReadOnly = true;
  224. }
  225. }
  226. }
  227. }
  228. else
  229. {
  230. MessageBox.Show(Messages.MSG_CMN_W020, this.Text,
  231. MessageBoxButtons.OK, MessageBoxIcon.Warning);
  232. }
  233. }
  234. catch (Exception ex)
  235. {
  236. // 对异常进行共通处理
  237. ExceptionManager.HandleEventException(this.ToString(),
  238. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  239. }
  240. }
  241. /// <summary>
  242. /// 双击列表事件
  243. /// </summary>
  244. private void dgvGoods_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
  245. {
  246. try
  247. {
  248. if (e.RowIndex == -Constant.INT_IS_ONE || e.ColumnIndex == -Constant.INT_IS_ONE)
  249. {
  250. return;
  251. }
  252. int goodsId = Convert.ToInt32(this.dgvGoods.Rows[e.RowIndex].Cells["GoodsID"].Value);
  253. int EditPlateLimit = 0;
  254. if (_PlateLimit = true && _Edit == false)
  255. {
  256. EditPlateLimit = 1;
  257. }
  258. else if (_Edit == true)
  259. {
  260. EditPlateLimit = 0;
  261. }
  262. else {
  263. return;
  264. }
  265. F_MST_0502 frmMST0702 = new F_MST_0502(Constant.FormMode.Edit, goodsId, EditPlateLimit);
  266. DialogResult dialogresult = frmMST0702.ShowDialog();
  267. if (dialogresult.Equals(DialogResult.OK))
  268. {
  269. this.dgvGoods.DataSource = null;
  270. object obGoodsResult = DoAsync(new Dongke.IBOSS.PRD.Basics.DockPanel.AsyncMethod(getGoods));
  271. if (obGoodsResult != null)
  272. {
  273. DataSet dsGoods = (DataSet)obGoodsResult;
  274. if (dsGoods.Tables.Count != Constant.INT_IS_ZERO)
  275. {
  276. this.dgvGoods.DataSource = dsGoods.Tables[Constant.INT_IS_ZERO];
  277. this.dgvGoods.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 tsbtnAttachment_Click(object sender, EventArgs e)
  295. {
  296. try
  297. {
  298. DataGridViewRow currentRow = this.dgvGoods.CurrentRow;
  299. if (currentRow != null)
  300. {
  301. int goodsId = Convert.ToInt32(currentRow.Cells["GoodsID"].Value);
  302. F_CMN_0101 frmCMN0101 = new F_CMN_0101(goodsId);
  303. DialogResult dialogresult = frmCMN0101.ShowDialog();
  304. if (dialogresult.Equals(DialogResult.OK))
  305. {
  306. }
  307. }
  308. else
  309. {
  310. MessageBox.Show(Messages.MSG_CMN_W020, this.Text,
  311. MessageBoxButtons.OK, MessageBoxIcon.Warning);
  312. }
  313. }
  314. catch (Exception ex)
  315. {
  316. // 对异常进行共通处理
  317. ExceptionManager.HandleEventException(this.ToString(),
  318. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  319. }
  320. }
  321. /// <summary>
  322. /// 设置产品工序
  323. /// </summary>
  324. /// <param name="sender"></param>
  325. /// <param name="e"></param>
  326. private void tsbtnSet_Click(object sender, EventArgs e)
  327. {
  328. try
  329. {
  330. DataTable data = this.dgvGoods.DataSource as DataTable;
  331. if (data == null || data.Rows.Count == 0)
  332. {
  333. return;
  334. }
  335. data = data.Copy();
  336. F_MST_0503 fMST0503 = new F_MST_0503(1, data);
  337. fMST0503.ShowDialog();
  338. }
  339. catch (Exception ex)
  340. {
  341. // 对异常进行共通处理
  342. ExceptionManager.HandleEventException(this.ToString(),
  343. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  344. }
  345. }
  346. private void tsbtnSetQC_Click(object sender, EventArgs e)
  347. {
  348. try
  349. {
  350. DataTable data = this.dgvGoods.DataSource as DataTable;
  351. if (data == null || data.Rows.Count == 0)
  352. {
  353. return;
  354. }
  355. data = data.Copy();
  356. F_MST_0504 fMST0503 = new F_MST_0504(1, data);
  357. fMST0503.ShowDialog();
  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 tsbtnUndo_Click(object sender, EventArgs e)
  372. {
  373. try
  374. {
  375. DataTable data = this.dgvGoods.DataSource as DataTable;
  376. if (data == null || data.Rows.Count == 0)
  377. {
  378. return;
  379. }
  380. data = data.Copy();
  381. F_MST_0503 fMST0503 = new F_MST_0503(2, data);
  382. fMST0503.ShowDialog();
  383. }
  384. catch (Exception ex)
  385. {
  386. // 对异常进行共通处理
  387. ExceptionManager.HandleEventException(this.ToString(),
  388. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  389. }
  390. }
  391. /// <summary>
  392. /// 行切换事件
  393. /// </summary>
  394. /// <param name="sender"></param>
  395. /// <param name="e"></param>
  396. private void dgvGoods_SelectionChanged(object sender, EventArgs e)
  397. {
  398. if (this.dgvGoods.DataSource == null || this.dgvGoods.CurrentRow == null)
  399. {
  400. this.dgvGoodsSap.DataSource = null;
  401. return;
  402. }
  403. try
  404. {
  405. int goodsid = Convert.ToInt32(this.dgvGoods.CurrentRow.Cells["GoodsID"].Value);
  406. ClientRequestEntity cre = new ClientRequestEntity();
  407. cre.NameSpace = "MST_Goods";
  408. cre.Name = "GetGoodsSAP";
  409. cre.Request = goodsid;
  410. // 调用服务器端获取数据集
  411. ServiceResultEntity sre = SystemModuleProxy.Service.DoRequest(cre);
  412. if (sre != null && sre.Data != null && sre.Data.Tables.Count > 0)
  413. {
  414. this.dgvGoodsSap.DataSource = sre.Data.Tables[0];
  415. }
  416. }
  417. catch (Exception ex)
  418. {
  419. // 对异常进行共通处理
  420. ExceptionManager.HandleEventException(this.ToString(),
  421. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  422. }
  423. }
  424. //编辑装板
  425. private void toolStripButton1_Click(object sender, EventArgs e)
  426. {
  427. try
  428. {
  429. DataGridViewRow currentRow = this.dgvGoods.CurrentRow;
  430. if (currentRow != null)
  431. {
  432. int goodsId = Convert.ToInt32(currentRow.Cells["GoodsID"].Value);
  433. F_MST_0502 frmMST0502 = new F_MST_0502(Constant.FormMode.Edit, goodsId,1);
  434. DialogResult dialogresult = frmMST0502.ShowDialog();
  435. if (dialogresult.Equals(DialogResult.OK))
  436. {
  437. this.dgvGoods.DataSource = null;
  438. object obGoodsResult = DoAsync(new Dongke.IBOSS.PRD.Basics.DockPanel.AsyncMethod(getGoods));
  439. if (obGoodsResult != null)
  440. {
  441. DataSet dsGoods = (DataSet)obGoodsResult;
  442. if (dsGoods.Tables.Count != Constant.INT_IS_ZERO)
  443. {
  444. this.dgvGoods.DataSource = dsGoods.Tables[Constant.INT_IS_ZERO];
  445. this.dgvGoods.ReadOnly = true;
  446. }
  447. }
  448. }
  449. }
  450. else
  451. {
  452. MessageBox.Show(Messages.MSG_CMN_W020, this.Text,
  453. MessageBoxButtons.OK, MessageBoxIcon.Warning);
  454. }
  455. }
  456. catch (Exception ex)
  457. {
  458. // 对异常进行共通处理
  459. ExceptionManager.HandleEventException(this.ToString(),
  460. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  461. }
  462. }
  463. #endregion
  464. #region 私有方法
  465. /// <summary>
  466. /// 根据查询条件获取数据集合
  467. /// </summary>
  468. public DataSet getGoods()
  469. {
  470. try
  471. {
  472. GoodsEntity goods = new GoodsEntity();
  473. goods.GoodsCode = this.txtGoodsCode.Text;
  474. goods.GoodsModel = this.txtGoodsModel.Text;
  475. goods.GoodsName = this.txtGoodsName.Text;
  476. goods.GoodsSpecification = this.txtGoodsSpecification.Text;
  477. goods.GlazeTypeID = this._glazeTypeID;
  478. goods.Remarks = this.txtRemarks.Text;
  479. goods.GoodsTypeCode = this.scbGoodsType.SearchedValue + "";
  480. //判断选择框,如有选择则赋值
  481. object[] objListCease = chkCeaseFlag.SelectedValues;
  482. if (objListCease.Length == Constant.INT_IS_ONE)
  483. {
  484. goods.CeaseFlag = (int)objListCease[Constant.INT_IS_ZERO];
  485. }
  486. else if (objListCease.Length == Constant.INT_IS_ZERO)
  487. {
  488. return null;
  489. }
  490. object[] objListValue = chkValueFlag.SelectedValues;
  491. if (objListValue.Length == Constant.INT_IS_ONE)
  492. {
  493. goods.ValueFlag = (int)objListValue[Constant.INT_IS_ZERO];
  494. }
  495. else if (objListValue.Length == Constant.INT_IS_ZERO)
  496. {
  497. return null;
  498. }
  499. object[] objPlanFlag = chkPlanFlag.SelectedValues;
  500. if (objPlanFlag.Length == 1)
  501. {
  502. goods.PlanFlag = objPlanFlag[0].ToString();
  503. }
  504. else if (objPlanFlag.Length == Constant.INT_IS_ZERO)
  505. {
  506. return null;
  507. }
  508. return SystemModuleProxy.Service.SerachGoods(goods);
  509. }
  510. catch (Exception ex)
  511. {
  512. throw ex;
  513. }
  514. }
  515. /// <summary>
  516. /// 加载页面所需的数据源
  517. /// </summary>
  518. private void LoadDataSource()
  519. {
  520. try
  521. {
  522. // 绑定釉料类别
  523. DataTable dtGlazeType = SystemModuleProxy.Service.GetDataDictionaryByType(
  524. Constant.DictionaryType.TPC002, Constant.INT_IS_ONE);
  525. if (dtGlazeType != null)
  526. {
  527. ddlGlazeTypeID.DisplayMember = "DictionaryValue";
  528. ddlGlazeTypeID.ValueMember = "DictionaryID";
  529. ddlGlazeTypeID.DataSource = dtGlazeType;
  530. ddlGlazeTypeID.SelectedText = "";
  531. ddlGlazeTypeID.Text = "";
  532. }
  533. }
  534. catch (Exception ex)
  535. {
  536. throw ex;
  537. }
  538. }
  539. ///<summary>
  540. ///修改装板数量权限
  541. /// </summary>
  542. private void PlateLimitNumPrivileges()
  543. {
  544. ClientRequestEntity cre = new ClientRequestEntity();
  545. cre.NameSpace = "MST_PlateLimitNum";
  546. cre.Name = "PlateLimitNumPrivileges";
  547. // 调用服务器端获取数据集
  548. ServiceResultEntity sre = SystemModuleProxy.Service.DoRequest(cre);
  549. if (sre != null && sre.Data != null && sre.Data.Tables.Count > 0)
  550. {
  551. this.tsbtnAdd.Enabled = false;
  552. this.tsbtnEdit.Enabled = false;
  553. this.tsbtnAttachment.Enabled = false;
  554. this.tsEditPlateLimitNum.Enabled = false;
  555. this.tsbtnSetQC.Enabled = false;
  556. this.tsbtnUndo.Enabled = false;
  557. for (int i = 0; i < sre.Data.Tables[0].Rows.Count; i++)
  558. {
  559. //附件
  560. if (sre.Data.Tables[0].Rows[i]["FUNCTIONCODE"].ToString() == "01030305")
  561. {
  562. this.tsbtnAttachment.Enabled = true;
  563. this.tsbtnSetQC.Enabled = true;
  564. this.tsbtnUndo.Enabled = true;
  565. }
  566. //新建
  567. else if (sre.Data.Tables[0].Rows[i]["FUNCTIONCODE"].ToString() == "01030301")
  568. {
  569. this.tsbtnAdd.Enabled = true;
  570. this.tsbtnSetQC.Enabled = true;
  571. this.tsbtnUndo.Enabled = true;
  572. }
  573. //编辑
  574. else if (sre.Data.Tables[0].Rows[i]["FUNCTIONCODE"].ToString() == "01030302")
  575. {
  576. this.tsbtnEdit.Enabled = true;
  577. this.tsbtnSetQC.Enabled = true;
  578. this.tsbtnUndo.Enabled = true;
  579. _Edit = true;
  580. }
  581. //编辑装板数量
  582. else if (sre.Data.Tables[0].Rows[i]["FUNCTIONCODE"].ToString() == "01030303")
  583. {
  584. this.tsEditPlateLimitNum.Enabled = true;
  585. _PlateLimit = true;
  586. }
  587. }
  588. }
  589. }
  590. #endregion
  591. }
  592. }