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; } }
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(); }
private void LoadStores() { gridControl.BeginUpdate(); try { _listStores.Clear(); if (EntityRegion != null) { List <Domain.Store> lst = ClientEnvironment.StoreService.FindAll(); if (lst != null) { foreach (Domain.Store store in lst) { if (store.RegionID == EntityRegion.ID) { _listStores.Add(store); } } } } if (gridControl.DataSource == null) { gridControl.DataSource = _listStores; } } finally { gridControl.EndUpdate(); } }
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; } }
public void InitData() { IList _langList = ClientEnvironment.LanguageService.FindAll(); _bindingLanguageList.Clear(); _bindingLanguageList.CopyList(_langList); gridControlLanguages.DataSource = _bindingLanguageList; }
void Clear() { if (ListOfUnavAddHours == null) { ListOfUnavAddHours = new BindingTemplate <CountryAdditionalHour>(); } ListOfUnavAddHours.Clear(); gridControl_UnAdHours.DataSource = null; }
void Clear() { if (ListOfAvgWDInWeek == null) { ListOfAvgWDInWeek = new BindingTemplate <AvgWorkingDaysInWeek>(); } ListOfAvgWDInWeek.Clear(); if (_listAmounts != null) { _listAmounts.Clear(); } gridControlAvgWDiWeek.DataSource = null; }
void Clear() { if (_bindingWeeks == null) { _bindingWeeks = new BindingTemplate <AvgAmount>(); } _bindingWeeks.Clear(); if (_listAmounts != null) { _listAmounts.Clear(); } gridControl.DataSource = null; }
public void LoadEmployeeRelation() { if (CurrentEmployee != null) { IList lst = ClientEnvironment.EmployeeRelationService.GetEmployeeRelations(CurrentEmployee.ID); m_Relations = new BindingTemplate <EmployeeRelation>(lst); FillEmployeeRelation(m_Relations); } else { m_Relations.Clear(); m_Relations = null; } }
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(); }
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; } } }
private void LoadStores() { lookUpStores.Properties.BeginUpdate(); try { _listStores.Clear(); if (Entity != null) { StoreViewList lst = new StoreViewList(); lst.LoadByRegion(EntityRegion.ID); for (int i = 0; i < lst.Count; i++) { _listStores.Add(lst[i].Entity); } //List<Domain.Store> lst = ClientEnvironment.StoreService.FindAll(); // if (lst != null) // { // foreach (Domain.Store store in lst) // if (store.RegionID == EntityRegion.ID) _listStores.Add(store); // } } if (lookUpStores.Properties.DataSource == null) { lookUpStores.Properties.DataSource = _listStores; } } finally { lookUpStores.Properties.EndUpdate(); } if (_listStores.Count > 0) { lookUpStores.EditValue = _listStores[0].ID; } }
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; } }
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(); } }
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(); }
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; //} } }