public ActionResult DeleteConfirmed(int id) { Staf_salary staf_salary = db.Staf_salary.Find(id); db.Staf_salary.Remove(staf_salary); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Us_id,CurrentDate,currMonth,monthly_salary,Bonus,extra_Amount,Staff_id")] Staf_salary staf_salary) { if (ModelState.IsValid) { db.Entry(staf_salary).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Staff_id = new SelectList(db.tbl_staff, "staff_id", "staff_name", staf_salary.Staff_id); return(View(staf_salary)); }
// GET: Staf_salary/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Staf_salary staf_salary = db.Staf_salary.Find(id); if (staf_salary == null) { return(HttpNotFound()); } return(View(staf_salary)); }
// GET: Staf_salary/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Staf_salary staf_salary = db.Staf_salary.Find(id); if (staf_salary == null) { return(HttpNotFound()); } ViewBag.Staff_id = new SelectList(db.tbl_staff, "staff_id", "staff_name", staf_salary.Staff_id); return(View(staf_salary)); }