public ActionResult Edit([Bind(Include = "usr_type_Id,type_name,description")] sys_user_type sys_user_type) { if (ModelState.IsValid) { _userTypeService.Edit(sys_user_type); return(RedirectToAction("Index")); } return(View(sys_user_type)); }
// GET: sys_user_type/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } sys_user_type sys_user_type = _userTypeService.GetById(id); if (sys_user_type == null) { return(HttpNotFound()); } return(View(sys_user_type)); }
public UserTypeVM(sys_user_type ut) { this.Id = ut.usr_type_Id; this.Name = ut.type_name; }