public ActionResult Refused(string recordId) { try { ParkMonthlyCarApply monthlyCarApply = ParkMonthlyCarApplyServices.QueryByRecordID(recordId); if (monthlyCarApply == null) { throw new MyException("申请信息不存在"); } return(View(monthlyCarApply)); } catch (Exception ex) { ExceptionsServices.AddExceptionToDbAndTxt("AdminAduitCarApply", "查看月租车申请详情失败", ex, LogFrom.WeiXin); return(RedirectToAction("Index", "AdminAduitCarApply", new { RemindUserContent = "拒绝失败" })); } }
public ActionResult Passed(string recordId) { try { List <BaseVillage> villages = VillageServices.QueryVillageByEmployeeMobilePhone(WeiXinUser.MobilePhone); List <EnumContext> parkContexts = new List <EnumContext>(); if (villages.Count > 0) { List <BaseParkinfo> parkings = ParkingServices.QueryParkingByVillageIds(villages.Select(p => p.VID).ToList()); foreach (var item in parkings) { EnumContext model = new EnumContext(); model.Description = item.PKName; model.EnumString = item.PKID; parkContexts.Add(model); } } ViewBag.ParkContexts = parkContexts; ParkMonthlyCarApply monthlyCarApply = ParkMonthlyCarApplyServices.QueryByRecordID(recordId); if (monthlyCarApply == null) { throw new MyException("申请信息不存在"); } List <ParkArea> areas = ParkAreaServices.GetParkAreaByParkingId(monthlyCarApply.PKID); List <EnumContext> areaContexts = new List <EnumContext>(); foreach (var item in areas) { EnumContext model = new EnumContext(); model.Description = item.AreaName; model.EnumString = item.AreaID; areaContexts.Add(model); } ViewBag.AreaContexts = areaContexts; List <EnumContext> gateContexts = new List <EnumContext>(); foreach (var item in areaContexts) { List <ParkGate> gates = ParkGateServices.QueryByParkAreaRecordIds(new List <string>() { item.EnumString }); foreach (var gate in gates) { EnumContext model = new EnumContext(); model.Description = gate.GateName; model.EnumString = string.Format("{0}|{1}", gate.GateID, item.EnumString); gateContexts.Add(model); } } ViewBag.GateContexts = gateContexts; return(View(monthlyCarApply)); } catch (Exception ex) { ExceptionsServices.AddExceptionToDbAndTxt("AdminAduitCarApply", "查看月租车申请详情失败", ex, LogFrom.WeiXin); return(RedirectToAction("Index", "AdminAduitCarApply", new { RemindUserContent = "审核失败" })); } }