Ejemplo n.º 1
0
 public ActionResult Edit([Bind(Include = "CompId,CompPay")] Compensation compensation)
 {
     if (ModelState.IsValid)
     {
         db.Entry(compensation).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(compensation));
 }
Ejemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "RegionId,RegionName")] Region region)
 {
     if (ModelState.IsValid)
     {
         db.Entry(region).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(region));
 }
Ejemplo n.º 3
0
 public ActionResult Edit([Bind(Include = "FollowerId,FollowerCount")] Follower follower)
 {
     if (ModelState.IsValid)
     {
         db.Entry(follower).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(follower));
 }
Ejemplo n.º 4
0
 public ActionResult Edit([Bind(Include = "PostId,PostNum")] Post post)
 {
     if (ModelState.IsValid)
     {
         db.Entry(post).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(post));
 }
Ejemplo n.º 5
0
 public ActionResult Edit([Bind(Include = "BrandId,CompanyName,Product,ProductDescription,PostId,CompId")] Brand brand)
 {
     if (ModelState.IsValid)
     {
         db.Entry(brand).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CompId = new SelectList(db.Compensations, "CompId", "CompPay", brand.CompId);
     ViewBag.PostId = new SelectList(db.Posts, "PostId", "PostNum", brand.PostId);
     return(View(brand));
 }
Ejemplo n.º 6
0
 public ActionResult Edit([Bind(Include = "SociaLId,Name,SocailMName,FollowerCountId,RegionId,CompId,Email,Image_")] SocialUser socialUser)
 {
     if (ModelState.IsValid)
     {
         db.Entry(socialUser).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CompId          = new SelectList(db.Compensations, "CompId", "CompPay", socialUser.CompId);
     ViewBag.FollowerCountId = new SelectList(db.Followers, "FollowerId", "FollowerCount", socialUser.FollowerCountId);
     ViewBag.RegionId        = new SelectList(db.Regions, "RegionId", "RegionName", socialUser.RegionId);
     return(View(socialUser));
 }