public ActionResult DeleteConfirmed(int id) { StaffMemberAttendence staffmemberattendence = db.StaffMemberAttendence.Find(id); db.StaffMemberAttendence.Remove(staffmemberattendence); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "StaffMemberAttendenceId,StaffMemberId,Status,Date,InTime,OutTime")] StaffMemberAttendence staffmemberattendence) { if (ModelState.IsValid) { db.Entry(staffmemberattendence).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.StaffMemberId = new SelectList(db.StaffMember, "StaffMemberId", "StaffMemberName", staffmemberattendence.StaffMemberId); return(View(staffmemberattendence)); }
// GET: /StaffMemberAttendence/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } StaffMemberAttendence staffmemberattendence = db.StaffMemberAttendence.Find(id); if (staffmemberattendence == null) { return(HttpNotFound()); } return(View(staffmemberattendence)); }
// GET: /StaffMemberAttendence/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } StaffMemberAttendence staffmemberattendence = db.StaffMemberAttendence.Find(id); if (staffmemberattendence == null) { return(HttpNotFound()); } ViewBag.StaffMemberId = new SelectList(db.StaffMember, "StaffMemberId", "StaffMemberName", staffmemberattendence.StaffMemberId); return(View(staffmemberattendence)); }