Example #1
0
        public ActionResult ShipperVehicleMapping(string id, string name)
        {
            ShipperVehicleMappingViewModel sv = new ShipperVehicleMappingViewModel();

            var shipper = ApplicationConfigHelper.GetShipperList().FirstOrDefault(m => m.ID.ToString() == id);

            sv.SID         = shipper.ID;
            sv.ShipperName = shipper.Name;

            VehicleSearchCondition svc = new VehicleSearchCondition();

            svc.ShipperID = id;

            var response = new VehicleService().GetAllVehicle(new GetVehicleByConditionRequest()
            {
                SearchCondition = svc,
                PageSize        = UtilConstants.PAGESIZE,
                PageIndex       = sv.PageIndex,
            });

            if (response.IsSuccess)
            {
                sv.Vehicle   = response.Result.VehicleCollection;
                sv.PageIndex = response.Result.PageIndex;
                sv.PageCount = response.Result.PageCount;
            }

            return(View(sv));
        }
Example #2
0
        public ActionResult ShipperVehicleMapping(ShipperVehicleMappingViewModel sv)
        {
            VehicleSearchCondition vsc = new VehicleSearchCondition();

            vsc.CarNo = sv.VehicleNo;

            var response = new VehicleService().GetAllVehicles(new GetVehicleByConditionRequest()
            {
                SearchCondition = vsc,
                PageIndex       = sv.PageIndex,
                PageSize        = UtilConstants.PAGESIZE,
            });


            if (response.IsSuccess)
            {
                sv.Vehicle   = response.Result.VehicleCollection;
                sv.PageIndex = response.Result.PageIndex;
                sv.PageCount = response.Result.PageCount;
            }


            return(View(sv));
        }