public ActionResult Details(System.Int64 id) { if ((_crud & Zippy.SaaS.Entity.CRUD.Read) != Zippy.SaaS.Entity.CRUD.Read) { return(RedirectToAction("NoPermission", "Error")); } Z01Brand entity = Z01BrandHelper.Create(db, id); return(View(entity)); }
public ActionResult Edit(System.Int64?id, string act) { Z01Brand entity = null; if (id.HasValue && id > 0) { if (act == "detail") { if ((_crud & Zippy.SaaS.Entity.CRUD.Read) != Zippy.SaaS.Entity.CRUD.Read) { return(RedirectToAction("NoPermission", "Error")); } ViewData["VTitle"] = "查看品牌信息"; ViewData["IsDetail"] = true; } else { if ((_crud & Zippy.SaaS.Entity.CRUD.Update) != Zippy.SaaS.Entity.CRUD.Update) { return(RedirectToAction("NoPermission", "Error")); } ViewData["VTitle"] = "修改品牌信息"; } entity = Z01BrandHelper.Create(db, id.Value); } else { if ((_crud & Zippy.SaaS.Entity.CRUD.Create) != Zippy.SaaS.Entity.CRUD.Create) { return(RedirectToAction("NoPermission", "Error")); } ViewData["VTitle"] = "新增品牌"; entity = new Z01Brand(); } string returnUrl = Request["ReturnUrl"]; if (returnUrl.IsNullOrEmpty()) { returnUrl = "/" + _ContollerName; } ViewData["ReturnUrl"] = returnUrl; return(View(entity)); }