public ActionResult DeleteConfirmed(string id) { Gen_Mst_DocumentType gen_Mst_DocumentType = db.Gen_Mst_DocumentType.FirstOrDefault(m => m.DocCode == id); db.Gen_Mst_DocumentType.Remove(gen_Mst_DocumentType); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "DocCode,DocDescription,Comments,CreatedBy,CreatedDate,ModifiedBy,ModifiedDate")] Gen_Mst_DocumentType gen_Mst_DocumentType) { if (ModelState.IsValid) { db.Entry(gen_Mst_DocumentType).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CreatedBy = new SelectList(db.Rights_MST_UserMaster, "UserId", "Name", gen_Mst_DocumentType.CreatedBy); ViewBag.ModifiedBy = new SelectList(db.Rights_MST_UserMaster, "UserId", "Name", gen_Mst_DocumentType.ModifiedBy); return(View(gen_Mst_DocumentType)); }
// GET: DocumentType/Details/5 public ActionResult Details(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Gen_Mst_DocumentType gen_Mst_DocumentType = db.Gen_Mst_DocumentType.FirstOrDefault(m => m.DocCode == id); if (gen_Mst_DocumentType == null) { return(HttpNotFound()); } return(View(gen_Mst_DocumentType)); }
// GET: DocumentType/Edit/5 public ActionResult Edit(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Gen_Mst_DocumentType gen_Mst_DocumentType = db.Gen_Mst_DocumentType.FirstOrDefault(m => m.DocCode == id); if (gen_Mst_DocumentType == null) { return(HttpNotFound()); } ViewBag.CreatedBy = new SelectList(db.Rights_MST_UserMaster, "UserId", "Name", gen_Mst_DocumentType.CreatedBy); ViewBag.ModifiedBy = new SelectList(db.Rights_MST_UserMaster, "UserId", "Name", gen_Mst_DocumentType.ModifiedBy); return(View(gen_Mst_DocumentType)); }