public ActionResult DeleteConfirmed(Guid id)
        {
            AgingThreshold agingThreshold = db.AgingThresholds.Find(id);

            db.AgingThresholds.Remove(agingThreshold);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "AgingThresholdId,AgingSchemeId,ThresholdName,DaysPrior,IncrementRate,LastUpdated")] AgingThreshold agingThreshold)
 {
     if (ModelState.IsValid)
     {
         db.Entry(agingThreshold).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.AgingSchemeId = new SelectList(db.AgingSchemes, "AgingSchemeId", "SchemeName", agingThreshold.AgingSchemeId);
     return(View(agingThreshold));
 }
        public ActionResult Create([Bind(Include = "AgingThresholdId,AgingSchemeId,ThresholdName,DaysPrior,IncrementRate,LastUpdated")] AgingThreshold agingThreshold)
        {
            if (ModelState.IsValid)
            {
                agingThreshold.AgingThresholdId = Guid.NewGuid();
                db.AgingThresholds.Add(agingThreshold);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.AgingSchemeId = new SelectList(db.AgingSchemes, "AgingSchemeId", "SchemeName", agingThreshold.AgingSchemeId);
            return(View(agingThreshold));
        }
        // GET: AgingThresholds/Details/5
        public ActionResult Details(Guid?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            AgingThreshold agingThreshold = db.AgingThresholds.Find(id);

            if (agingThreshold == null)
            {
                return(HttpNotFound());
            }
            return(View(agingThreshold));
        }
        // GET: AgingThresholds/Edit/5
        public ActionResult Edit(Guid?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            AgingThreshold agingThreshold = db.AgingThresholds.Find(id);

            if (agingThreshold == null)
            {
                return(HttpNotFound());
            }
            ViewBag.AgingSchemeId = new SelectList(db.AgingSchemes, "AgingSchemeId", "SchemeName", agingThreshold.AgingSchemeId);
            return(View(agingThreshold));
        }