/// <summary> /// /// </summary> /// <param name="Id"></param> /// <returns></returns> public ActionResult AreaEdit(string Id) { PdAreasBll bll = new PdAreasBll(); PD_Areas model = new PD_Areas(); if (!string.IsNullOrEmpty(Id)) { model = bll.Query(t => t.Id == Id).FirstOrDefault(); } return(View(model)); }
public ActionResult AreaEdit(PD_Areas model) { PdAreasBll bll = new PdAreasBll(); if (!string.IsNullOrEmpty(model.Id)) { bll.Update(model); } ViewBag.Success = true; ViewBag.Message = "修改成功!"; return(View(model)); }