CraftOrdFdPicMCtrl.cs 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Drawing;
  5. using System.Data;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. using Infragistics.Win.UltraWinGrid;
  10. using Core.Mes.Client.Comm.Server;
  11. using CoreFS.CA06;
  12. using Core.StlMes.Client.Qcm;
  13. using Core.Mes.Client.Comm.Control;
  14. namespace Core.StlMes.Client.SaleOrder.Control
  15. {
  16. public partial class CraftOrdFdPicMCtrl : UserControl
  17. {
  18. private OpeBase _ob;
  19. private string _ordLnPk = "";
  20. private string _designKey = "";
  21. public CraftOrdFdPicMCtrl(System.Windows.Forms.Control container, string ordLnPk, string designKey, OpeBase ob)
  22. {
  23. InitializeComponent();
  24. _ob = ob;
  25. _ordLnPk = ordLnPk;
  26. _designKey = designKey;
  27. container.Controls.Add(this);
  28. this.Dock = DockStyle.Fill;
  29. }
  30. public void Query()
  31. {
  32. DataTable dt = ServerHelper.GetData("com.steering.pss.sale.order.CraftOrdFdPic.queryM", new object[]{ _ordLnPk }, _ob);
  33. GridHelper.CopyDataToDatatable(dt, dataTable1, true);
  34. }
  35. public void ShowMscPline()
  36. {
  37. }
  38. private void ultraTextEditor3_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
  39. {
  40. }
  41. private void ultraGrid1_AfterRowInsert(object sender, Infragistics.Win.UltraWinGrid.RowEventArgs e)
  42. {
  43. }
  44. private void ultraGrid1_CellChange(object sender, CellEventArgs e)
  45. {
  46. e.Cell.Row.Update();
  47. if (e.Cell.Column.Key == "Chk")
  48. {
  49. UltraGridRow chkRow = e.Cell.Row;
  50. foreach (UltraGridRow row in ultraGrid1.Rows)
  51. {
  52. if (row.Cells["Chk"].Value.ToString() == "True" && row != chkRow)
  53. {
  54. row.Cells["Chk"].Value = "False";
  55. row.Update();
  56. }
  57. }
  58. }
  59. }
  60. }
  61. }