Beispiel #1
0
        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());
        }
Beispiel #2
0
 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));
 }
Beispiel #3
0
 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));
 }
Beispiel #4
0
 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));
 }
Beispiel #5
0
 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));
 }
Beispiel #6
0
 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));
 }
Beispiel #7
0
 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));
 }
Beispiel #8
0
 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));
 }
Beispiel #9
0
 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));
 }
Beispiel #10
0
 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));
 }
Beispiel #11
0
 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));
 }
Beispiel #12
0
 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));
 }