Пример #1
0
        public PayRuleBuilding CopyTo()
        {
            var copy = new PayRuleBuilding
            {
                ApplyOnly                   = ApplyOnly,
                BonusDeductRuleName         = BonusDeductRuleName,
                BreakRuleName               = BreakRuleName,
                CancelPfsOnHolidays         = CancelPfsOnHolidays,
                DayDivideOverride           = DayDivideOverride,
                EffectiveDate               = EffectiveDate,
                ExceptionRuleName           = ExceptionRuleName,
                FixedRuleName               = FixedRuleName,
                HolidayCreditRuleName       = HolidayCreditRuleName,
                LaborAccountAndJobTransfers = LaborAccountAndJobTransfers,
                ZoneRuleName                = ZoneRuleName,
                ShiftGuaranteeName          = ShiftGuaranteeName,
                OvertimeRuleName            = OvertimeRuleName,
                ScheduleDeviationRuleName   = ScheduleDeviationRuleName,
                ScheduleTotal               = ScheduleTotal,
                PayFromSchedule             = PayFromSchedule,
                WorkRuleName                = WorkRuleName,
                WorkRuleTransfers           = WorkRuleTransfers,
                RoundRuleName               = RoundRuleName,
                TransferRegularHome         = TransferRegularHome,
                QualifiedSignOffRuleName    = QualifiedSignOffRuleName,
                PayruleName                 = PayruleName,
                PayCodeDistributionName     = PayCodeDistributionName,
                TerminalRuleName            = TerminalRuleName,
                PrepopulateProject          = PrepopulateProject
            };

            return(copy);
        }
Пример #2
0
        public PayRuleBuilding FindIntersection(PayRuleBuilding itemToCompare)
        {
            var resultOfComparison = new PayRuleBuilding();

            if (PayruleName == null || !PayruleName.Equals(itemToCompare.PayruleName, StringComparison.OrdinalIgnoreCase))
            {
                resultOfComparison.PayruleName = itemToCompare.PayruleName;
            }

            if (WorkRuleTransfers != itemToCompare.WorkRuleTransfers)
            {
                resultOfComparison.WorkRuleTransfers = itemToCompare.WorkRuleTransfers;
            }

            if (PrepopulateProject != itemToCompare.PrepopulateProject)
            {
                resultOfComparison.PrepopulateProject = itemToCompare.PrepopulateProject;
            }

            if (QualifiedSignOffRuleName != itemToCompare.QualifiedSignOffRuleName)
            {
                resultOfComparison.QualifiedSignOffRuleName = itemToCompare.QualifiedSignOffRuleName;
            }

            if (TerminalRuleName == null || !TerminalRuleName.Equals(itemToCompare.TerminalRuleName, StringComparison.OrdinalIgnoreCase))
            {
                resultOfComparison.TerminalRuleName = itemToCompare.TerminalRuleName;
            }

            if (!EffectiveDate.HasValue || EffectiveDate.Value.CompareTo(itemToCompare.EffectiveDate) != 0)
            {
                resultOfComparison.EffectiveDate = itemToCompare.EffectiveDate;
            }

            if (CancelPfsOnHolidays != itemToCompare.CancelPfsOnHolidays)
            {
                resultOfComparison.CancelPfsOnHolidays = itemToCompare.CancelPfsOnHolidays;
            }

            if (LaborAccountAndJobTransfers != itemToCompare.LaborAccountAndJobTransfers)
            {
                resultOfComparison.LaborAccountAndJobTransfers = itemToCompare.LaborAccountAndJobTransfers;
            }

            if (FixedRuleName == null || !FixedRuleName.Equals(itemToCompare.FixedRuleName, StringComparison.OrdinalIgnoreCase))
            {
                resultOfComparison.FixedRuleName = itemToCompare.FixedRuleName;
            }

            if (PayFromSchedule != itemToCompare.PayFromSchedule)
            {
                resultOfComparison.PayFromSchedule = itemToCompare.PayFromSchedule;
            }

            if (ScheduleTotal != itemToCompare.ScheduleTotal)
            {
                resultOfComparison.ScheduleTotal = itemToCompare.ScheduleTotal;
            }

            if (ApplyOnly != itemToCompare.ApplyOnly)
            {
                resultOfComparison.ApplyOnly = itemToCompare.ApplyOnly;
            }

            if (HolidayCreditRuleName == null || !HolidayCreditRuleName.Equals(itemToCompare.HolidayCreditRuleName, StringComparison.OrdinalIgnoreCase))
            {
                resultOfComparison.HolidayCreditRuleName = itemToCompare.HolidayCreditRuleName;
            }

            if (WorkRuleName == null || !WorkRuleName.Equals(itemToCompare.WorkRuleName, StringComparison.OrdinalIgnoreCase))
            {
                resultOfComparison.WorkRuleName = itemToCompare.WorkRuleName;
            }

            if (TransferRegularHome != itemToCompare.TransferRegularHome)
            {
                resultOfComparison.TransferRegularHome = itemToCompare.TransferRegularHome;
            }

            if (ExceptionRuleName == null || !ExceptionRuleName.Equals(itemToCompare.ExceptionRuleName, StringComparison.OrdinalIgnoreCase))
            {
                resultOfComparison.ExceptionRuleName = itemToCompare.ExceptionRuleName;
            }

            if (DayDivideOverride == null || !DayDivideOverride.Equals(itemToCompare.DayDivideOverride, StringComparison.OrdinalIgnoreCase))
            {
                resultOfComparison.DayDivideOverride = itemToCompare.DayDivideOverride;
            }

            if (PayCodeDistributionName == null || !PayCodeDistributionName.Equals(itemToCompare.PayCodeDistributionName, StringComparison.OrdinalIgnoreCase))
            {
                resultOfComparison.PayCodeDistributionName = itemToCompare.PayCodeDistributionName;
            }

            if (RoundRuleName == null || !RoundRuleName.Equals(itemToCompare.RoundRuleName, StringComparison.OrdinalIgnoreCase))
            {
                resultOfComparison.RoundRuleName = itemToCompare.RoundRuleName;
            }

            if (BreakRuleName == null || !BreakRuleName.Equals(itemToCompare.BreakRuleName, StringComparison.OrdinalIgnoreCase))
            {
                resultOfComparison.BreakRuleName = itemToCompare.BreakRuleName;
            }

            if (BonusDeductRuleName == null || !BonusDeductRuleName.Equals(itemToCompare.BonusDeductRuleName, StringComparison.OrdinalIgnoreCase))
            {
                resultOfComparison.BonusDeductRuleName = itemToCompare.BonusDeductRuleName;
            }

            if (ScheduleDeviationRuleName == null || !ScheduleDeviationRuleName.Equals(itemToCompare.ScheduleDeviationRuleName, StringComparison.OrdinalIgnoreCase))
            {
                resultOfComparison.ScheduleDeviationRuleName = itemToCompare.ScheduleDeviationRuleName;
            }

            if (OvertimeRuleName == null || !OvertimeRuleName.Equals(itemToCompare.OvertimeRuleName, StringComparison.OrdinalIgnoreCase))
            {
                resultOfComparison.OvertimeRuleName = itemToCompare.OvertimeRuleName;
            }

            if (ZoneRuleName == null || !ZoneRuleName.Equals(itemToCompare.ZoneRuleName, StringComparison.OrdinalIgnoreCase))
            {
                resultOfComparison.ZoneRuleName = itemToCompare.ZoneRuleName;
            }

            if (ShiftGuaranteeName == null || !ShiftGuaranteeName.Equals(itemToCompare.ShiftGuaranteeName, StringComparison.OrdinalIgnoreCase))
            {
                resultOfComparison.ShiftGuaranteeName = itemToCompare.ShiftGuaranteeName;
            }

            return(resultOfComparison);
        }