public ActionResult Create() { tblfill fill = new tblfill(); fill.date = System.DateTime.Now; return(View(fill)); }
public ActionResult DeleteConfirmed(int id) { tblfill tblfill = db.tblfills.Find(id); db.tblfills.Remove(tblfill); db.SaveChanges(); TempData["Success"] = "Deleted Successfully"; return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,date,name,passport,dob,doe,choice1,choice2,choice3,module,v1,v2,v3,mode,instname,status,fid,uname,pass")] tblfill tblfill) { if (ModelState.IsValid) { db.Entry(tblfill).State = EntityState.Modified; db.SaveChanges(); TempData["Success"] = "Updated Successfully"; return(RedirectToAction("Index")); } return(View(tblfill)); }
public ActionResult Create([Bind(Include = "Id,date,name,passport,dob,doe,choice1,choice2,choice3,module,v1,v2,v3,mode,instname,status,fid,uname,pass")] tblfill tblfill) { if (ModelState.IsValid) { db.tblfills.Add(tblfill); db.SaveChanges(); TempData["Success"] = "Saved Successfully"; return(RedirectToAction("Index")); } return(View(tblfill)); }
// GET: Auth/ExamReg/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tblfill tblfill = db.tblfills.Find(id); if (tblfill == null) { return(HttpNotFound()); } return(View(tblfill)); }
public ActionResult Create([Bind(Include = "Id,date,name,passport,dob,doe,choice1,choice2,choice3,module,v1,v2,v3,mode,instname,status,fid,uname,pass")] tblfill tblfill) { if (ModelState.IsValid) { if (Session["Franchisee"] != null || User.IsInRole("Receptionist")) { string a = User.IsInRole("Franchisee") ? help.Franchisee() : help.Receptionist(); tblfill.franchid = a; db.tblfills.Add(tblfill); db.SaveChanges(); TempData["Success"] = "Saved Successfully"; return(RedirectToAction("Index")); } else { return(RedirectToAction("Login", "Account")); } } return(View(tblfill)); }