Example #1
0
 public ActionResult Edit([Bind(Include = "ID,Item,CreatedDate")] CardioItem cardioItem)
 {
     if (ModelState.IsValid)
     {
         db.Entry(cardioItem).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(cardioItem));
 }
Example #2
0
 public ActionResult Edit([Bind(Include = "index,Title,Delete,IPAddress,Longitude,Latitude")] PunshmentAction punshmentAction)
 {
     if (ModelState.IsValid)
     {
         db.Entry(punshmentAction).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(punshmentAction));
 }
Example #3
0
 public ActionResult Edit([Bind(Include = "ID,TypeName")] GasolineType gasolineType)
 {
     if (ModelState.IsValid)
     {
         db.Entry(gasolineType).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(gasolineType));
 }
Example #4
0
 public ActionResult Edit([Bind(Include = "ID,Type,Deleted,IPAddress,Longitude,Latitude")] ReminderType reminderType)
 {
     if (ModelState.IsValid)
     {
         db.Entry(reminderType).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(reminderType));
 }
Example #5
0
 public ActionResult Edit([Bind(Include = "ID,PersonID,Weight,WeightDate,Deleted,Notes")] WeightLog weightLog)
 {
     if (ModelState.IsValid)
     {
         db.Entry(weightLog).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(weightLog));
 }
Example #6
0
 public ActionResult Edit([Bind(Include = "ID,BabyName1,Delete,IPAddress,Longitude,Latitude")] BabyName babyName)
 {
     if (ModelState.IsValid)
     {
         db.Entry(babyName).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(babyName));
 }
Example #7
0
 public ActionResult Edit([Bind(Include = "Index,Category")] ActionCategory actionCategory)
 {
     if (ModelState.IsValid)
     {
         db.Entry(actionCategory).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(actionCategory));
 }
Example #8
0
 public ActionResult Edit([Bind(Include = "ID,Date,IPAddress,ControllerName,ActionName,ActionParameters,AbsoluteUri,Notes")] Logging logging)
 {
     if (ModelState.IsValid)
     {
         db.Entry(logging).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(logging));
 }
Example #9
0
 public ActionResult Edit([Bind(Include = "Id,Size,IPAddress,Longitude,Latitude,CreatedOn")] ItemSize itemSize)
 {
     if (ModelState.IsValid)
     {
         db.Entry(itemSize).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(itemSize));
 }
Example #10
0
 public ActionResult Edit([Bind(Include = "ID,IssueDate,WhatHappened,CreatedOn")] Issue issue)
 {
     if (ModelState.IsValid)
     {
         db.Entry(issue).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(issue));
 }
Example #11
0
 public ActionResult Edit([Bind(Include = "Id,Type,Deleted")] LiquidSize liquidSize)
 {
     if (ModelState.IsValid)
     {
         db.Entry(liquidSize).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Id = new SelectList(db.LiquidSizes, "Id", "Type", liquidSize.Id);
     return(View(liquidSize));
 }
Example #12
0
 public ActionResult Edit([Bind(Include = "ID,AccessPage1,Disactive,PersonID")] AccessPage accessPage)
 {
     if (ModelState.IsValid)
     {
         db.Entry(accessPage).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.PersonID = new SelectList(db.People, "ID", "PersonName", accessPage.PersonID);
     return(View(accessPage));
 }
Example #13
0
 public ActionResult Edit([Bind(Include = "ID,CreatedDate,IssueDate,Issues,Planned,Deleted")] Entry entry)
 {
     if (ModelState.IsValid)
     {
         entry.Planned         = entry.Planned ?? "";
         db.Entry(entry).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(entry));
 }
Example #14
0
 public ActionResult Edit([Bind(Include = "StationID,StationName,CreatedOn,UpdatedOn,IPAddress,Broswer,Deleted")] Station station)
 {
     if (ModelState.IsValid)
     {
         db.Entry(station).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     //ViewBag.StationID = new SelectList(db.Stations, "StationID", "StationName", station.StationID);
     ViewBag.StationID = new SelectList(db.Stations, "StationID", "StationName", station.StationID);
     return(View(station));
 }
Example #15
0
 public ActionResult Edit([Bind(Include = "ID,StoreID,Price,Date,IPAddress,Longitude,Latitude,ItemID")] PriceHistory priceHistory)
 {
     if (ModelState.IsValid)
     {
         db.Entry(priceHistory).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.StoreID = new SelectList(db.Stores, "ID", "StoreName", priceHistory.StoreID);
     ViewBag.ItemID  = new SelectList(db.Items, "ID", "Name", priceHistory.ItemID);
     return(View(priceHistory));
 }
Example #16
0
 public ActionResult Edit([Bind(Include = "ID,Deleted,IPAddress,Longitude,Latitude,StartDate,EndDate,ActionID,RemeberType,Every")] Reminder reminder)
 {
     if (ModelState.IsValid)
     {
         db.Entry(reminder).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ActionID    = new SelectList(db.Actions1.Where(m => m.Delete == false).OrderBy(m => m.Title), "index", "Title", reminder.ActionID);
     ViewBag.RemeberType = new SelectList(db.ReminderTypes, "ID", "Type", reminder.RemeberType);
     return(View(reminder));
 }
Example #17
0
        public ActionResult Edit([Bind(Include = "ID,Date,Dream1,Person")] Dream dream)
        {
            //if (ModelState.IsValid)
            //{
            db.Entry(dream).State = EntityState.Modified;
            db.SaveChanges();
            return(RedirectToAction("Index"));

            //}
            ViewBag.Person = new SelectList(db.People, "ID", "PersonName", dream.Person);
            return(View(dream));
        }
Example #18
0
 public ActionResult Edit([Bind(Include = "NotesID,Note,AutoID,CreatedOn,UpdatedOn,IPAddress,Broswer,Deleted,NoteDate")] GasNote gasNote)
 {
     if (ModelState.IsValid)
     {
         db.Entry(gasNote).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.NotesID = new SelectList(db.Autos, "ID", "AutoName", gasNote.NotesID);
     ViewBag.AutoID  = new SelectList(db.Autos, "ID", "AutoName", gasNote.AutoID);
     return(View(gasNote));
 }
Example #19
0
 public ActionResult Edit([Bind(Include = "index,BabyNameID,PunshmentActions,StartTime,Delete,Notes,IPAddress,Longitude,Latitude,LiquidSizeID")] Punshment punshment)
 {
     if (ModelState.IsValid)
     {
         db.Entry(punshment).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.BabyNameID       = new SelectList(db.BabyNames, "ID", "BabyName1", punshment.BabyNameID);
     ViewBag.PunshmentActions = new SelectList(db.PunshmentActions, "index", "Title", punshment.PunshmentActions);
     return(View(punshment));
 }
Example #20
0
        public ActionResult Edit(CardioLog cardioLog)
        {
            //if (ModelState.IsValid)
            //{
            cardioLog.Person          = db.CardioLogs.Where(m => m.ID == cardioLog.ID).First().Person;
            db.Entry(cardioLog).State = EntityState.Modified;

            db.SaveChanges();
            return(RedirectToAction("Index"));

            //}
            ViewBag.CardioItemID = new SelectList(db.CardioItems, "ID", "Item", cardioLog.CardioItemID);
            ViewBag.CreatedBy    = new SelectList(db.People, "ID", "PersonName", cardioLog.CreatedBy);
            return(View(cardioLog));
        }
Example #21
0
        public ActionResult Edit(Person person)
        {
            if (ModelState.IsValid)
            {
                //if(person.SaltHash.Length.Equals(0))
                //    person.SaltHash = GenerateSaltValue();

                person.Password = EncryptionUtilities.CreatePasswordSalt(person.Password);

                db.Entry(person).State = EntityState.Modified;
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }
            return(View(person));
        }