public static EmployeePayrollRecordActionFormMode MapToFormMode(EmployeePayrollRecordResult recordResult) { switch (recordResult) { case EmployeePayrollRecordResult.Approved: return(EmployeePayrollRecordActionFormMode.Approve); case EmployeePayrollRecordResult.ApprovedWithSuggestions: return(EmployeePayrollRecordActionFormMode.ApproveWithSuggestions); case EmployeePayrollRecordResult.FinalApprovedHDCuratorVersion: return(EmployeePayrollRecordActionFormMode.FinalApproveHDCuratorVersion); case EmployeePayrollRecordResult.FinalApprovedHDVersion: return(EmployeePayrollRecordActionFormMode.FinalApproveHDVersion); case EmployeePayrollRecordResult.FinalApprovedWithSuggestions: return(EmployeePayrollRecordActionFormMode.FinalApproveWithSuggestions); case EmployeePayrollRecordResult.Rejected: return(EmployeePayrollRecordActionFormMode.Reject); default: return(EmployeePayrollRecordActionFormMode.Approve); } }
public static string GetDisplayShortNameFor(EmployeePayrollRecordResult type) { return(type.GetType().GetMember(type.ToString()).First().GetCustomAttribute <DisplayAttribute>().ShortName); }