Beispiel #1
0
 /// <summary>Insert or Update UserRole.</summary>
 /// <param name="privilegeList">The List of AddRoleUser Object.</param>
 /// <param name="rolePrivilege">The RoleUserlist Object.</param>
 /// <returns>Boolean Object.</returns>
 public bool UserRoleUpsert(List <AddRoleUser> privilegeList, RoleUserlist rolePrivilege)
 {
     Logging.LogDebugMessage("Method: UserRoleUpsert, MethodType: Post, Layer: SecurityBL, Parameters: privilegelist = " + JsonConvert.SerializeObject(privilegeList) + ",rolePrivilege = " + JsonConvert.SerializeObject(rolePrivilege));
     using (SecurityDAL useRoleUpsert = new SecurityDAL())
     {
         try
         {
             return(useRoleUpsert.UserRoleUpsert(privilegeList, rolePrivilege));
         }
         catch (SqlException sqlEx)
         {
             Logging.LogErrorMessage("Method: UserRoleUpsert, Layer: SecurityBL, Stack Trace: " + sqlEx.ToString());
             throw;
         }
         catch (Exception ex)
         {
             Logging.LogErrorMessage("Method: UserRoleUpsert, Layer: SecurityBL, Stack Trace: " + ex.ToString());
             throw;
         }
     }
 }