コード例 #1
0
        public override bool ValidateWeekNew(IBaumaxEmployeeWeek planningWeek, DateTime date)
        {
            if (planningWeek.Saldo > (int)(Value * 60))
                return true;

            return false;
        }
コード例 #2
0
        public bool ValidateWeek(IBaumaxEmployeeWeek week)
        {
            int count = 0;
            //IBaumaxEmployeeWeek week = Owner.EmployeeWeek;

            DateTime currentDate = week.BeginDate;

            //if (employeeday.Date.AddDays(-Value) < week.BeginDate) return false;
            count = week.WorkingDaysBefore;
            while (currentDate <= week.EndDate)
            {
                if (week.GetDay(currentDate).CountDailyWorkingHours > 0)
                {
                    count++;
                }
                else
                {
                    count = 0;
                }

                if (count >= Value)
                {
                    return(true);
                }

                currentDate = currentDate.AddDays(1);
            }
            if ((count > 0) && (count + week.WorkingDaysAfter >= Value))
            {
                return(true);
            }
            return(false);
        }
コード例 #3
0
 public bool Validate(IBaumaxEmployeeWeek planningWeek, DateTime date)
 {
     _employeeweek = planningWeek;
     _currentDate  = date;
     _Hours        = -1;
     return(Validate());
 }
コード例 #4
0
        public bool ValidateNew(IBaumaxEmployeeWeek employeeweek)
        {
            int count = 0;
            DateTime currentDate = employeeweek.BeginDate;
            EmployeeDay currentDay = null;
            EmployeeDay lastWorkingDay = null;

            Value = employeeweek.ContractHoursPerWeek;

            for (int i = 0; i < 7; i++)
            {
                currentDay = employeeweek.GetDay(currentDate);

                //if (currentDay.CountDailyPlannedWorkingHours > 0)
                {
                    count += currentDay.CountDailyPlannedWorkingHours;
                    lastWorkingDay = currentDay;
                }

                currentDate = currentDate.AddDays(1);
            }

            if (count > Value)
            {
                int t = count - Value;
                //if (Wrapper.Hours == -1 || Wrapper.Hours > t)
                    Owner.Hours = t;
                return true;
            }

            return false;
        }
コード例 #5
0
        public override bool ValidateWeekNew(IBaumaxEmployeeWeek planningWeek, DateTime date)
        {
            int count = planningWeek.CountWorkingSundayAndSaturdayPerMonth;

            if (Value <= count)
            {
                return(true);
            }

            if (planningWeek.BeginDate.Month != planningWeek.EndDate.Month)
            {
                DateTime dtSaturday = planningWeek.EndDate.AddDays(-1);
                count = 0;
                if (planningWeek.BeginDate.Month != dtSaturday.Month)
                {
                    if (planningWeek.IsSaturdayWorking)
                    {
                        count++;
                    }
                }
                if (planningWeek.IsSundayWorking)
                {
                    count++;
                }

                if (Value <= count)
                {
                    return(true);
                }
            }
            return(false);
        }
コード例 #6
0
        public bool ValidateNew(IBaumaxEmployeeWeek employeeweek)
        {
            int         count          = 0;
            DateTime    currentDate    = employeeweek.BeginDate;
            EmployeeDay currentDay     = null;
            EmployeeDay lastWorkingDay = null;

            Value = employeeweek.ContractHoursPerWeek;

            for (int i = 0; i < 7; i++)
            {
                currentDay = employeeweek.GetDay(currentDate);

                //if (currentDay.CountDailyPlannedWorkingHours > 0)
                {
                    count         += currentDay.CountDailyPlannedWorkingHours;
                    lastWorkingDay = currentDay;
                }

                currentDate = currentDate.AddDays(1);
            }

            if (count > Value)
            {
                int t = count - Value;
                //if (Wrapper.Hours == -1 || Wrapper.Hours > t)
                Owner.Hours = t;
                return(true);
            }

            return(false);
        }
コード例 #7
0
        public override bool ValidateWeekNew(IBaumaxEmployeeWeek planningWeek, DateTime date)
        {
            int count = 0;

            foreach (EmployeeDay day in planningWeek.DaysList)
                count += day.CountDailyWorkingHours;

            return ValidateNew(count);
        }
コード例 #8
0
        public override bool ValidateWeekNew(IBaumaxEmployeeWeek planningWeek, DateTime date)
        {
            if (planningWeek.Saldo > (int)(Value * 60))
            {
                return(true);
            }

            return(false);
        }
コード例 #9
0
 public override bool ValidateWeekNew(IBaumaxEmployeeWeek planningWeek, DateTime date)
 {
     int count = planningWeek.CountWorkingSundayPerMonth;
     if (Value <= count) return true;
     if (planningWeek.BeginDate.Month != planningWeek.EndDate.Month)
     {
         if (planningWeek.IsSundayWorking && (Value <= 1)) return true;
     }
     return false;
 }
コード例 #10
0
        public override bool ValidateWeekNew(IBaumaxEmployeeWeek planningWeek, DateTime date)
        {
            int count = 0;

            foreach (EmployeeDay day in planningWeek.DaysList)
            {
                count += day.CountDailyWorkingHours;
            }

            return(ValidateNew(count));
        }
コード例 #11
0
        public override bool ValidateNew()
        {
            IBaumaxEmployeeWeek week = Owner.EmployeeWeek;

            if (week.LastSaldo < week.Saldo)
            {
                return(true);
            }

            return(false);
        }
コード例 #12
0
        public override bool ValidateWeekNew(IBaumaxEmployeeWeek planningWeek, DateTime date)
        {
            int count = planningWeek.CountWorkingSundayPerMonth;

            if (Value <= count)
            {
                return(true);
            }
            if (planningWeek.BeginDate.Month != planningWeek.EndDate.Month)
            {
                if (planningWeek.IsSundayWorking && (Value <= 1))
                {
                    return(true);
                }
            }
            return(false);
        }
コード例 #13
0
        public bool ValidateWeek(IBaumaxEmployeeWeek week)
        {
            int count = 0;
            //IBaumaxEmployeeWeek week = Owner.EmployeeWeek;

            DateTime currentDate = week.BeginDate;

            //if (employeeday.Date.AddDays(-Value) < week.BeginDate) return false;
            count = week.WorkingDaysBefore;
            while (currentDate <= week.EndDate)
            {
                if (week.GetDay(currentDate).CountDailyWorkingHours > 0) count++;
                else count = 0;

                if (count >= Value) return true;

                currentDate = currentDate.AddDays(1);
            }
            if ((count > 0) && (count + week.WorkingDaysAfter >= Value))
                return true;
            return false;
        }
コード例 #14
0
 public override bool ValidateWeekNew(IBaumaxEmployeeWeek planningWeek, DateTime date)
 {
     return(CheckingDate(planningWeek.BeginDate) && CheckSaldo(planningWeek.Saldo));
 }
コード例 #15
0
ファイル: ConditionBase.cs プロジェクト: 5509850/baumax
 public virtual bool ValidateWeekNew(IBaumaxEmployeeWeek planningWeek, DateTime date)
 {
     return false;
 }
コード例 #16
0
        public override bool ValidateWeekNew(IBaumaxEmployeeWeek planningWeek, DateTime date)
        {
            EmployeeDay day = planningWeek.GetDay(date);

            return(ValidateNew(day.CountDailyWorkingHours));
        }
 public override bool ValidateWeekNew(IBaumaxEmployeeWeek planningWeek, DateTime date)
 {
     return false;
 }
        public override bool ValidateNew()
        {
            IBaumaxEmployeeWeek week = Owner.EmployeeWeek;

            return(ValidateWeekNew(week, week.EndDate));
        }
コード例 #19
0
ファイル: WorkingModelWrapper.cs プロジェクト: 5509850/baumax
 public void ResetContext()
 {
     // _storedays = null;
     _employeeweek = null;
     Hours = -1;
 }
コード例 #20
0
 public override bool ValidateWeekNew(IBaumaxEmployeeWeek planningWeek, DateTime date)
 {
     return CheckingDate(planningWeek.BeginDate) && CheckSaldo(planningWeek.Saldo);
 }
 public override bool ValidateWeekNew(IBaumaxEmployeeWeek planningWeek, DateTime date)
 {
     return(false);
 }
コード例 #22
0
        public override bool ValidateWeekNew(IBaumaxEmployeeWeek planningWeek, DateTime date)
        {
            EmployeeDay day = planningWeek.GetDay(date);

            return ValidateNew(day.CountDailyWorkingHours );
        }
コード例 #23
0
ファイル: ConditionBase.cs プロジェクト: 5509850/baumax
 public virtual bool ValidateWeekNew(IBaumaxEmployeeWeek planningWeek, DateTime date)
 {
     return(false);
 }
コード例 #24
0
ファイル: WorkingModelWrapper.cs プロジェクト: 5509850/baumax
 public bool Validate(IBaumaxEmployeeWeek planningWeek, DateTime date)
 {
     _employeeweek = planningWeek;
     _currentDate = date;
     _Hours = -1;
     return Validate();
 }
コード例 #25
0
 public override bool ValidateWeekNew(IBaumaxEmployeeWeek planningWeek, DateTime date)
 {
     return base.ValidateWeekNew(planningWeek, date);
 }
コード例 #26
0
        public override bool ValidateWeekNew(IBaumaxEmployeeWeek planningWeek, DateTime date)
        {
            int count = planningWeek.CountWorkingSundayAndSaturdayPerMonth;

            if (Value <= count) return true;

            if (planningWeek.BeginDate.Month != planningWeek.EndDate.Month)
            {
                DateTime dtSaturday = planningWeek.EndDate.AddDays(-1);
                count = 0;
                if (planningWeek.BeginDate.Month != dtSaturday.Month)
                {
                    if (planningWeek.IsSaturdayWorking) count++;
                }
                if (planningWeek.IsSundayWorking) count++;

                if (Value <= count) return true;
            }
            return false;
        }
コード例 #27
0
 public void ResetContext()
 {
     // _storedays = null;
     _employeeweek = null;
     Hours         = -1;
 }
コード例 #28
0
 public override bool ValidateWeekNew(IBaumaxEmployeeWeek planningWeek, DateTime date)
 {
     return(base.ValidateWeekNew(planningWeek, date));
 }