FrmBuyCf.cs 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. using CoreFS.CA06;
  10. using Core.Mes.Client.Comm.Server;
  11. using Core.Mes.Client.Comm.Control;
  12. using Infragistics.Win.UltraWinGrid;
  13. using System.Net;
  14. using System.Collections;
  15. using CoreFS.SA06;
  16. namespace Core.StlMes.Client.BuyBillet
  17. {
  18. public partial class FrmBuyCf : FrmBase
  19. {
  20. public event Action OnOrderCfFinished;
  21. public string ORD_NO_PK;
  22. public FrmBuyCf(OpeBase ops)
  23. {
  24. this.ob = ops;
  25. InitializeComponent();
  26. }
  27. private void FrmBuyCf_Load(object sender, EventArgs e)
  28. {
  29. BindToGrid1();
  30. BindToGrid2();
  31. }
  32. private void ts_btn_save_Click(object sender, EventArgs e)
  33. {
  34. ultraGrid2.UpdateData();
  35. UltraGridRow supplierRow = this.ultraGrid1.ActiveRow;
  36. UltraGridRow requireRow = this.ultraGrid2.ActiveRow;
  37. string supplier = supplierRow.Cells["SUPPLIER"].Value.ToString();
  38. string weight = requireRow.Cells["WEIGHT_NUM"].Value.ToString();
  39. ServerHelper.SetData("com.steering.pss.buybillet.Buybillet.updateBUY_GP_ORDERCF", new object[] { ORD_NO_PK, supplier,weight }, this.ob);
  40. if (OnOrderCfFinished != null)
  41. {
  42. OnOrderCfFinished();
  43. }
  44. this.Close();
  45. }
  46. private void BindToGrid1()
  47. {
  48. DataTable dt = ServerHelper.GetData("com.steering.pss.buybillet.Buybillet.queryBUY_GP_ORDERCF", new object[] { ORD_NO_PK, "1" }, this.ob);
  49. this.ultraGrid1.DataSource = dt;
  50. }
  51. private void BindToGrid2()
  52. {
  53. DataTable dt = ServerHelper.GetData("com.steering.pss.buybillet.Buybillet.queryBUY_GP_ORDERCF", new object[] { ORD_NO_PK, "2" }, this.ob);
  54. this.ultraGrid2.DataSource = dt;
  55. }
  56. }
  57. }