Beispiel #1
0
 public ActionResult Edit([Bind(Include = "ID,COMPLETED,DATCOMPLETED,TITLE,STARTDATE,DESCRIPTION")] PROJECT pROJECT)
 {
     if (ModelState.IsValid)
     {
         db.Entry(pROJECT).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(pROJECT));
 }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "Id,disabled,FirstName,LastName,Email,EmailConfirmed,PasswordHash,SecurityStamp,PhoneNumber,PhoneNumberConfirmed,TwoFactorEnabled,LockoutEndDateUtc,LockoutEnabled,AccessFailedCount,UserName,Discriminator")] AspNetUser aspNetUser)
 {
     if (ModelState.IsValid)
     {
         db.Entry(aspNetUser).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(aspNetUser));
 }
Beispiel #3
0
 public ActionResult Edit([Bind(Include = "ID,SenderID,RecieverID,DATETIMEMADE,TEXT")] Message message)
 {
     if (ModelState.IsValid)
     {
         db.Entry(message).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.RecieverID = new SelectList(db.AspNetUsers, "Id", "FirstName", message.RecieverID);
     ViewBag.SenderID   = new SelectList(User.Identity.GetUserId(), "Id", "FirstName", User.Identity.GetUserId());
     return(View(message));
 }
Beispiel #4
0
 public ActionResult Edit([Bind(Include = "ID,REPLIED_TO_POST_ID,USERID,SUBJECT,TITLE,DATETIMEPOSTED")] POST pOST)
 {
     if (ModelState.IsValid)
     {
         db.Entry(pOST).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.USERID             = new SelectList(db.AspNetUsers, "Id", "FirstName", pOST.USERID);
     ViewBag.REPLIED_TO_POST_ID = new SelectList(db.POSTs, "ID", "USERID", pOST.REPLIED_TO_POST_ID);
     return(View(pOST));
 }