Exemple #1
0
        public frmDiagIO(PurchaseDefenitions[] pDef)
        {
            InitializeComponent();

              ListViewItem lw;
              foreach (PurchaseDefenitions p in pDef)
              {
            lw = new ListViewItem(p.IO_No);
            lw.SubItems.Add(p.CustomerOrderNo);
            lw.SubItems.Add(p.SupplierNo);
            lw.SubItems.Add(p.SupplierName);
            lw.SubItems.Add(p.IO_Status);

            switch (p.IO_Status)
            {
              case "4":
            lw.BackColor = System.Drawing.Color.FromArgb(CommonDefinitions.PART_DELIVERED);
            break;
              case "5":
            lw.BackColor = System.Drawing.Color.FromArgb(CommonDefinitions.DELIVERED);
            break;
              default:
            break;
            }

            lwIO.Items.Add(lw);
              }
        }
Exemple #2
0
        public PurchaseDefenitions[] getAllPurchaseOrders(string cust_onr)
        {
            GarpGenericDB IGA = new GarpGenericDB("IGA");
            GarpGenericDB IGF = new GarpGenericDB("IGF");
            GarpGenericDB LA = new GarpGenericDB("LA");
            PurchaseDefenitions purchase;
            ArrayList alPurchase = new ArrayList();

            IGF.first();

            while (!IGF.EOF)
            {
                if (GCF.noNULL(IGF.getValue("TX3")).StartsWith(cust_onr.Trim()))
                {
                    purchase = new PurchaseDefenitions();
                    purchase.IO_No = IGF.getValue("ONR").Trim();
                    purchase.CustomerOrderNo = IGF.getValue("TX3");

                    if (IGA.find(IGF.getValue("ONR")))
                    {
                        purchase.IO_Status = IGA.getValue("LEF");
                        purchase.SupplierNo = IGA.getValue("LNR");

                        if (LA.find(IGA.getValue("LNR")))
                            purchase.SupplierName = LA.getValue("NAM");
                    }
                    alPurchase.Add(purchase);
                }

                IGF.next();
            }
            return (PurchaseDefenitions[])alPurchase.ToArray(typeof(PurchaseDefenitions));
        }