public static AccrualBasisEarningCode CreateAccrualBasisEarningCode(string accrualId,
                                                                            string earningCodeId,
                                                                            string earningCodeGroupId,
                                                                            decimal accrualRate,
                                                                            global::Microsoft.Dynamics.DataEntities.EarningCodeGroup earningCodeGroup,
                                                                            global::Microsoft.Dynamics.DataEntities.AccrualPlan accrualPlan)
        {
            AccrualBasisEarningCode accrualBasisEarningCode = new AccrualBasisEarningCode();

            accrualBasisEarningCode.AccrualId          = accrualId;
            accrualBasisEarningCode.EarningCodeId      = earningCodeId;
            accrualBasisEarningCode.EarningCodeGroupId = earningCodeGroupId;
            accrualBasisEarningCode.AccrualRate        = accrualRate;
            if ((earningCodeGroup == null))
            {
                throw new global::System.ArgumentNullException("earningCodeGroup");
            }
            accrualBasisEarningCode.EarningCodeGroup = earningCodeGroup;
            if ((accrualPlan == null))
            {
                throw new global::System.ArgumentNullException("accrualPlan");
            }
            accrualBasisEarningCode.AccrualPlan = accrualPlan;
            return(accrualBasisEarningCode);
        }
 partial void OnEarningCodeGroupChanging(global::Microsoft.Dynamics.DataEntities.EarningCodeGroup value);
        public static TotalCompStatementSectionEarning CreateTotalCompStatementSectionEarning(string statementSectionId, string earningCodeGroupId, string earningCodeId, global::Microsoft.Dynamics.DataEntities.TotalCompStatementSectionHeader hcmTotalCompStatementSectionHeaderEntity, global::Microsoft.Dynamics.DataEntities.EarningCodeGroup payrollEarningCodeGroupEntity)
        {
            TotalCompStatementSectionEarning totalCompStatementSectionEarning = new TotalCompStatementSectionEarning();

            totalCompStatementSectionEarning.StatementSectionId = statementSectionId;
            totalCompStatementSectionEarning.EarningCodeGroupId = earningCodeGroupId;
            totalCompStatementSectionEarning.EarningCodeId      = earningCodeId;
            if ((hcmTotalCompStatementSectionHeaderEntity == null))
            {
                throw new global::System.ArgumentNullException("hcmTotalCompStatementSectionHeaderEntity");
            }
            totalCompStatementSectionEarning.HcmTotalCompStatementSectionHeaderEntity = hcmTotalCompStatementSectionHeaderEntity;
            if ((payrollEarningCodeGroupEntity == null))
            {
                throw new global::System.ArgumentNullException("payrollEarningCodeGroupEntity");
            }
            totalCompStatementSectionEarning.PayrollEarningCodeGroupEntity = payrollEarningCodeGroupEntity;
            return(totalCompStatementSectionEarning);
        }