public async Task <CustomStateDetail> GetCustomPersonnelStatusAsync(int departmentId, ActionLog state) { if (state.ActionTypeId <= 25) { var detail = new CustomStateDetail(); detail.ButtonText = state.GetActionText(); detail.ButtonColor = state.GetActionCss(); if (string.IsNullOrWhiteSpace(detail.ButtonColor)) { detail.ButtonColor = "label-default"; } return(detail); } else { var stateDetail = await GetCustomDetailForDepartmentAsync(departmentId, state.ActionTypeId); return(stateDetail); } }
public static CustomStateDetail GetCustomPersonnelStatus(int departmentId, ActionLog state) { if (state.ActionTypeId <= 25) { var detail = new CustomStateDetail(); detail.ButtonText = state.GetActionText(); detail.ButtonColor = state.GetActionCss(); if (string.IsNullOrWhiteSpace(detail.ButtonColor)) { detail.ButtonColor = "label-default"; } return(detail); } else { var customStateService = WebBootstrapper.GetKernel().Resolve <ICustomStateService>(); var stateDetail = customStateService.GetCustomDetailForDepartment(departmentId, state.ActionTypeId); return(stateDetail); } }