Ejemplo n.º 1
0
        public TaxAndDutyResult getTaxAndDutyStatus(eCommBarcode barCode)
        {
            TaxAndDutyResult result = new TaxAndDutyResult();

            result = TaxAndDutyStatus(barCode);
            return(result);
        }
Ejemplo n.º 2
0
        public TaxAndDutyResult ParcelTaxAndDuty(eCommBarcode barCode)
        {
            TaxAndDutyResult result = new TaxAndDutyResult();

            result = new eCommerceAppRepository().getTaxAndDutyStatus(barCode);

            return(result);
        }
Ejemplo n.º 3
0
        private TaxAndDutyResult TaxAndDutyStatus(eCommBarcode barCode)
        {
            TaxAndDutyResult result = new TaxAndDutyResult();

            try
            {
                //   var data = (from r in dbContext.eCommerceShipments
                //               join ecV in dbContext.eCommerceInvoices on r.eCommerceShipmentId equals ecV.ShipmentId
                //               where r.BarCodeNumber == barCode.Barcode
                //               select r
                //).FirstOrDefault();

                if (barCode != null && !string.IsNullOrEmpty(barCode.Barcode))
                {
                    if (barCode.Barcode == "16460533|GBR|3" || barCode.Barcode == "45241162|GBR|3")
                    {
                        result.Status        = true;
                        result.PaymentStatus = eCommerceAppTaxAndDutyStatus.TaxAndDutyPaid;
                    }
                    else if (barCode.Barcode == "24559515|GBR|1" || barCode.Barcode == "22785328|GBR|6")
                    {
                        result.Status        = true;
                        result.PaymentStatus = eCommerceAppTaxAndDutyStatus.TaxAndDutyPartiallyPaid;
                    }
                    else
                    {
                        result.Status        = false;
                        result.PaymentStatus = eCommerceAppTaxAndDutyStatus.TaxAndDutyUnPaid;
                    }
                }
                else
                {
                    result.Status = false;
                }
            }
            catch (Exception ex)
            {
                result.Status = false;
            }
            return(result);
        }
Ejemplo n.º 4
0
        public List <eCommBarcode> GetLocationShipments(string warehouseLocation)
        {
            List <eCommBarcode> list = new List <eCommBarcode>();

            var shipments = (from r in dbContext.Locations
                             join es in dbContext.eCommerceShipments on r.LocationId equals es.WarehouseLocationId
                             where r.Barcode == warehouseLocation
                             select es
                             ).ToList();

            if (shipments != null)
            {
                eCommBarcode ship;
                foreach (var data in shipments)
                {
                    ship         = new eCommBarcode();
                    ship.Barcode = data.BarCodeNumber;
                    list.Add(ship);
                }
            }
            return(list);
        }