Esempio n. 1
0
 public XrefRecord(DBResult res)
 {
     Key           = res.FieldByName(_Column.UniqueKey);
     CompanyName   = res.FieldByName(_Column.VendorName, "");
     GXSAccount    = res.FieldByName(_Column.VendorId, "");
     SelectionCode = res.FieldByName(_Column.VendorSeq, "");
     BrandName     = res.FieldByName(_Column.BrandName, "");
 }
Esempio n. 2
0
 public ReportDesc(DBResult res, string prefix)
 {
     Key         = res.FieldByName(_Column.UniqueKey);
     PoNumber    = res.FieldByName(_Column.PONumber);
     TrxType     = res.FieldByName(_Column.TrxType);
     FileName    = res.FieldByName("filename1");
     FilePath    = $"{prefix}{FileName}";
     Description = res.FieldByName("description");
 }
Esempio n. 3
0
        public void AddCartonRecord(DBResult queryCart)
        {
            string byid = queryCart.FieldByName(_Column.BYId);

            if (DistInfo.ContainsKey(byid))
            {
                DistInfo[byid].Add(new Distribution(queryCart.FieldByName(_Column.UniqueItem), queryCart.FieldByName(_Column.CartonQuantity)));
            }
            else
            {
                DistInfo.Add(byid, new List <Distribution>()
                {
                    new Distribution(queryCart.FieldByName(_Column.UniqueItem), queryCart.FieldByName(_Column.CartonQuantity))
                });
            }
        }
Esempio n. 4
0
 public void AddHeaderRecord(DBResult queryHead)
 {
     headRecord.Clear();
     foreach (var field in queryHead.FieldNames)
     {
         headRecord.Add(field.ToLower(), queryHead.FieldByName(field, _SqlValue.Null).SQLEscape().Trim());
     }
 }
Esempio n. 5
0
 public ItemInfo(DBResult res)
 {
     Category    = res.FieldByName("prodcat", "");
     BrandName   = res.FieldByName("deptname", "");
     SubCategory = res.FieldByName("prodsubcat", "");
     Class       = res.FieldByName("classdesc", "");
     SubClass    = res.FieldByName("subcdesc", "");
     Description = res.FieldByName("itemdesc", "");
     ColorCode   = res.FieldByName("colorcode", "");
     ColorDesc   = res.FieldByName("itemcolor", "");
 }
Esempio n. 6
0
        public void AddDetailRecord(DBResult queryDetl)
        {
            Dictionary <string, string> detlRecord = new Dictionary <string, string>();

            foreach (var field in queryDetl.FieldNames)
            {
                detlRecord.Add(field.ToLower(), queryDetl.FieldByName(field, _SqlValue.Null).SQLEscape().Trim());
            }
            detlRecords.Add(detlRecord[_Column.UniqueItem], detlRecord);
        }
Esempio n. 7
0
        public ITMOptions(DBResult queryPL)
        {
            IsPackingEnabled = queryPL.FieldByName(_Column.Sh_PlAll) != _SqlValue.False;
            IsInvoiceEnabled = queryPL.FieldByName(_Column.Sh_Inv) != _SqlValue.False;
            IsPPEnabled      = queryPL.FieldByName(_Column.Sh_PlPp) != _SqlValue.False;
            IsMXEnabled      = queryPL.FieldByName(_Column.Sh_PlMx) != _SqlValue.False;
            IsDSEnabled      = queryPL.FieldByName(_Column.Sh_PlDs) != _SqlValue.False;
            switch (queryPL.FieldByName(_Column.BoxOptn, "7"))
            {
            case "1":
                BoxOption = _CartonDistType.PerPO;
                break;

            case "3":
                BoxOption = _CartonDistType.PerPOStore;
                break;

            case "4":
            case "6":
                BoxOption = _CartonDistType.Manual;
                break;

            case "5":
                BoxOption = _CartonDistType.PerASN;
                break;

            default:
            case "7":
                BoxOption = _CartonDistType.Manual;
                break;
            }
        }
Esempio n. 8
0
        public PoItem(DBResult res)
        {
            Key      = res.FieldByName(_Column.UniqueKey);
            PoNumber = res.FieldByName(_Column.PONumber, "").Trim();
            var pod  = (DateTime)res.FieldByName2(_Column.PODate, DateTime.MinValue);
            var ship = (DateTime)res.FieldByName2(_Column.ShipmentDate, DateTime.MinValue);
            var canc = (DateTime)res.FieldByName2(_Column.CancelDate, DateTime.MinValue);

            PoDate     = pod == DateTime.MinValue ? "--" : pod.ToString("MMM dd, yyyy");
            ShipDate   = ship == DateTime.MinValue ? "--" : ship.ToString("MMM dd, yyyy");
            CancelDate = canc == DateTime.MinValue ? "--" : canc.ToString("MMM dd, yyyy");
            PoType     = res.FieldByName("potype", "").Trim();
            int tci = 0;
            int tca = 0;
            int tct = 0;

            int.TryParse(res.FieldByName("totcmpinv", "0"), out tci);
            int.TryParse(res.FieldByName("totcmpasn", "0"), out tca);
            int.TryParse(res.FieldByName(_Column.TotalItems, "0"), out tct);
            InvTotal  = $"{tci}/{tct}";
            AsnTotal  = $"{tca}/{tct}";
            InvStatus = (tci == tct) ? "good" : "caution";
            AsnStatus = (tca == tct) ? "good" : "caution";
        }
Esempio n. 9
0
        public LocReportLine(DBResult res, string partner)
        {
            MilPo      = res.FieldByName("milpo").Trim();
            PidStyle   = res.FieldByName("pidstyle", "").Trim();
            Upc        = res.FieldByName("upc", "").Trim();
            MilCost    = res.FieldByName("milcost", "0");
            TtlMilCost = res.FieldByName("ttlmilcost", "0");
            Retail     = res.FieldByName("retail", "0");
            TtlRetail  = res.FieldByName("ttlretail", "0");
            Store      = res.FieldByName("store").Trim();
            switch (partner)
            {
            case _Partner.NavyReplenishment:
                // p.BuyerName = "d.nexbuyer";
                // p.StoreJoin = "substr(lpad(replace(replace(d856.byid,'E',''),'W',''),4,'0'),2,3)=" + p.StoreWhere;
                StoreLookup = Store.Replace("E", "").Replace("W", "").PadLeft(4, '0').Substring(1, 3);
                break;

            case _Partner.MarinesReplenishment:
                // p.BuyerName = "d.mcxbuyer";
                // p.StoreJoin = "if(LENGTH(trim(d856.byid))>4,s.byid=d856.byid, trim(s.xrefid)=substr(trim(LEADING '0' from d856.byid),1,3))"; //WE ARE EXLUDING 4 CHAR STORES THAT DON'T END IN E/W
                if (Store.Length > 4)
                {
                    StoreLookup = Store;
                }
                else
                {
                    StoreLookup = Store.TrimStart('0').Substring(0, 3);
                }
                break;

            default:
                StoreLookup = Store;
                break;
            }
            ShipDate = res.FieldByName("shipdate");
            OnOrder  = res.FieldByName("onorder");
            Shipped  = res.FieldByName("shipped");
        }
Esempio n. 10
0
        public IntHeadRecord(DBResult queryCurrent)
        {
            DateTime temp;
            string   date = queryCurrent.FieldByName(_Column.ShipmentDate, "");

            if (!DateTime.TryParse(date, out temp))
            {
                ShipDate = date;
            }
            else
            {
                ShipDate = temp.ToString("MMM dd yyyy");
            }
            date = queryCurrent.FieldByName(_Column.TrxDate, "");
            if (!DateTime.TryParse(date, out temp))
            {
                TransactionDate = date;
            }
            else
            {
                TransactionDate = temp.ToString("MMM dd yyyy");
            }

            Key            = queryCurrent.FieldByName(_Column.UniqueKey);
            InvoiceNumber  = queryCurrent.FieldByName(_Column.InvoiceNo, "");
            BolNumber      = queryCurrent.FieldByName(_Column.BOLNumber, "");
            PoNumber       = queryCurrent.FieldByName(_Column.PONumber, "");
            MasterPONumber = queryCurrent.FieldByName(_Column.ReleaseNum, "");
            ScacCode       = queryCurrent.FieldByName(_Column.SCACCode, "");
            Routing        = queryCurrent.FieldByName(_Column.Routing, "");
            StId           = queryCurrent.FieldByName(_Column.STId, "");
            ById           = queryCurrent.FieldByName(_Column.BYId, "");
            Messages       = queryCurrent.FieldByName(_Column.Msg, "");
            TransferType   = queryCurrent.FieldByName(_Column.XferType, _InvoiceTransferType.Mixed);
            HProcessed     = queryCurrent.FieldByName(_Column.HProcessed, "");
        }
Esempio n. 11
0
 public ScacEntry(DBResult res)
 {
     ScacCode    = res.FieldByName(_Column.PickVal);
     Description = res.FieldByName(_Column.PickDesc);
 }
Esempio n. 12
0
 public Store(DBResult res)
 {
     Name      = res.FieldByName(_Column.STName, "").Trim();
     BYID      = res.FieldByName(_Column.BYId, "").Trim();
     DisplayID = BYID;
 }
Esempio n. 13
0
 public PdsOptions(DBResult queryPL)
 {
     IsPackingEnabled = queryPL.FieldByName(_Column.Sh_PlAll) != _SqlValue.False;
     IsInvoiceEnabled = queryPL.FieldByName(_Column.Sh_Inv) != _SqlValue.False;
 }