Example #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            CR_AccountType cR_AccountType = db.CR_AccountType.Find(id);

            db.CR_AccountType.Remove(cR_AccountType);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
 public ActionResult Edit([Bind(Include = "Id,Name,Title,Description,Value")] CR_AccountType cR_AccountType)
 {
     if (ModelState.IsValid)
     {
         db.Entry(cR_AccountType).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(cR_AccountType));
 }
Example #3
0
        public ActionResult Create([Bind(Include = "Id,Name,Title,Description,Value")] CR_AccountType cR_AccountType)
        {
            if (ModelState.IsValid)
            {
                db.CR_AccountType.Add(cR_AccountType);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(cR_AccountType));
        }
Example #4
0
        // GET: CR_AccountType/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            CR_AccountType cR_AccountType = db.CR_AccountType.Find(id);

            if (cR_AccountType == null)
            {
                return(HttpNotFound());
            }
            return(View(cR_AccountType));
        }