Beispiel #1
0
        public ActionResult Index()
        {
            List <ReturnShippmentVM> lst = new List <ReturnShippmentVM>();

            var data = db.InScans.ToList();

            foreach (var item in data)
            {
                ReturnShippmentVM obj = new ReturnShippmentVM();
                obj.InscanID           = item.InScanID;
                obj.AWBNo              = item.AWBNo;
                obj.Date               = item.InScanDate;
                obj.CollectedBy        = item.CollectedBy;
                obj.StatedWeight       = item.StatedWeight;
                obj.Pieces             = item.Pieces;
                obj.CourierCharges     = item.CourierCharge;
                obj.Consignor          = item.Consignor;
                obj.ConsignorCountryID = item.ConsignorCountryID.Value;
                obj.Consignee          = item.Consignee;
                obj.CosigneeCountryID  = item.ConsigneeCountryID;
                obj.StatusPaymentMOde  = item.StatusPaymentMode;
                lst.Add(obj);
            }
            return(View(lst));
        }
Beispiel #2
0
        public JsonResult GetReturnData(string id)
        {
            var item = (from c in db.InScans where c.AWBNo == id select c).FirstOrDefault();

            ReturnShippmentVM obj = new ReturnShippmentVM();

            if (item != null)
            {
                obj.InscanID = item.InScanID;
                obj.AWBNo    = item.AWBNo;
                //obj.Date = DateTime.Now;
                obj.CollectedBy        = item.CollectedBy;
                obj.StatedWeight       = item.StatedWeight;
                obj.Pieces             = item.Pieces;
                obj.CourierCharges     = item.CourierCharge;
                obj.Consignor          = item.Consignor;
                obj.ConsignorCountryID = item.ConsignorCountryID.Value;
                obj.Consignee          = item.Consignee;
                obj.CosigneeCountryID  = item.ConsigneeCountryID;
                obj.StatusPaymentMOde  = item.StatusPaymentMode;
            }
            return(Json(obj, JsonRequestBehavior.AllowGet));
        }