Esempio n. 1
0
        List <YearlyWorkingDay> DeleteExistingWorkingDay(List <YearlyWorkingDay> lst)
        {
            List <YearlyWorkingDay> lstAll =
                ClientEnvironment.CountryService.YearlyWorkingDayService.GetYearlyWorkingDaysFiltered(Country.ID, null, null);
            ClosedDayList lstWorkingDayAll = new ClosedDayList(Country.ID);

            lstWorkingDayAll.CopyList(lstAll);

            for (int i = lst.Count - 1; i >= 0; i--)
            {
                if (lstWorkingDayAll.IsExistsYearlyWorkingDay(lst[i].WorkingDay.ToString().Remove(10)))
                {
                    lst.RemoveAt(i);
                }
            }
            return(lst);
        }
Esempio n. 2
0
 public override void Bind()
 {
     base.Bind();
     if (m_weekDays.Count == 0)
     {
         m_weekDays[(int)DayOfWeek.Monday]    = GetLocalized(DayOfWeek.Monday.ToString());
         m_weekDays[(int)DayOfWeek.Tuesday]   = GetLocalized(DayOfWeek.Tuesday.ToString());
         m_weekDays[(int)DayOfWeek.Wednesday] = GetLocalized(DayOfWeek.Wednesday.ToString());
         m_weekDays[(int)DayOfWeek.Thursday]  = GetLocalized(DayOfWeek.Thursday.ToString());
         m_weekDays[(int)DayOfWeek.Friday]    = GetLocalized(DayOfWeek.Friday.ToString());
         m_weekDays[(int)DayOfWeek.Saturday]  = GetLocalized(DayOfWeek.Saturday.ToString());
         m_weekDays[(int)DayOfWeek.Sunday]    = GetLocalized(DayOfWeek.Sunday.ToString());
     }
     if (Country == null)
     {
         return;
     }
     _bindingClosedDay = new ClosedDayList(Country.ID);
     _bindingClosedDay.Clear();
     gridControl1.DataSource = _bindingClosedDay;
 }