public async Task <IActionResult> PutTblSite(int id, tblSite tblSite) { if (id != tblSite.SiteID) { return(BadRequest()); } _context.Entry(tblSite).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TblSiteExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public ActionResult Edit([Bind(Include = "Id,RegionName,RegionCode")] Region region) { if (ModelState.IsValid) { db.Entry(region).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(region)); }
public ActionResult Edit([Bind(Include = "Id,CountryName,Code,ISO2,ISO3,DateAdded,LastUpdated,Statusflag,Slug")] Country country) { if (ModelState.IsValid) { db.Entry(country).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(country)); }
public ActionResult Edit([Bind(Include = "Id,AppName,DateAdded,LastUpdated,Statusflag,Slug")] App app) { if (ModelState.IsValid) { db.Entry(app).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(app)); }
public ActionResult Edit([Bind(Include = "Id,BranchName,BranchCode,AddressId,DateAdded,LastUpdated,Statusflag,Slug")] Branch branch) { if (ModelState.IsValid) { db.Entry(branch).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.AddressId = new SelectList(db.Addresses, "Id", "Slug", branch.AddressId); return(View(branch)); }
public ActionResult Edit([Bind(Include = "Id,LocationName,LocationCode,RegionId,DateAdded,LastUpdated,Statusflag,Slug")] Location location) { if (ModelState.IsValid) { db.Entry(location).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.RegionId = new SelectList(db.Regions, "Id", "RegionName", location.RegionId); return(View(location)); }
public ActionResult Edit([Bind(Include = "Id,ShortName,LongName,CountryId,DateAdded,LastUpdated,Statusflag,Slug")] City city) { if (ModelState.IsValid) { db.Entry(city).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CountryId = new SelectList(db.Countries, "Id", "CountryName", city.CountryId); return(View(city)); }
public ActionResult Edit([Bind(Include = "Id,RoleName,AppId,RoleValue,RoleDescr,DateAdded,LastUpdated,Statusflag,Slug")] Role role) { if (ModelState.IsValid) { db.Entry(role).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.AppId = new SelectList(db.Apps, "Id", "AppName", role.AppId); return(View(role)); }
public ActionResult Edit([Bind(Include = "Id,FxnName,AppId,FxnGroup,FxnUrl,FxnFlag,FxnSort,FxnSecured,DateAdded,LastUpdated,Statusflag,Slug")] Fxn fxn) { if (ModelState.IsValid) { db.Entry(fxn).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.AppId = new SelectList(db.Apps, "Id", "AppName", fxn.AppId); return(View(fxn)); }
public ActionResult Edit([Bind(Include = "Id,Line1,Line2,Landmark,PostCode,CityId,DateAdded,LastUpdated,Statusflag,Slug")] Address address) { if (ModelState.IsValid) { db.Entry(address).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CityId = new SelectList(db.Cities, "Id", "ShortName", address.CityId); return(View(address)); }
public ActionResult Edit([Bind(Include = "Id,UserName,Pwd,Salt,Code,PwdExpire,LastName,FirstName,Email,Mobile,LocationId,UserGroupId,UserCode1,UserCode2,UserCode3,UserCode4,UserCode5,DateAdded,LastUpdated,Statusflag,Slug")] User user) { if (ModelState.IsValid) { db.Entry(user).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.LocationId = new SelectList(db.Locations, "Id", "LocationName", user.LocationId); ViewBag.UserGroupId = new SelectList(db.UserGroups, "Id", "UserGroupName", user.UserGroupId); return(View(user)); }
public ActionResult Edit([Bind(Include = "UserGroupId,RoleId,DateAdded,LastUpdated,Statusflag,Slug")] UserGroupRole usergrouprole) { if (ModelState.IsValid) { db.Entry(usergrouprole).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.RoleId = new SelectList(db.Roles, "Id", "RoleName", usergrouprole.RoleId); ViewBag.UserGroupId = new SelectList(db.UserGroups, "Id", "UserGroupName", usergrouprole.UserGroupId); return(View(usergrouprole)); }