public ActionResult DeleteConfirmed(int id) { PDType pDType = db.PDTypes.Find(id); db.PDTypes.Remove(pDType); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,CodePD,DescCodePD,BegDate,EndDate")] PDType pDType) { if (ModelState.IsValid) { db.Entry(pDType).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(pDType)); }
public ActionResult Create([Bind(Include = "Id,CodePD,DescCodePD,BegDate,EndDate")] PDType pDType) { if (ModelState.IsValid) { db.PDTypes.Add(pDType); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(pDType)); }
// GET: Directories/PDTypes/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } PDType pDType = db.PDTypes.Find(id); if (pDType == null) { return(HttpNotFound()); } return(View(pDType)); }
// GET: Directories/PDTypes/Create public ActionResult Create() { var model = new PDType(); return(View(model)); }