Ejemplo n.º 1
0
 public ActionResult Edit([Bind(Include = "ID,Path,Priority,Visiblity")] Tbl_Banners tbl_Banners)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tbl_Banners).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tbl_Banners));
 }
Ejemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "ID,FName,LName")] Tbl_authorsAndTranslators tbl_authorsAndTranslators)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tbl_authorsAndTranslators).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tbl_authorsAndTranslators));
 }
 public ActionResult Edit([Bind(Include = "ID,Name")] Tbl_ProductsType tbl_ProductsType)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tbl_ProductsType).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tbl_ProductsType));
 }
Ejemplo n.º 4
0
 public ActionResult Edit([Bind(Include = "ID,Name,AuthorID,PagesCount,Size,Fi,SubjectID,TranslatorID,Image,CoverType,ISBN,ReleasedDate,PublishedDate,circulation,IsTranslated")] Tbl_Books tbl_Books)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tbl_Books).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.AuthorID     = new SelectList(db.Tbl_authorsAndTranslators, "ID", "FName", tbl_Books.AuthorID);
     ViewBag.TranslatorID = new SelectList(db.Tbl_authorsAndTranslators, "ID", "FName", tbl_Books.TranslatorID);
     ViewBag.SubjectID    = new SelectList(db.Tbl_BooksCategories, "ID", "Name", tbl_Books.SubjectID);
     ViewBag.CoverType    = new SelectList(db.Tbl_BooksCoverType, "ID", "Name", tbl_Books.CoverType);
     ViewBag.Size         = new SelectList(db.Tbl_BooksSize, "ID", "Name", tbl_Books.Size);
     return(View(tbl_Books));
 }
        public ActionResult Edit([Bind(Include = "ID,Name,IsChild,ParentID")] Tbl_BooksCategories tbl_BooksCategories)
        {
            if (tbl_BooksCategories.ID == -1)
            {
                return(RedirectToAction("Index"));
            }

            if (ModelState.IsValid)
            {
                db.Entry(tbl_BooksCategories).State = EntityState.Modified;
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }
            ViewBag.ParentID = new SelectList(db.Tbl_BooksCategories, "ID", "Name", tbl_BooksCategories.ParentID);
            return(View(tbl_BooksCategories));
        }