public ActionResult DeleteConfirmed(int id) { FISCALYEAR fISCALYEAR = db.FISCALYEARS.Find(id); db.FISCALYEARS.Remove(fISCALYEAR); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "fiscalYearID,fiscalYear1,subcategoryID,quarteroptionID")] FISCALYEAR fISCALYEAR) { if (ModelState.IsValid) { db.Entry(fISCALYEAR).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.quarteroptionID = new SelectList(db.QUARTEROPTIONS, "quarteroptionID", "quarteroptionName", fISCALYEAR.quarteroptionID); return(View(fISCALYEAR)); }
public ActionResult Create([Bind(Include = "fiscalYearID,fy,quarteroptionID,subcategoryID")] FISCALYEAR fISCALYEAR) { if (ModelState.IsValid) { db.FISCALYEARs.Add(fISCALYEAR); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.quarteroptionID = new SelectList(db.QUARTEROPTIONs, "quarteroptionID", "quarterOpt", fISCALYEAR.quarteroptionID); return(View(fISCALYEAR)); }
public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } FISCALYEAR fISCALYEAR = db.FISCALYEARS.Find(id); if (fISCALYEAR == null) { return(HttpNotFound()); } return(View(fISCALYEAR)); }
public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } FISCALYEAR fISCALYEAR = db.FISCALYEARS.Find(id); if (fISCALYEAR == null) { return(HttpNotFound()); } ViewBag.quarteroptionID = new SelectList(db.QUARTEROPTIONS, "quarteroptionID", "quarteroptionName", fISCALYEAR.quarteroptionID); return(View(fISCALYEAR)); }