Esempio n. 1
0
        void LoadAbsences()
        {
            if (Country == null)
            {
                _bindingAbsences.Clear();
            }
            else
            {
                gridViewAbsence.BeginDataUpdate();
                try
                {
                    _absencemanager           = new AbsenceManager(ClientEnvironment.AbsenceService);
                    _absencemanager.CountryId = Country.ID;

                    _bindingAbsences.Clear();

                    _bindingAbsences.CopyList(_absencemanager.ToList);

                    LoadUsedAbsenceIds();
                }
                finally
                {
                    gridViewAbsence.EndDataUpdate();
                }
            }

            if (gridControl.DataSource == null)
            {
                gridControl.DataSource = _bindingAbsences;
            }
        }
Esempio n. 2
0
        public void InitControl(List <WorkingModel> lst)
        {
            if (lst != null)
            {
                _listEntities = new BindingTemplate <WorkingModel>(lst);
            }
            else
            {
                _listEntities = new BindingTemplate <WorkingModel>();
            }

            if (Country != null)
            {
                //GetCountryLunchModel
                List <WorkingModel> lll = ClientEnvironment.WorkingModelService.GetCountryLunchModel(Country.ID, null, null);
                _listEntities.CopyList(lll);
            }

            if (_listEntities != null && _listEntities.Count > 0)
            {
                LoadUsedWorkingModels();
            }

            gridControlLunch.DataSource = _listEntities;
        }
Esempio n. 3
0
        public void LoadDays()
        {
            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());
            }
            gridControlCloseDay.DataSource = null;
            ListOfClosedDays.Clear();

            if (Country != null)
            {
                DateTime EndCorrectDate = new DateTime(EndDate.Year, EndDate.Month, EndDate.Day, 23, 59, 59);
                ListOfClosedDays.CopyList(ClientEnvironment.CountryService.YearlyWorkingDayService.GetYearlyWorkingDaysFiltered(Country.ID, BeginDate, EndCorrectDate));
            }


            if (gridControlCloseDay.DataSource == null)
            {
                gridControlCloseDay.DataSource = ListOfClosedDays;
            }

            bt_Apply.Enabled = FocusedEntity != null;
            UpdateEnableButton();
        }
Esempio n. 4
0
        private void InitBindingList()
        {
            if (_bindingEntities == null)
            {
                _bindingEntities = new BindingTemplate <Country>();
            }
            if (_bindingEntities.Count > 0)
            {
                _bindingEntities.Clear();
            }

            if (_countrylist != null)
            {
                foreach (Country c in _countrylist)
                {
                    if (c.LanguageID > 0)
                    {
                        Language lng = ClientEnvironment.LanguageService.FindById(c.CountryLanguage);
                        c.LanguageName = (lng != null) ? lng.Name : String.Empty;
                    }
                }
                _bindingEntities.CopyList(_countrylist);
            }


            if (gridControlCountries.DataSource == null)
            {
                gridControlCountries.DataSource = _bindingEntities;
            }
        }
Esempio n. 5
0
        public void InitData()
        {
            IList _langList = ClientEnvironment.LanguageService.FindAll();

            _bindingLanguageList.Clear();
            _bindingLanguageList.CopyList(_langList);

            gridControlLanguages.DataSource = _bindingLanguageList;
        }
Esempio n. 6
0
        public void InitControl()
        {
            if (_listLanguages == null)
            {
                List<Language> lst = ClientEnvironment.LanguageService.FindAll();

                _listLanguages = new BindingTemplate<Language>();
                _listLanguages.CopyList(lst);
                lookUpEdit1.Properties.DataSource = _listLanguages;
            }
        }
Esempio n. 7
0
        public void InitControl()
        {
            if (_listLanguages == null)
            {
                List <Language> lst = ClientEnvironment.LanguageService.FindAll();

                _listLanguages = new BindingTemplate <Language>();
                _listLanguages.CopyList(lst);
                lookUpEdit1.Properties.DataSource = _listLanguages;
            }
        }
Esempio n. 8
0
        void InitLanguageLookUp()
        {
            IList _langList = ClientEnvironment.LanguageService.FindAll();

            _bindingLanguageList.CopyList(_langList);

            lookUpEditFrom.Properties.DataSource   =
                lookUpEditTo.Properties.DataSource = _bindingLanguageList;

            lookUpEditFrom.EditValue = _fromLanguageId;
            lookUpEditTo.EditValue   = _toLanguageId;
        }
Esempio n. 9
0
        private void LoadLongTimeAbsence()
        {
            List <LongTimeAbsence> lst =
                ClientEnvironment.LongTimeAbsenceService.FindAll();

            m_absenceList.CopyList(lst);

            if (gridControl.DataSource == null)
            {
                gridControl.DataSource = m_absenceList;
            }
            UpdateButtonState();
        }
Esempio n. 10
0
        private void LoadLongTimeAbsence()
        {
            m_absenceList.Clear();

            if (EntityCountry != null)
            {
                List <LongTimeAbsence> lst =
                    ClientEnvironment.LongTimeAbsenceService.FindAllByCountry(EntityCountry.ID);

                m_absenceList.CopyList(lst);

                if (gridControl.DataSource == null)
                {
                    gridControl.DataSource = m_absenceList;
                }
            }
            UpdateButtonState();
        }
Esempio n. 11
0
        public void InitControl(IList listLanguages)
        {
            if (listLanguages != null)
            {
                if (_listLanguages == null)
                {
                    _listLanguages = new BindingTemplate <Language>();
                }

                _listLanguages.Clear();
                _listLanguages.CopyList(listLanguages);

                if (lookUpEdit1.Properties.DataSource == null)
                {
                    lookUpEdit1.Properties.DataSource = _listLanguages;
                }
            }
        }
Esempio n. 12
0
        private void InitBindingList()
        {
            if (_bindingEntities == null)
            {
                _bindingEntities =
                    new BindingTemplate <Domain.HWGR>();
            }
            if (_bindingEntities.Count > 0)
            {
                _bindingEntities.Clear();
            }

            if (_hwgrList != null)
            {
                _bindingEntities.CopyList(_hwgrList);
            }

            if (gridControl1.DataSource == null)
            {
                gridControl1.DataSource = _bindingEntities;
            }
        }
Esempio n. 13
0
        public void SetUserList(IList <UserInfo> users)
        {
            gridControl.BeginInit();
            try
            {
                UserList.Clear();

                if (users != null)
                {
                    UserList.CopyList(users);
                }
                if (gridControl.DataSource == null)
                {
                    gridControl.DataSource = UserList;
                    // gridColumn_Role.GroupIndex = 0;
                }
            }
            finally
            {
                gridControl.EndInit();
            }
        }
Esempio n. 14
0
        public void LoadEmployeesLongTimeAbsence()
        {
            EmployeesLongTimeAbsence.Clear();

            if (Context != null)
            {
                gridViewEntities.BeginDataUpdate();
                try
                {
                    EmployeeLongTimeAbsence[] array = ClientEnvironment.EmployeeService.GetLongAbsenceEmployees(Context.CurrentStore.ID, todayDate);

                    if (array != null)
                    {
                        EmployeesLongTimeAbsence.CopyList((IList)array);
                    }
                }
                finally
                {
                    gridViewEntities.EndDataUpdate();
                }
            }
            UpdateToolBarItems();
        }
Esempio n. 15
0
        protected virtual void OnCriteriaChanged()
        {
            if (CurrentStore == null)
            {
                return;
            }

            if (EmployeeList == null)
            {
                m_employeeList = new BindingTemplate <Domain.Employee>();
            }
            else
            {
                m_employeeList.Clear();
            }

            m_employeeList.CopyList(ClientEnvironment.EmployeeService.GetEmployeeList(CurrentStore.ID, CurrentAsOfDate,
                                                                                      CurrentStore.CountryID == ClientEnvironment.CountryService.AustriaCountryID));

            long countryid = CurrentCountryID;
            long austriaid = ClientEnvironment.CountryService.AustriaCountryID;

            foreach (Domain.Employee empl in m_employeeList)
            {
                empl.BalanceHours = Math.Round(empl.BalanceHours / 60, 2);

                if (countryid != austriaid)
                {
                    empl.AvailableHolidays = empl.OldHolidays + empl.NewHolidays;
                }
                //else
                //{
                //    empl.SpareHolidaysExc = empl.AvailableHolidays;
                //    empl.AvailableHolidays = 0;
                //}
            }
        }