public ActionResult DeleteConfirmed(int id) { tlkpUserType tlkpUserType = db.tlkpUserTypes.Find(id); db.tlkpUserTypes.Remove(tlkpUserType); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "idsUserType,txtUserType,dtmCreate")] tlkpUserType tlkpUserType) { if (ModelState.IsValid) { db.Entry(tlkpUserType).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tlkpUserType)); }
public ActionResult Create([Bind(Include = "idsUserType,txtUserType,dtmCreate")] tlkpUserType tlkpUserType) { if (ModelState.IsValid) { db.tlkpUserTypes.Add(tlkpUserType); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tlkpUserType)); }
// GET: tlkpUserTypes/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tlkpUserType tlkpUserType = db.tlkpUserTypes.Find(id); if (tlkpUserType == null) { return(HttpNotFound()); } return(View(tlkpUserType)); }