Esempio n. 1
0
 public void UpdateSysRoleSysUser(string userId, string[] roleIds)
 {
     using (AppsDBEntities db = new AppsDBEntities())
     {
         db.P_Sys_DeleteSysRoleSysUserByUserId(userId);
         foreach (string roleid in roleIds)
         {
             if (!string.IsNullOrWhiteSpace(roleid))
             {
                 db.P_Sys_UpdateSysRoleSysUser(roleid, userId);
             }
         }
         db.SaveChanges();
     }
 }