Пример #1
0
        public ActionResult DeleteConfirmed(string id)
        {
            COMPANY_CATEGORIES cOMPANY_CATEGORIES = db.COMPANY_CATEGORIES.Find(id);

            db.COMPANY_CATEGORIES.Remove(cOMPANY_CATEGORIES);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Пример #2
0
 public ActionResult Edit([Bind(Include = "COMPANY_CATEGORY_ID,COMPANY_CATEGORY_NAME,NOTED")] COMPANY_CATEGORIES cOMPANY_CATEGORIES)
 {
     if (ModelState.IsValid)
     {
         db.Entry(cOMPANY_CATEGORIES).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(cOMPANY_CATEGORIES));
 }
Пример #3
0
        public ActionResult Create([Bind(Include = "COMPANY_CATEGORY_ID,COMPANY_CATEGORY_NAME,NOTED")] COMPANY_CATEGORIES cOMPANY_CATEGORIES)
        {
            if (ModelState.IsValid)
            {
                db.COMPANY_CATEGORIES.Add(cOMPANY_CATEGORIES);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(cOMPANY_CATEGORIES));
        }
Пример #4
0
        // GET: COMPANY_CATEGORIES/Edit/5
        public ActionResult Edit(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            COMPANY_CATEGORIES cOMPANY_CATEGORIES = db.COMPANY_CATEGORIES.Find(id);

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