Example #1
0
        /// <summary>
        /// Saves information that is common for all rows on a AidId
        /// 
        /// </summary>
        private void saveCommonOrderRow(OrderRowDefinitions.OrderRow or, ref GarpGenericDB data)
        {
            data.find(or.OrderNo);
            data.next();

            while (data.getValue("ONR").Equals(or.OrderNo) && !data.EOF)
            {
                if ((getFormatedAidId(data.getValue("NX1")) == or.AidNr) && (!isEgenAvgift(data.getValue("ANR"))))
                {
                    fillCommonOrderRowFields(or, data);
                }
                data.next();
            }
        }
Example #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));
        }