public static Struct_UserRole GetRoles() { Struct_UserRole roleList = new Struct_UserRole(); LoginUser currentUser; try { if (!GetUserSession(out currentUser)) { roleList.errorCode = 1001; roleList.errorMessage = ""; return(roleList); } AdminManagerSP adminObj = new AdminManagerSP(); if (adminObj._U_GetRoles(currentUser.CompanyID, currentUser.UserId, out roleList)) { roleList.errorCode = 0; roleList.errorMessage = ""; } else { roleList.errorCode = 1; roleList.errorMessage = "Failed to get Role List. please try again later"; } } catch (Exception ex) { Utils.Write(ex); } return(roleList); }