public ActionResult Edit([Bind(Include = "stor_id,stor_name,stor_address,city,state,zip")] stores stores)
 {
     if (ModelState.IsValid)
     {
         db.Entry(stores).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(stores));
 }
예제 #2
0
 public ActionResult Edit([Bind(Include = "job_id,job_desc,min_lvl,max_lvl")] jobs jobs)
 {
     if (ModelState.IsValid)
     {
         db.Entry(jobs).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(jobs));
 }
예제 #3
0
 public ActionResult Edit([Bind(Include = "au_id,au_lname,au_fname,phone,address,city,state,zip,contract")] authors authors)
 {
     if (ModelState.IsValid)
     {
         db.Entry(authors).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(authors));
 }
 public ActionResult Edit([Bind(Include = "pub_id,pub_name,city,state,country")] publishers publishers)
 {
     if (ModelState.IsValid)
     {
         db.Entry(publishers).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.pub_id = new SelectList(db.pub_info, "pub_id", "pr_info", publishers.pub_id);
     return(View(publishers));
 }
 public ActionResult Edit([Bind(Include = "discounttype,stor_id,lowqty,highqty,discount")] discounts discounts)
 {
     if (ModelState.IsValid)
     {
         db.Entry(discounts).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.stor_id = new SelectList(db.stores, "stor_id", "stor_name", discounts.stor_id);
     return(View(discounts));
 }
 public ActionResult Edit([Bind(Include = "pub_id,logo,pr_info")] pub_info pub_info)
 {
     if (ModelState.IsValid)
     {
         db.Entry(pub_info).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     ViewBag.pub_id = new SelectList(db.publishers, "pub_id", "pub_name", pub_info.pub_id);
     return View(pub_info);
 }
예제 #7
0
 public ActionResult Edit([Bind(Include = "title_id,lorange,hirange,royalty")] roysched roysched)
 {
     if (ModelState.IsValid)
     {
         db.Entry(roysched).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.title_id = new SelectList(db.titles, "title_id", "title", roysched.title_id);
     return(View(roysched));
 }
 public ActionResult Edit([Bind(Include = "emp_id,fname,minit,lname,job_id,job_lvl,pub_id,hire_date")] employee employee)
 {
     if (ModelState.IsValid)
     {
         db.Entry(employee).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.job_id = new SelectList(db.jobs, "job_id", "job_desc", employee.job_id);
     ViewBag.pub_id = new SelectList(db.publishers, "pub_id", "pub_name", employee.pub_id);
     return(View(employee));
 }
 public ActionResult Edit([Bind(Include = "title_id,title,type,pub_id,price,advance,royalty,ytd_sales,notes,pubdate")] titles titles)
 {
     if (ModelState.IsValid)
     {
         db.Entry(titles).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.pub_id   = new SelectList(db.publishers, "pub_id", "pub_name", titles.pub_id);
     ViewBag.title_id = new SelectList(db.roysched, "title_id", "title_id", titles.title_id);
     return(View(titles));
 }
 public ActionResult Edit([Bind(Include = "au_id,title_id,au_ord,royaltyper")] titleauthor titleauthor)
 {
     if (ModelState.IsValid)
     {
         db.Entry(titleauthor).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.au_id    = new SelectList(db.authors, "au_id", "au_lname", titleauthor.au_id);
     ViewBag.title_id = new SelectList(db.titles, "title_id", "title", titleauthor.title_id);
     return(View(titleauthor));
 }
 public ActionResult Edit([Bind(Include = "stor_id,ord_num,ord_date,qty,payterms,title_id")] sales sales)
 {
     if (ModelState.IsValid)
     {
         db.Entry(sales).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.stor_id  = new SelectList(db.stores, "stor_id", "stor_name", sales.stor_id);
     ViewBag.title_id = new SelectList(db.titles, "title_id", "title", sales.title_id);
     return(View(sales));
 }