예제 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            NavigationName Nav = Db.NavigationNames.Find(id);

            Db.NavigationNames.Remove(Nav);
            Db.SaveChanges();
            return(RedirectToAction("VIewNag"));
        }
예제 #2
0
 public ActionResult NewCatagoryAdd(NavigationName ad)
 {
     using (var context = new DemoNewEntities())
     {
         context.NavigationNames.Add(ad);
         context.SaveChanges();
     }
     return(RedirectToAction("VIewNag"));
 }
예제 #3
0
 public ActionResult Edit([Bind(Include = "NavId,CatagoryName")] NavigationName Var)
 {
     if (ModelState.IsValid)
     {
         Db.Entry(Var).State = EntityState.Modified;
         Db.SaveChanges();
         return(RedirectToAction("VIewNag"));
     }
     return(View(Var));
 }
예제 #4
0
        // GET: FiftyTakaData/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            NavigationName Nav = Db.NavigationNames.Find(id);

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