public ActionResult Edit([Bind(Include = "switch,switch_port,vlan_id,asset_id,description,mac_address,static_ip,building,room")] Switch_Maps switch_Maps) { if (ModelState.IsValid) { db.Entry(switch_Maps).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(switch_Maps)); }
public ActionResult Edit([Bind(Include = "asset_id,description,device_type,device_subtype,manufacturer,model,serial_number,building,room,status,host_name,mac_address,static_ip,switch,switch_port,vlan_id,os_version,cpu,ram,hdd")] All_Device_Data all_Device_Data) { if (ModelState.IsValid) { db.Entry(all_Device_Data).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(all_Device_Data)); }
public ActionResult Edit([Bind(Include = "type,subtype")] device_types device_types) { if (ModelState.IsValid) { db.Entry(device_types).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(device_types)); }
public ActionResult Edit([Bind(Include = "asset_id,description,device_type,device_subtype,manufacturer,model,serial_number,building,room,status")] device device) { if (ModelState.IsValid) { db.Entry(device).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.asset_id = new SelectList(db.computers, "asset_id", "os_version", device.asset_id); //ViewBag.manufacturer = new SelectList(db.device_models, "manufacturer", "manufacturer", device.manufacturer); ViewBag.device_type = new SelectList(db.device_types, "type", "type", device.device_type); ViewBag.asset_id = new SelectList(db.network_devices, "asset_id", "host_name", device.asset_id); ViewBag.asset_id = new SelectList(db.wired_devices, "asset_id", "switch_port", device.asset_id); return(View(device)); }