public ActionResult Edit([Bind(Include = "Id,Name")] AspNetRole aspNetRole) { if (ModelState.IsValid) { db.Entry(aspNetRole).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(aspNetRole)); }
public ActionResult Edit([Bind(Include = "Id,Name")] T_PlcBrand t_PlcBrand) { if (ModelState.IsValid) { db.Entry(t_PlcBrand).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(t_PlcBrand)); }
public ActionResult Edit([Bind(Include = "Id,Name,IpAddress,T_PlcBrandId")] T_Plc t_Plc) { if (ModelState.IsValid) { db.Entry(t_Plc).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.T_PlcBrandId = new SelectList(db.T_PlcBrand, "Id", "Name", t_Plc.T_PlcBrandId); return(View(t_Plc)); }
public ActionResult Edit([Bind(Include = "Id,Name,T_PlcId")] T_DataPoint t_DataPoint) { if (ModelState.IsValid) { db.Entry(t_DataPoint).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.T_PlcId = new SelectList(db.T_Plc, "Id", "Name", t_DataPoint.T_PlcId); return(View(t_DataPoint)); }
public ActionResult Edit([Bind(Include = "Id,T_DataPoint,Value,DateTime")] T_DataValue t_DataValue) { if (ModelState.IsValid) { db.Entry(t_DataValue).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.T_DataPoint = new SelectList(db.T_DataPoint, "Id", "Name", t_DataValue.T_DataPoint); return(View(t_DataValue)); }
public ActionResult Edit([Bind(Include = "Id,T_UserId,Name,Created,Updated")] T_SavedChart t_SavedChart) { if (ModelState.IsValid) { db.Entry(t_SavedChart).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.T_UserId = new SelectList(db.AspNetUsers, "Id", "Email", t_SavedChart.T_UserId); return(View(t_SavedChart)); }
public ActionResult Edit([Bind(Include = "Id,T_SavedChartId,T_DataPointId")] T_ChartData t_ChartData) { if (ModelState.IsValid) { db.Entry(t_ChartData).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.T_DataPointId = new SelectList(db.T_DataPoint, "Id", "Name", t_ChartData.T_DataPointId); ViewBag.T_SavedChartId = new SelectList(db.T_SavedChart, "Id", "T_UserId", t_ChartData.T_SavedChartId); return(View(t_ChartData)); }
public ActionResult Edit([Bind(Include = "Id,T_UserId,T_PlcId")] T_UserPlc t_UserPlc) { if (ModelState.IsValid) { db.Entry(t_UserPlc).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.T_UserId = new SelectList(db.AspNetUsers, "Id", "Email", t_UserPlc.T_UserId); ViewBag.T_PlcId = new SelectList(db.T_Plc, "Id", "Name", t_UserPlc.T_PlcId); return(View(t_UserPlc)); }
public ActionResult Edit([Bind(Include = "Id,UserId,RoleId")] AspNetUserRole aspNetUserRole) { if (ModelState.IsValid) { db.Entry(aspNetUserRole).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.RoleId = new SelectList(db.AspNetRoles, "Id", "Name", aspNetUserRole.RoleId); ViewBag.UserId = new SelectList(db.AspNetUsers, "Id", "Email", aspNetUserRole.UserId); return(View(aspNetUserRole)); }