public ActionResult DeleteConfirmed(int id) { Employee_PhoneNumberType employee_PhoneNumberType = db.NumeroTypes.Find(id); db.NumeroTypes.Remove(employee_PhoneNumberType); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "PhoneNumberTypeID,PhoneNumbertype,ModifiedDate")] Employee_PhoneNumberType employee_PhoneNumberType) { if (ModelState.IsValid) { employee_PhoneNumberType.ModifiedDate = DateTime.Now; db.Entry(employee_PhoneNumberType).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(employee_PhoneNumberType)); }
public ActionResult Create([Bind(Include = "PhoneNumberTypeID,PhoneNumbertype,ModifiedDate")] Employee_PhoneNumberType employee_PhoneNumberType) { if (ModelState.IsValid) { employee_PhoneNumberType.ModifiedDate = DateTime.Now; db.NumeroTypes.Add(employee_PhoneNumberType); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(employee_PhoneNumberType)); }
// GET: Employee_PhoneNumberType/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Employee_PhoneNumberType employee_PhoneNumberType = db.NumeroTypes.Find(id); if (employee_PhoneNumberType == null) { return(HttpNotFound()); } return(View(employee_PhoneNumberType)); }