FrmBuyChooseSupplier.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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 FrmBuyChooseSupplier : FrmBase
  19. {
  20. private CoreFS.CA06.OpeBase ob = new OpeBase();
  21. public string ID { get; set; }
  22. public FrmBuyChooseSupplier(OpeBase ops)
  23. {
  24. this.ob = ops;
  25. InitializeComponent();
  26. }
  27. private void FrmBuyChooseSupplier_Load(object sender, EventArgs e)
  28. {
  29. ultraGrid1_Bind();
  30. ultraGrid3_Bind();
  31. }
  32. private void ultraGrid1_Bind()
  33. {
  34. DataTable dt = ServerHelper.GetData("com.steering.pss.buybillet.Buybillet.queryBUY_BASE_CUSTOMER", new object[] { }, this.ob);
  35. this.ultraGrid1.DataSource = dt;
  36. }
  37. private void ultraGrid3_Bind()
  38. {
  39. DataTable dt = ServerHelper.GetData("com.steering.pss.buybillet.Buybillet.queryBUY_GP_REQ_SUPPLIER", new object[] {ID}, this.ob);
  40. this.ultraGrid3.DataSource = dt;
  41. }
  42. private void tsb_save_Click(object sender, EventArgs e)
  43. {
  44. UltraGridRow supplierRow = this.ultraGrid1.ActiveRow;
  45. UltraGridRow requireRow = this.ultraGrid3.ActiveRow;
  46. string supplier = supplierRow.Cells["CUSTOMER_NM"].Value.ToString();
  47. string id =requireRow.Cells["GPREQ_ID"].Value.ToString();
  48. int suceed = ServerHelper.SetData("com.steering.pss.buybillet.Buybillet.InsertBUY_GP_ORDER", new object[] {supplier, ID }, this.ob);
  49. if (suceed > 0)
  50. {
  51. MessageBox.Show("保存成功!");
  52. this.Close();
  53. }
  54. }
  55. }
  56. }