コード例 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            FISCALYEAR fISCALYEAR = db.FISCALYEARS.Find(id);

            db.FISCALYEARS.Remove(fISCALYEAR);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
 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));
 }
コード例 #3
0
        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));
        }
コード例 #4
0
        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));
        }
コード例 #5
0
        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));
        }