Esempio n. 1
0
        private async void LoadDictionaries()
        {
            ClassForForm.LoadDictionary(cbTypeLpu, _typeLPUList.ToDataTable());
            ClassForForm.LoadDictionary(cbOwnership, _ownershipList.ToDataTable());
            ClassForForm.LoadDictionary(cbAdmLevel, _admLevelList.ToDataTable());
            ClassForForm.LoadDictionary(cbMainSpec, _mainSpecList.ToDataTable());
            ClassForForm.LoadDictionary(cbTypeFin, _typeFinList.ToDataTable());
            _isLoad = false;

            if (UserLogged.Get().RoleSF == RolesSF.Пользователь)
            {
                ClassForForm.LoadDictionary(cbRealRegion, _realRegionList.ToDataTable(UserLogged.Get()));
            }
            else
            {
                ClassForForm.LoadDictionary(cbRealRegion, _realRegionList.ToDataTable());
            }

            _isLoad = true;

            DataTable dtLpuRR = await _lpuRRList.ToDataTableAsync(_lpu.LpuRR);

            DataTable dtLpuRR2 = await _lpuRRList.ToDataTableAsync(_lpu.LpuRR2);

            ClassForForm.LoadDictionary(cbLpuRR, dtLpuRR, false);
            ClassForForm.LoadDictionary(cbLpuRR2, dtLpuRR2, false);

            if (_lpu.LpuRR != null)
            {
                cbLpuRR.SelectedValue = _lpu.LpuRR.ID;
                lbRegionRR.Text       = _lpu.LpuRR.RegionRR.Name;
            }

            if (_lpu.LpuRR2 != null)
            {
                cbLpuRR2.SelectedValue = _lpu.LpuRR2.ID;
                lbRegionRR2.Text       = _lpu.LpuRR2.RegionRR.Name;
            }
        }
Esempio n. 2
0
 private void LoadDictionaries()
 {
     ClassForForm.LoadDictionary(cbMainSpec, _mainSpecList.ToDataTable());
 }