コード例 #1
0
        public List <FrayteShipmentReport> GetShipmentId(int OperationZoneId)
        {
            List <FrayteShipmentReport> _shipmentpdf = new List <FrayteShipmentReport>();
            FrayteShipmentReport        pdf;
            var shipment = dbContext.DirectShipments.Where(x => x.OpearionZoneId == OperationZoneId && x.ShipmentStatusId == (int)FrayteShipmentStatus.Past && x.IsPODMailSent == false).ToList();

            if (shipment != null && shipment.Count > 0)
            {
                foreach (var sh in shipment)
                {
                    var report = dbContext.spGet_NewShipmentReportDetail(sh.CustomerId);
                    if (report != null)
                    {
                        foreach (var rr in report)
                        {
                            pdf              = new FrayteShipmentReport();
                            pdf.Destination  = rr.Destination;
                            pdf.Country      = rr.Country;
                            pdf.Booked_By    = rr.Booked_by;
                            pdf.Consignee    = rr.Consignee;
                            pdf.DeliveryDate = rr.DeliveryDate;
                            pdf.PODSign      = rr.SignedBy;
                            _shipmentpdf.Add(pdf);
                        }
                    }
                }
            }
            return(_shipmentpdf);
        }