Esempio n. 1
0
 public ActionResult Edit([Bind(Include = "Id,Title")] Image image)
 {
     if (ModelState.IsValid)
     {
         db.Entry(image).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(image));
 }
Esempio n. 2
0
 public ActionResult Edit([Bind(Include = "Id,Name,Power,SideEffect,Description,MedicineTypeId,CompanyId,ShopId,ImageId,VideoId")] Medicine medicine)
 {
     if (ModelState.IsValid)
     {
         db.Entry(medicine).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(medicine));
 }
Esempio n. 3
0
 public ActionResult Edit([Bind(Include = "Id,Name,Description")] FeedType feedType)
 {
     if (ModelState.IsValid)
     {
         db.Entry(feedType).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(feedType));
 }
Esempio n. 4
0
 public ActionResult Edit([Bind(Include = "Id,Name,Link")] Video video)
 {
     if (ModelState.IsValid)
     {
         db.Entry(video).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(video));
 }
Esempio n. 5
0
 public ActionResult Edit([Bind(Include = "Id,Name,Sign,FirstAid,Description,MedicineTypeId,ImageId,VideoId")] Disease disease)
 {
     if (ModelState.IsValid)
     {
         db.Entry(disease).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(disease));
 }
Esempio n. 6
0
 public ActionResult Edit([Bind(Include = "Id,Name")] Country country)
 {
     if (ModelState.IsValid)
     {
         db.Entry(country).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(country));
 }
Esempio n. 7
0
 public ActionResult Edit([Bind(Include = "Id,Name,Contact,Description,CityId,ImageId")] Company company)
 {
     if (ModelState.IsValid)
     {
         db.Entry(company).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     ViewBag.CityId = new SelectList(db.City, "Id", "Name", company.CityId);
     return View(company);
 }
Esempio n. 8
0
 public ActionResult Edit([Bind(Include = "Id,Name,Contact,Location,Description,CityId")] Shop shop)
 {
     if (ModelState.IsValid)
     {
         db.Entry(shop).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CityId = new SelectList(db.City, "Id", "Name", shop.CityId);
     return(View(shop));
 }
Esempio n. 9
0
 public ActionResult Edit([Bind(Include = "Id,Name,Description,FeedTypeId,CompanyId,ShopId,ImageId,VideoId")] Feed feed)
 {
     if (ModelState.IsValid)
     {
         db.Entry(feed).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.FeedTypeId = new SelectList(db.FeedType, "Id", "Name", feed.FeedTypeId);
     return(View(feed));
 }
Esempio n. 10
0
 public ActionResult Edit([Bind(Include = "Id,Name,CountryId")] City city)
 {
     if (ModelState.IsValid)
     {
         db.Entry(city).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CountryId = new SelectList(db.Country, "Id", "Name", city.CountryId);
     return(View(city));
 }