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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }