Esempio n. 1
0
 public ActionResult SettingsIO(ViewDeviceIO viewlayoutIO)
 {
     for (int i = 0; i < viewlayoutIO.DeviceIO.Count; i++)
     {
         DeviceIO data = db.DeviceIO.Find(viewlayoutIO.DeviceIO[i].ioId);
         data.ioName    = viewlayoutIO.DeviceIO[i].ioName;
         data.ioValType = viewlayoutIO.DeviceIO[i].ioValType;
     }
     return(RedirectToAction("SettingsIO"));
 }
Esempio n. 2
0
        public ActionResult SettingsIO(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            List <DeviceIO> devLayoutIO  = db.DeviceIO.Where(ls => ls.ioDeviceId == id).ToList();
            ViewDeviceIO    viewlayoutIO = new ViewDeviceIO
            {
                DeviceIO = devLayoutIO
            };

            if (devLayoutIO == null)
            {
                return(HttpNotFound());
            }
            return(View(viewlayoutIO));
        }