public ActionResult EditChargePile(string cpId) { ViewBag.AllBase = ChargeService.GetAllChargingBaseEntity().Where(t => t.IsUse == 1).ToList(); if (string.IsNullOrEmpty(cpId)) { ViewBag.ChargePile = new ChargingPileEntity(); } else { ViewBag.ChargePile = ChargeService.GetChargingPileEntityById(cpId.ToLong(0)); } return(View()); }
public ActionResult ChargeBase(string name, int status = -1) { List <ChargingBaseEntity> mList = null; if (!string.IsNullOrEmpty(name) || status > -1) { mList = ChargeService.GetChargingBaseInfoByRule(name, status); } else { mList = ChargeService.GetAllChargingBaseEntity(); } ViewBag.Name = name ?? ""; ViewBag.Status = status; ViewBag.ChageBase = mList; return(View()); }