public ActionResult Edit(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Role = new TRoleClass(); var res = Role.RoleSelectById(id).FirstOrDefault(); if (res == null) { return(HttpNotFound()); } TRoleModel mdl = new TRoleModel(); mdl.IDRole = res.IDRole; mdl.Rolename = res.Rolename; mdl.RoleDesc = res.RoleDesc; mdl.Discontinue = res.Discontinue; mdl.UserEntry = res.UserEntry; mdl.DateEntry = ConvertDate.convert_date(res.DateEntry); mdl.UserLastMaintenance = res.UserLastMaintenance; mdl.DateLastMaintenance = ConvertDate.convert_date(res.DateLastMaintenance); ViewBag.historyKeyword = Request["historyKeyword"]; ViewBag.historyDiscontinue = Request["historyDiscontinue"]; return(View(mdl)); }
public ActionResult Edit(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Module = new TModuleClass(); var res = Module.ModuleSelectByID(id).FirstOrDefault(); if (res == null) { return(HttpNotFound()); } TModuleModel mdl = new TModuleModel(); mdl.IDModule = res.IDModule; mdl.ModuleCode = res.ModuleCode; mdl.ModuleDesc = res.ModuleDesc; mdl.ModuleName = res.ModuleName; mdl.Sequence = res.Sequence; mdl.IsDefault = res.IsDefault; mdl.UserEntry = res.UserEntry; mdl.DateEntry = ConvertDate.convert_date(res.DateEntry); mdl.UserLastMaintenance = res.UserLastMaintenance; mdl.DateLastMaintenance = ConvertDate.convert_date(res.DateLastMaintenance); mdl.IDIcon = res.IDIcon; mdl.IDIconModule = res.IDIcon; mdl.IconClass = res.IconClass; mdl.IconName = res.IconName; return(View(mdl)); }
public ActionResult Edit(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Icon = new TIconClass(); var res = Icon.IconSelectById(id).FirstOrDefault(); if (res == null) { return(HttpNotFound()); } TIconModel mdl = new TIconModel(); mdl.IDIcon = res.IDIcon; mdl.IconName = res.IconName; mdl.IconDesc = res.IconDesc; mdl.IconClass = res.IconClass; mdl.IconPath = res.IconPath; mdl.IconCategory = res.IconCategory; mdl.IconType = res.IconType; mdl.IsDefault = res.IsDefault; mdl.UserEntry = res.UserEntry; mdl.DateEntry = ConvertDate.convert_date(res.DateEntry); mdl.UserLastMaintenance = res.UserLastMaintenance; mdl.DateLastMaintenance = ConvertDate.convert_date(res.DateLastMaintenance); var IconType = new SelectList(new[] { new { ID = "Unicode", Name = "Unicode" }, new { ID = "Image", Name = "Image" }, }, "ID", "Name", mdl.IconType); ViewData["Icon Type"] = IconType; var IconCategory = new SelectList(new[] { new { ID = "TextEditor", Name = "TextEditor" }, new { ID = "Brand", Name = "Brand" }, new { ID = "Currency", Name = "Currency" }, }, "ID", "Name", mdl.IconCategory); ViewData["Icon Category"] = IconCategory; ViewBag.historyKeyword = Request["historyKeyword"]; ViewBag.historyisDefault = Request["historyisDefault"]; return(View(mdl)); }