public ActionResult DeleteConfirmed(int id) { order_employee order_Employee = db.order_employee.Find(id); db.order_employee.Remove(order_Employee); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID,EmployeeID,Date,Field,NoOfWorksPerDay,CreatedDate,CreatedBy,ModifiedDate,ModifiedBy")] order_employee order_Employee) { if (ModelState.IsValid) { db.Entry(order_Employee).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.EmployeeID = new SelectList(db.employees, "ID", "FirstName", order_Employee.EmployeeID); return(View(order_Employee)); }
// GET: order_employee/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } order_employee order_Employee = db.order_employee.Find(id); if (order_Employee == null) { return(HttpNotFound()); } return(View(order_Employee)); }
// GET: order_employee/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } order_employee order_Employee = db.order_employee.Find(id); if (order_Employee == null) { return(HttpNotFound()); } ViewBag.EmployeeID = new SelectList(db.employees, "ID", "FirstName", order_Employee.EmployeeID); return(View(order_Employee)); }