public ActionResult DeleteConfirmed(DateTime id) { TIMEKEEPING tIMEKEEPING = db.TIMEKEEPINGs.Find(id); db.TIMEKEEPINGs.Remove(tIMEKEEPING); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Date,EmployeeID,State,AbsentID,HoursWorkDay,HoursWorkNight")] TIMEKEEPING tIMEKEEPING) { if (ModelState.IsValid) { db.Entry(tIMEKEEPING).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Date = new SelectList(db.DATEINFORMATIONs, "Date", "Date", tIMEKEEPING.Date); ViewBag.EmployeeID = new SelectList(db.EMPLOYEEs, "EmployeeID", "EmployeeName", tIMEKEEPING.EmployeeID); return(View(tIMEKEEPING)); }
// GET: TIMEKEEPINGs/Delete/5 public ActionResult Delete(DateTime id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } TIMEKEEPING tIMEKEEPING = db.TIMEKEEPINGs.Find(id); if (tIMEKEEPING == null) { return(HttpNotFound()); } return(View(tIMEKEEPING)); }
// GET: TIMEKEEPINGs/Edit/5 public ActionResult Edit(DateTime id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } TIMEKEEPING tIMEKEEPING = db.TIMEKEEPINGs.Find(id); if (tIMEKEEPING == null) { return(HttpNotFound()); } ViewBag.Date = new SelectList(db.DATEINFORMATIONs, "Date", "Date", tIMEKEEPING.Date); ViewBag.EmployeeID = new SelectList(db.EMPLOYEEs, "EmployeeID", "EmployeeName", tIMEKEEPING.EmployeeID); return(View(tIMEKEEPING)); }