public ActionResult getMblStatus(ParameterModel param) { var model = new MBLModel(); var result = new JsonResult(); result.JsonRequestBehavior = JsonRequestBehavior.AllowGet; if (param.midx != 0) { var mblDto = blService.getMBL(param); result.Data = new { status = mblDto.CODE.CDNAME, statusCode = mblDto.CODE.cdidx }; } return(result); }
public ActionResult MBLDetail(ParameterModel param) { var model = new MBLModel(); if (param.midx != 0) { Mapper.CreateMap <MBL, MBLModel>(); var mblDto = blService.getMBL(param); model = Mapper.Map <MBL, MBLModel>(mblDto); model.otherChargeList = mblDto.OTHERCHARGE.ToList(); } else { model.otherChargeList = new List <OTHERCHARGE>(); model.otherChargeList.Add(new OTHERCHARGE() { chargeCd = "FSC" }); model.otherChargeList.Add(new OTHERCHARGE() { chargeCd = "SCR" }); } var customerList = customerService.getCustomerList(new ParameterModel()).ToList(); if (customerList != null) { model.shipperList = customerList.Where(c => c.CustomerType == 13).ToList(); model.consigneeList = customerList.Where(c => c.CustomerType == 14).ToList(); model.flightList = customerList.Where(c => c.CustomerType == 15).ToList(); } model.statusList = commonService.getCodeList(new ParameterModel { GROUPCD = 1007 }).ToList(); model.weightTypeList = commonService.getCodeList(new ParameterModel { GROUPCD = 1001 }).ToList(); if (model.otherChargeList.Count() < 5) { int addCnt = 5 - model.otherChargeList.Count(); for (int i = 0; i < addCnt; i++) { model.otherChargeList.Add(new OTHERCHARGE()); } } return(View(model)); }
public ActionResult updateMBL(MBLModel model) { ResultModel result = new ResultModel(); try { Mapper.CreateMap <MBLModel, MBL>(); MBL entity = Mapper.Map <MBLModel, MBL>(model); entity.CreateId = userInfo.uidx; result = blService.updateMBL(entity); blService.updateMBLOtherCharge(Convert.ToInt32(result.ResultMessage), model.otherChargeList); } catch (Exception ex) { result.ResultCode = -1; result.ResultMessage = ex.Message; throw ex; } Response.Redirect("/BL/Master"); return(View()); }