public async Task <CustomStateDetail> GetCustomPersonnelStaffingAsync(int departmentId, UserState state) { if (state.State <= 25) { var detail = new CustomStateDetail(); detail.ButtonText = state.GetStaffingText(); detail.ButtonColor = state.GetStaffingCss(); if (string.IsNullOrWhiteSpace(detail.ButtonColor)) { detail.ButtonColor = "label-default"; } return(detail); } else { var stateDetail = await GetCustomDetailForDepartmentAsync(departmentId, state.State); return(stateDetail); } }
public static CustomStateDetail GetCustomPersonnelStaffing(int departmentId, UserState state) { if (state.State <= 25) { var detail = new CustomStateDetail(); detail.ButtonText = state.GetStaffingText(); detail.ButtonColor = state.GetStaffingCss(); if (string.IsNullOrWhiteSpace(detail.ButtonColor)) { detail.ButtonColor = "label-default"; } return(detail); } else { var customStateService = WebBootstrapper.GetKernel().Resolve <ICustomStateService>(); var stateDetail = customStateService.GetCustomDetailForDepartment(departmentId, state.State); return(stateDetail); } }