public ActionResult Edit([Bind(Include = "ClientID,Name,Type,ClientCode,Description")] Client client) { if (ModelState.IsValid) { db.Entry(client).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(client)); }
public ActionResult Edit([Bind(Include = "Name,DateInitiated,HomeAddress,City,State,ZIP,Description,FamilyName")] Ecosystem dARESystem) { if (ModelState.IsValid) { db.Entry(dARESystem).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(dARESystem)); }
public ActionResult Edit([Bind(Include = "DataID,ThingID,Temperature,Date")] SensorData sensorData) { if (ModelState.IsValid) { db.Entry(sensorData).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ThingID = new SelectList(db.Things, "ThingID", "Name", sensorData.ThingID); return(View(sensorData)); }
public ActionResult Edit([Bind(Include = "ActionID,ThingID,Name,Description")] Models.Action model) { if (ModelState.IsValid) { db.Entry(model).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ThingID = new SelectList(db.Things, "ThingID", "Name", model.ThingID); return(View(model)); }
public ActionResult Edit([Bind(Include = "EventID,ThingID,Action,Type,Date")] Event @event) { if (ModelState.IsValid) { db.Entry(@event).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ThingID = new SelectList(db.Things, "ThingID", "Name", @event.ThingID); return(View(@event)); }
public ActionResult Edit([Bind(Include = "ThingID,ClientID,Name,Description,StateDescriptor")] Thing thing) { if (ModelState.IsValid) { db.Entry(thing).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ClientID = new SelectList(db.Clients, "ClientID", "Name", thing.ClientID); return(View(thing)); }
public ActionResult Edit([Bind(Include = "ScheduleID,ThingID,ActionID,Name,CronExpression,Description")] Schedule schedule) { if (ModelState.IsValid) { db.Entry(schedule).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ThingID = new SelectList(db.Things, "ThingID", "Name", schedule.ThingID); return(View(schedule)); }
public ActionResult Edit([Bind(Include = "NoteID,SenderID,ReceiverID,Subject,Message,isNew,Alert,PushNotification,CreationDate,AlertDate")] Note note) { if (ModelState.IsValid) { db.Entry(note).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Sent")); } ViewBag.SenderID = new SelectList(db.Users, "UserID", "Username", note.SenderID); ViewBag.ReceiverID = new SelectList(db.Users, "UserID", "Username", note.ReceiverID); return(View(note)); }