FrmOrdLinePrdcrLst.cs 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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 Infragistics.Win;
  11. using Core.Mes.Client.Comm.Control;
  12. using Infragistics.Win.UltraWinGrid;
  13. using Core.Mes.Client.Comm.Server;
  14. namespace Core.StlMes.Client.PlnSaleOrd
  15. {
  16. public partial class FrmOrdLinePrdcrLst : FrmBase
  17. {
  18. /// <summary>
  19. /// 交货编码PK(备料需求号)
  20. /// </summary>
  21. private string ordLnDlyPk = "";
  22. /// <summary>
  23. /// 排产流水号
  24. /// </summary>
  25. private string plnDivideId = "";
  26. ValueList vlistManageNo = new ValueList();
  27. ValueList vlistManageNo1 = new ValueList();
  28. public FrmOrdLinePrdcrLst(string _ordLnDlyPk, string _plnDivideId, OpeBase _ob)
  29. {
  30. ordLnDlyPk = _ordLnDlyPk;
  31. plnDivideId = _plnDivideId;
  32. this.ob = _ob;
  33. this.IsLoadUserView = true;
  34. InitializeComponent();
  35. }
  36. private void FrmOrdLinePrdcrLst_Load(object sender, EventArgs e)
  37. {
  38. PlanComm.setGridActivation(ultraGridPrdcrl.DisplayLayout.Bands[0]);
  39. PlanComm.setGridActivation(ultraGridPrdcrl.DisplayLayout.Bands[1]);
  40. DataTable dt3 = ServerHelper.GetData("com.steering.pss.plnsaleord.order.CoreOrdLinePrdcrLst.CoreOrderProducerPdeptBase", null, this.ob);
  41. vlistManageNo = PlanComm.GeneralValuelist(ref dt3, "PDEPT_NO", "PDEPT_NAME");
  42. DataTable dt4 = ServerHelper.GetData("com.steering.pss.plnsaleord.order.CoreOrdLinePrdcrLst.CoreOrderProducerPrcBase", null, this.ob);
  43. vlistManageNo1 = PlanComm.GeneralValuelist(ref dt4, "BASECODE", "BASENAME");
  44. DoQuery();
  45. }
  46. public void DoQuery()
  47. {
  48. //查询合同监制从表
  49. DataTable dt1 = ServerHelper.GetData("com.steering.pss.plnsaleord.order.CoreOrdLinePrdcrLst.getOrderLinePrdcr",
  50. new Object[] { ordLnDlyPk, plnDivideId }, this.ob);
  51. DataTable dt2 = ServerHelper.GetData("com.steering.pss.plnsaleord.order.CoreOrdLinePrdcrLst.getOrderLinePrdcrLst",
  52. new Object[] { ordLnDlyPk, plnDivideId }, this.ob);
  53. OrderProducer_Tain.Clear();
  54. GridHelper.CopyDataToDatatable(ref dt1, ref this.OrderProducer_Main, true);
  55. GridHelper.CopyDataToDatatable(ref dt2, ref this.OrderProducer_Tain, true);
  56. for (int i = 0; i < ultraGridPrdcrl.Rows.Count; i++)
  57. {
  58. for (int j = 0; j < ultraGridPrdcrl.Rows[i].ChildBands[0].Rows.Count; j++)
  59. {
  60. ultraGridPrdcrl.Rows[i].ChildBands[0].Rows[j].Cells["PDEPT_NO"].ValueList = vlistManageNo;
  61. ultraGridPrdcrl.Rows[i].ChildBands[0].Rows[j].Cells["PDEPT_NO2"].ValueList = vlistManageNo;
  62. ultraGridPrdcrl.Rows[i].ChildBands[0].Rows[j].Cells["PDEPT_NO3"].ValueList = vlistManageNo;
  63. ultraGridPrdcrl.Rows[i].ChildBands[0].Rows[j].Cells["PRDCR_PRC_DESC"].ValueList = vlistManageNo1;
  64. }
  65. }
  66. }
  67. }
  68. }