public async Task <IActionResult> PutSys_Dm_Company(int id, Sys_Dm_Company sys_Dm_Company) { if (id != sys_Dm_Company.Id) { return(BadRequest()); } _context.Entry(sys_Dm_Company).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!Sys_Dm_CompanyExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutSys_Dm_GroupRole(int id, Sys_Dm_GroupRole sys_Dm_Group) { if (id != sys_Dm_Group.Id) { return(new ObjectResult(new { error = 1 })); } sys_Dm_Group.RankRole = GetRankRole(sys_Dm_Group); _context.Entry(sys_Dm_Group).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { return(new ObjectResult(new { error = 1 })); } return(new ObjectResult(new { error = 0 })); }