//дополнительная инициализация контролов private void InitControls() { InitFocusHandlers(); _bdc = MainClass.Bdc; //ComboServ.FillCombo(cbFaculty, HelpClass.GetComboListByTable("ed.qFaculty", "ORDER BY Acronym"), false, false); ComboServ.FillCombo(cbStudyBasis, HelpClass.GetComboListByTable("ed.StudyBasis", "ORDER BY Name"), false, false); cbStudyBasis.SelectedIndex = 0; FillStudyLevelGroup(); FillStudyForm(); cbStudyLevelGroup_SelectedIndexChanged(null, null); FillLicenseProgram(); UpdateDataGrid(); cbStudyLevelGroup.SelectedIndexChanged += cbStudyLevelGroup_SelectedIndexChanged; cbFaculty.SelectedIndexChanged += new EventHandler(cbFaculty_SelectedIndexChanged); cbStudyForm.SelectedIndexChanged += new EventHandler(cbStudyForm_SelectedIndexChanged); cbStudyBasis.SelectedIndexChanged += new EventHandler(cbStudyBasis_SelectedIndexChanged); cbLicenseProgram.SelectedIndexChanged += new EventHandler(cbLicenseProgram_SelectedIndexChanged); prh = new ProtocolRefreshHandler(UpdateDataGrid); MainClass.AddProtocolHandler(prh); }
//дополнительная инициализация контролов protected virtual void InitControls() { InitFocusHandlers(); drh = new DataRefreshHandler(UpdateDataGrid); prh = new ProtocolRefreshHandler(UpdateProtocolList); prh += new ProtocolRefreshHandler(SelectLastProtocol); MainClass.AddHandler(drh); MainClass.AddProtocolHandler(prh); Dgv = dgvProtocols; cbPrint.Items.Clear(); InitGrid(); try { using (PriemEntities context = new PriemEntities()) { ComboServ.FillCombo(cbFaculty, HelpClass.GetComboListByTable("ed.qFaculty", "ORDER BY Acronym"), false, false); ComboServ.FillCombo(cbStudyBasis, HelpClass.GetComboListByTable("ed.StudyBasis", "ORDER BY Name"), false, false); FillComboStudyForm(); UpdateProtocolList(); cbFaculty.SelectedIndexChanged += new EventHandler(cbFaculty_SelectedIndexChanged); cbStudyBasis.SelectedIndexChanged += new EventHandler(cbStudyBasis_SelectedIndexChanged); cbStudyForm.SelectedIndexChanged += new EventHandler(cbStudyForm_SelectedIndexChanged); cbProtocolNum.SelectedIndexChanged += new EventHandler(cbProtocolNum_SelectedIndexChanged); } if (MainClass.RightsSov_SovMain_FacMain()) { btnCreate.Visible = true; } // закрываем для создания новых кроме огр набора //if (MainClass.HasAddRightsForPriem(FacultyId.Value, null, null, null, StudyFormId.Value, StudyBasisId.Value)) // btnCreate.Enabled = true; if (MainClass.IsOwner()) { btnMake.Visible = true; } } catch (Exception ex) { WinFormsServ.Error("Ошибка при инициализации формы протоколов: " + ex.Message); } }