示例#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));
 }
示例#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));
 }
示例#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));
 }
示例#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));
 }
示例#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));
 }
示例#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));
 }
示例#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);
 }
示例#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));
 }
示例#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));
 }
示例#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));
 }