public ActionResult Edit(Demand model) { Demand obj = bllSession.IDemandBLL.GetEntity(model.Id); try { obj.State = model.State; bllSession.IDemandBLL.Update(obj); log.Info(new LogContent(CurrentUser.Username + ":修改约课" + model.Id, LogType.记录.ToString(), HttpHelper.GetIPAddress())); return Redirect("/Admin/Demand/Index"); } catch (Exception ex) { log.Error(new LogContent(CurrentUser.Username + ":修改约课" + model.Id + "失败", LogType.异常.ToString(), HttpHelper.GetIPAddress()), ex); } return View(obj); }
public ActionResult Show(int id) { Demand demand = new Demand(); demand = bllSession.IDemandBLL.GetEntity(id); vDemand vdemands = new vDemand(demand); return View(vdemands); }