public static Benefit CreateBenefit(string benefitPlanId, string benefitOptionId, global::System.DateTimeOffset effective, global::System.DateTimeOffset expiration, global::Microsoft.Dynamics.DataEntities.BenefitPlan benefitPlan, global::Microsoft.Dynamics.DataEntities.BenefitOption benefitOption) { Benefit benefit = new Benefit(); benefit.BenefitPlanId = benefitPlanId; benefit.BenefitOptionId = benefitOptionId; benefit.Effective = effective; benefit.Expiration = expiration; if ((benefitPlan == null)) { throw new global::System.ArgumentNullException("benefitPlan"); } benefit.BenefitPlan = benefitPlan; if ((benefitOption == null)) { throw new global::System.ArgumentNullException("benefitOption"); } benefit.BenefitOption = benefitOption; return(benefit); }
public static BenefitEligibilityOverride CreateBenefitEligibilityOverride(string benefitPlanId, string benefitOptionId, global::System.DateTimeOffset effective, global::System.DateTimeOffset expiration, string workerId, global::System.DateTimeOffset overrideStartDate, global::System.DateTimeOffset overrideEndDate, global::Microsoft.Dynamics.DataEntities.BenefitPlan benefitPlan, global::Microsoft.Dynamics.DataEntities.Worker worker, global::Microsoft.Dynamics.DataEntities.BenefitOption benefitOption, global::Microsoft.Dynamics.DataEntities.Benefit benefit) { BenefitEligibilityOverride benefitEligibilityOverride = new BenefitEligibilityOverride(); benefitEligibilityOverride.BenefitPlanId = benefitPlanId; benefitEligibilityOverride.BenefitOptionId = benefitOptionId; benefitEligibilityOverride.Effective = effective; benefitEligibilityOverride.Expiration = expiration; benefitEligibilityOverride.WorkerId = workerId; benefitEligibilityOverride.OverrideStartDate = overrideStartDate; benefitEligibilityOverride.OverrideEndDate = overrideEndDate; if ((benefitPlan == null)) { throw new global::System.ArgumentNullException("benefitPlan"); } benefitEligibilityOverride.BenefitPlan = benefitPlan; if ((worker == null)) { throw new global::System.ArgumentNullException("worker"); } benefitEligibilityOverride.Worker = worker; if ((benefitOption == null)) { throw new global::System.ArgumentNullException("benefitOption"); } benefitEligibilityOverride.BenefitOption = benefitOption; if ((benefit == null)) { throw new global::System.ArgumentNullException("benefit"); } benefitEligibilityOverride.Benefit = benefit; return(benefitEligibilityOverride); }
partial void OnBenefitOptionChanging(global::Microsoft.Dynamics.DataEntities.BenefitOption value);