Exemplo n.º 1
0
        protected override void ExtraInit()
        {
            base.ExtraInit();
            Dgv.ReadOnly = false;

            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, true);
                cbStudyBasis.SelectedIndex = 0;

                ComboServ.FillCombo(cbStudyForm, HelpClass.GetComboListByTable("ed.StudyForm", "ORDER BY Id"), false, true);
                cbStudyForm.SelectedIndex = 0;

                FillLicenseProgram();

                ComboServ.FillCombo(cbCompetition, HelpClass.GetComboListByTable("ed.Competition"), false, true);

                UpdateDataGrid();

                if (MainClass.IsFacMain() || MainClass.IsOwner())
                {
                    btnLists.Enabled = true;
                }
                else
                {
                    btnLists.Enabled = false;
                }
            }
        }
Exemplo n.º 2
0
        //дополнительная инициализация контролов
        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);
        }
Exemplo n.º 3
0
        protected override void ExtraInit()
        {
            base.ExtraInit();
            Dgv.ReadOnly      = false;
            btnRemove.Visible = btnAdd.Visible = false;

            //this.Width = 774;

            try
            {
                using (PriemEntities context = new PriemEntities())
                {
                    ComboServ.FillCombo(cbFaculty, HelpClass.GetComboListByTable("ed.qFaculty", "ORDER BY Acronym"), false, false);
                    ComboServ.FillCombo(cbStudyLevelGroup, HelpClass.GetComboListByTable("ed.StudyLevelGroup", "ORDER BY Acronym"), false, false);
                    ComboServ.FillCombo(cbStudyBasis, HelpClass.GetComboListByTable("ed.StudyBasis", "ORDER BY Name"), false, true);

                    cbStudyBasis.SelectedIndex = 0;
                    FillStudyForm();
                    FillLicenseProgram();
                    FillObrazProgram();

                    FillExams();

                    ComboServ.FillCombo(cbOlympType, HelpClass.GetComboListByTable("ed.OlympType", " ORDER BY Id"), false, true);
                    ComboServ.FillCombo(cbOlympName, HelpClass.GetComboListByTable("ed.OlympName"), false, true);
                    ComboServ.FillCombo(cbOlympSubject, HelpClass.GetComboListByTable("ed.OlympSubject"), false, true);
                    ComboServ.FillCombo(cbOlympValue, HelpClass.GetComboListByTable("ed.OlympValue"), false, true);
                    ComboServ.FillCombo(cbOlympLevel, HelpClass.GetComboListByTable("ed.OlympLevel"), false, true);
                }
            }
            catch (Exception exc)
            {
                WinFormsServ.Error("Ошибка при инициализации формы " + exc.Message);
            }
        }
Exemplo n.º 4
0
        protected override void ExtraInit()
        {
            base.ExtraInit();

            loadClass = new LoadFromInet();
            _bdcInet  = loadClass.BDCInet;

            if (MainClass.IsReadOnly())
            {
                btnLoad.Enabled = false;
            }

            btnAdd.Visible = btnCard.Visible = btnRemove.Visible = false;

            try
            {
                using (PriemEntities context = new PriemEntities())
                {
                    ComboServ.FillCombo(cbChangeType, HelpClass.GetComboListByTable("ed.ChangeType", "ORDER BY Id"), false, false);
                    ComboServ.FillCombo(cbFaculty, HelpClass.GetComboListByTable("ed.qFaculty", "ORDER BY Acronym"), false, false);
                    ComboServ.FillCombo(cbStudyBasis, HelpClass.GetComboListByTable("ed.StudyBasis", "ORDER BY Name"), false, true);

                    cbStudyBasis.SelectedIndex = 0;
                    FillLicenseProgram();
                    FillObrazProgram();
                    FillProfile();

                    UpdateDataGrid();
                }
            }
            catch (Exception exc)
            {
                WinFormsServ.Error("Ошибка при инициализации формы " + exc.Message);
            }
        }
Exemplo n.º 5
0
        //дополнительная инициализация контролов
        protected override void ExtraInit()
        {
            base.ExtraInit();
            this.Width = 840;

            muchExams = false;

            btnRemove.Visible = btnAdd.Visible = false;

            try
            {
                using (PriemEntities context = new PriemEntities())
                {
                    ComboServ.FillCombo(cbStudyLevelGroup, HelpClass.GetComboListByTable("ed.StudyLevelGroup", "ORDER BY Acronym"), false, false);
                    ComboServ.FillCombo(cbFaculty, HelpClass.GetComboListByTable("ed.qFaculty", "ORDER BY Acronym"), false, false);
                    ComboServ.FillCombo(cbStudyBasis, HelpClass.GetComboListByTable("ed.StudyBasis", "ORDER BY Name"), false, true);

                    cbStudyBasis.SelectedIndex = 0;
                    FillStudyForm();
                    FillLicenseProgram();
                    FillObrazProgram();
                    FillProfile();

                    ComboServ.FillCombo(cbCompetition, HelpClass.GetComboListByTable("ed.Competition", "ORDER BY Name"), false, true);
                    FillExams();
                }
            }
            catch (Exception exc)
            {
                WinFormsServ.Error("Ошибка при инициализации формы " + exc.Message);
            }
        }
Exemplo n.º 6
0
        //дополнительная инициализация контролов
        private void InitControls()
        {
            try
            {
                InitFocusHandlers();

                this.CenterToScreen();
                this.MdiParent = MainClass.mainform;
                _bdc           = MainClass.Bdc;
                _drh           = new DataRefreshHandler(UpdateDataGrid);
                MainClass.AddHandler(_drh);

                Dgv = dgvAbitList;

                lblCount.Text = dgvAbitList.RowCount.ToString();
                if (!MainClass.IsOwner())
                {
                    btnRemove.Visible = false;
                }

                using (PriemEntities context = new PriemEntities())
                {
                    ComboServ.FillCombo(cbFaculty, HelpClass.GetComboListByTable("ed.qFaculty", "ORDER BY Acronym"), false, true);
                }
            }
            catch (Exception exc)
            {
                WinFormsServ.Error("Ошибка при инициализации формы " + exc.Message);
            }
        }
Exemplo n.º 7
0
        protected override void ExtraInit()
        {
            base.ExtraInit();

            btnAdd.Visible = btnRemove.Visible = false;

            try
            {
                using (PriemEntities context = new PriemEntities())
                {
                    ComboServ.FillCombo(cbFaculty, HelpClass.GetComboListByTable("ed.qFaculty", "ORDER BY Acronym"), false, false);
                    ComboServ.FillCombo(cbStudyForm, HelpClass.GetComboListByTable("ed.StudyForm", "ORDER BY Id"), false, false);

                    FillLicenseProgram();
                    FillObrazProgram();

                    ComboServ.FillCombo(cbLanguage, HelpClass.GetComboListByTable("ed.Language"), false, true);
                    ComboServ.FillCombo(cbOlympType, HelpClass.GetComboListByTable("ed.OlympType", " ORDER BY Id"), false, true);
                    ComboServ.FillCombo(cbOlympName, HelpClass.GetComboListByTable("ed.OlympName"), false, true);
                    ComboServ.FillCombo(cbOlympSubject, HelpClass.GetComboListByTable("ed.OlympSubject"), false, true);
                    ComboServ.FillCombo(cbOlympValue, HelpClass.GetComboListByTable("ed.OlympValue"), false, true);
                    ComboServ.FillCombo(cbOlympLevel, HelpClass.GetComboListByTable("ed.OlympLevel"), false, true);

                    UpdateDataGrid();
                }
            }
            catch (Exception exc)
            {
                WinFormsServ.Error("Ошибка при инициализации формы " + exc.Message);
            }
        }
Exemplo n.º 8
0
        protected override void ExtraInit()
        {
            base.ExtraInit();

            _title         = "Данные по договору";
            _tableName     = "ed.PaidData";
            this.MdiParent = null;

            try
            {
                using (PriemEntities context = new PriemEntities())
                {
                    _Id = (from pd in context.PaidData
                           where pd.AbiturientId == _abitId
                           orderby pd.DogovorDate descending
                           select pd.Id).FirstOrDefault().ToString();

                    if (string.IsNullOrEmpty(_Id) || _Id == Guid.Empty.ToString())
                    {
                        _Id = null;
                    }

                    ComboServ.FillCombo(cbDogovorType, HelpClass.GetComboListByTable("ed.DogovorType", "ORDER BY Id"), false, false);
                    UpdateAfterDogovorType();
                    ComboServ.FillCombo(cbProrektor, HelpClass.GetComboListByTable("ed.Prorektor"), false, false);
                    ComboServ.FillCombo(cbPayPeriod, HelpClass.GetComboListByTable("ed.PayPeriod"), false, false);
                }
            }
            catch (Exception exc)
            {
                WinFormsServ.Error("Ошибка при инициализации формы " + exc.Message);
            }
        }
Exemplo n.º 9
0
        protected override void ExtraInit()
        {
            base.ExtraInit();

            btnFixieren.Visible = btnFixieren.Enabled = false;
            gbPasha.Visible     = gbPasha.Enabled = false;
            chbFix.Visible      = false;

            if (MainClass.RightsFacMain() || MainClass.IsPasha())
            {
                btnFixieren.Visible = btnFixieren.Enabled = true;
            }

            if (MainClass.IsPasha())
            {
                gbPasha.Visible = gbPasha.Enabled = true;
                chbFix.Visible  = true;
            }

            if (!chbFix.Checked)
            {
                gbPasha.Visible = gbPasha.Enabled = false;
            }

            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();
            FillLicenseProgram();
            FillObrazProgram();
            FillProfile();
        }
Exemplo n.º 10
0
        protected override void ExtraInit()
        {
            base.ExtraInit();
            _tableName = "ed.Person";

            Dgv        = dgvApplications;
            personBarc = 0;

            rbMale.Checked = true;

            gbAtt.Visible      = true;
            gbDipl.Visible     = false;
            chbIsEqual.Visible = false;

            chbHostelAbitYes.Checked = false;
            chbHostelAbitNo.Checked  = false;

            lblHasAssignToHostel.Visible = false;
            lblHasExamPass.Visible       = false;
            btnPrintHostel.Enabled       = false;
            btnPrintExamPass.Enabled     = false;
            btnGetAssignToHostel.Enabled = false;
            btnGetExamPass.Enabled       = false;

            tbNum.Enabled = false;

            btnAddAbit.Enabled = false;

            try
            {
                using (PriemEntities context = new PriemEntities())
                {
                    ComboServ.FillCombo(cbPassportType, HelpClass.GetComboListByTable("ed.PassportType"), false, false);

                    ComboServ.FillCombo(cbCountry, HelpClass.GetComboListByTable("ed.ForeignCountry", "ORDER BY Distance, Name"), false, false);
                    ComboServ.FillCombo(cbNationality, HelpClass.GetComboListByTable("ed.ForeignCountry", "ORDER BY Distance, Name"), false, false);
                    ComboServ.FillCombo(cbRegion, HelpClass.GetComboListByTable("ed.Region", "ORDER BY Distance, Name"), true, false);
                    ComboServ.FillCombo(cbLanguage, HelpClass.GetComboListByTable("ed.Language"), false, false);
                    ComboServ.FillCombo(cbCountryEduc, HelpClass.GetComboListByTable("ed.ForeignCountry", "ORDER BY Distance, Name"), false, false);
                    ComboServ.FillCombo(cbHEStudyForm, HelpClass.GetComboListByTable("ed.StudyForm"), true, false);
                    ComboServ.FillCombo(cbSchoolType, HelpClass.GetComboListByTable("ed.SchoolType"), false, false);


                    cbSchoolCity.DataSource      = context.ExecuteStoreQuery <string>("SELECT DISTINCT ed.Person_EducationInfo.SchoolCity AS Name FROM ed.Person_EducationInfo WHERE ed.Person_EducationInfo.SchoolCity > '' ORDER BY 1");
                    cbAttestatSeries.DataSource  = context.ExecuteStoreQuery <string>("SELECT DISTINCT ed.Person_EducationInfo.AttestatSeries AS Name FROM ed.Person_EducationInfo WHERE ed.Person_EducationInfo.AttestatSeries > '' ORDER BY 1");
                    cbHEQualification.DataSource = context.ExecuteStoreQuery <string>("SELECT DISTINCT ed.Person_EducationInfo.HEQualification AS Name FROM ed.Person_EducationInfo WHERE NOT ed.Person_EducationInfo.HEQualification IS NULL /*AND ed.Person_EducationInfo.HEQualification > ''*/ ORDER BY 1");

                    cbAttestatSeries.SelectedIndex  = -1;
                    cbSchoolCity.SelectedIndex      = -1;
                    cbHEQualification.SelectedIndex = -1;
                }

                btnDocs.Visible = true;
            }
            catch (Exception exc)
            {
                WinFormsServ.Error("Ошибка при инициализации формы " + exc.Message);
            }
        }
Exemplo n.º 11
0
        protected override void ExtraInit()
        {
            base.ExtraInit();

            this.Width = 812;
            using (PriemEntities context = new PriemEntities())
            {
                ComboServ.FillCombo(cbFaculty, HelpClass.GetComboListByTable("ed.qFaculty", "ORDER BY Acronym"), false, true);
            }
        }
Exemplo n.º 12
0
        //дополнительная инициализация контролов
        private void InitControls()
        {
            this.CenterToParent();
            this.MdiParent = MainClass.mainform;
            bdc            = MainClass.Bdc;

            ComboServ.FillCombo(cbFaculty, HelpClass.GetComboListByTable("ed.SP_Faculty"), false, false);
            FillExams();

            cbFaculty.SelectedIndexChanged += new EventHandler(cbFaculty_SelectedIndexChanged);
        }
Exemplo n.º 13
0
        //дополнительная инициализация контролов
        private void InitControls()
        {
            this.CenterToParent();
            InitFocusHandlers();
            this.MdiParent = MainClass.mainform;
            bdc            = MainClass.Bdc;


            ComboServ.FillCombo(cbStudyLevelGroup, HelpClass.GetComboListByTable("ed.StudyLevelGroup"), false, false);
            ComboServ.FillCombo(cbStudyBasis, HelpClass.GetComboListByTable("ed.StudyBasis"), false, false);
        }
Exemplo n.º 14
0
        //дополнительная инициализация контролов
        protected override void ExtraInit()
        {
            base.ExtraInit();

            using (PriemEntities context = new PriemEntities())
            {
                ComboServ.FillCombo(cbOlympType, HelpClass.GetComboListByTable("ed.OlympType", "ORDER BY Id "), false, false);
                cbOlympType.SelectedIndexChanged += new EventHandler(cbOlympType_SelectedIndexChanged);
            }

            this.Width = 1174;
        }
Exemplo n.º 15
0
        //дополнительная инициализация контролов
        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);
            }
        }
Exemplo n.º 16
0
        protected override void ExtraInit()
        {
            base.ExtraInit();

            btnCard.Visible = btnAdd.Visible = btnRemove.Visible = false;

            loadClass = new LoadFromInet();
            _bdcInet  = loadClass.BDCInet;

            if (MainClass.IsReadOnly())
            {
                btnLoad.Enabled = false;
            }

            try
            {
                using (PriemEntities context = new PriemEntities())
                {
                    ComboServ.FillCombo(cbFaculty, HelpClass.GetComboListByTable("ed.qFaculty", "ORDER BY Name"), false, true);
                    ComboServ.FillCombo(cbStudyBasis, HelpClass.GetComboListByTable("ed.StudyBasis", "ORDER BY Name"), false, true);
                    ComboServ.FillCombo(cbStudyLevel, HelpClass.GetComboListByTable("ed.StudyLevel", "ORDER BY LevelGroupId, Name"), false, false);

                    cbStudyBasis.SelectedIndex = 0;
                    FillNationality();
                    FillLicenseProgram();
                    FillObrazProgram();
                    FillProfile();

                    UpdateDataGrid();

                    if (MainClass.IsPasha())
                    {
                        gbUpdateImport.Visible = true;
                    }
                    else
                    {
                        gbUpdateImport.Visible = false;
                    }

                    chbSelectAll.Checked = false;

                    tbAbitBarcode.Focus();
                }
            }
            catch (Exception exc)
            {
                WinFormsServ.Error("Ошибка при инициализации формы " + exc.Message);
            }
        }
Exemplo n.º 17
0
        private void InitControls()
        {
            ComboServ.FillCombo(cbStudyLevelGroup, HelpClass.GetComboListByTable("ed.StudyLevelGroup"), false, false);
            ComboServ.FillCombo(cbFaculty, HelpClass.GetComboListByTable("ed.SP_Faculty"), false, false);
            ComboServ.FillCombo(cbStudyBasis, HelpClass.GetComboListByTable("ed.StudyBasis"), false, true);

            cbVed.DrawMode  = DrawMode.OwnerDrawFixed;
            cbVed.DrawItem += new DrawItemEventHandler(cb_DrawItem);

            UpdateVedList();

            cbStudyLevelGroup.SelectedIndexChanged += cbStudyLevelGroup_SelectedIndexChanged;
            cbFaculty.SelectedIndexChanged         += new EventHandler(cbFaculty_SelectedIndexChanged);
            cbStudyBasis.SelectedIndexChanged      += new EventHandler(cbStudyBasis_SelectedIndexChanged);
        }
Exemplo n.º 18
0
        //дополнительная инициализация контролов
        private void InitControls()
        {
            InitFocusHandlers();

            this.CenterToScreen();
            this.MdiParent = MainClass.mainform;
            _bdc           = MainClass.Bdc;
            _drh           = new DataRefreshHandler(UpdateDataGrid);
            MainClass.AddHandler(_drh);

            Dgv = dgvAbitList;

            lblCount.Text = dgvAbitList.RowCount.ToString();

            using (PriemEntities context = new PriemEntities())
            {
                ComboServ.FillCombo(cbFaculty, HelpClass.GetComboListByTable("ed.qFaculty", "ORDER BY Acronym"), false, true);
            }
        }
Exemplo n.º 19
0
        //дополнительная инициализация
        private void InitItems()
        {
            this.CenterToParent();
            this.MdiParent = MainClass.mainform;

            _bdc = MainClass.Bdc;

            if (MainClass.IsPasha())
            {
                ComboServ.FillCombo(cbFaculty, HelpClass.GetComboListByTable("ed.SP_Faculty"), false, true);
            }
            else
            {
                ComboServ.FillCombo(cbFaculty, HelpClass.GetComboListByTable("ed.SP_Faculty"), false, false);
            }

            btnStart.Enabled = false;
            btnMetro.Enabled = false;
        }
Exemplo n.º 20
0
        private void InitForm()
        {
            FillStudyLevel();
            StudyLevelId = _competition.StudyLevelId;
            FillLicenseProgram();
            LicenseProgramId = _competition.LicenseProgramId;
            FillObrazProgram();
            ObrazProgramId = _competition.ObrazProgramId;
            FillProfile();
            ProfileId = _competition.ProfileId;
            FillFaculty();
            FacultyId = _competition.FacultyId;
            FillStudyForm();
            StudyFormId = _competition.StudyFormId;
            FillStudyBasis();
            StudyBasisId = _competition.StudyBasisId;
            FillCompetition();
            ComboServ.FillCombo(cbCelCompetition, HelpClass.GetComboListByTable("ed.CelCompetition"), true, false);
            CompetitionId = _competition.CompetitionId;

            UpdateAfterCompetition();

            Priority  = _competition.Priority;
            DocDate   = _competition.DocDate;
            IsGosLine = _competition.IsGosLine;

            if (StudyBasisId == 2)
            {
                chbIsCommonRussianCompetition.Visible = true;
            }
            else
            {
                chbIsCommonRussianCompetition.Visible = false;
            }
            IsCommonRussianCompetition = _competition.IsCommonRussianCompetition;

            InitHandlers();

            if (_competition.HasInnerPriorities)
            {
                btnHasInnerObrazProgram.Visible = true;
            }
        }
Exemplo n.º 21
0
        //дополнительная инициализация контролов
        private void InitControls()
        {
            InitFocusHandlers();
            _bdc      = MainClass.Bdc;
            forUpdate = false;

            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;
            FillStudyForm();
            FillLicenseProgram();

            UpdateDataGrid();

            cbFaculty.SelectedIndexChanged        += new EventHandler(cbFaculty_SelectedIndexChanged);
            cbStudyForm.SelectedIndexChanged      += new EventHandler(cbStudyForm_SelectedIndexChanged);
            cbStudyBasis.SelectedIndexChanged     += new EventHandler(cbStudyBasis_SelectedIndexChanged);
            cbLicenseProgram.SelectedIndexChanged += new EventHandler(cbLicenseProgram_SelectedIndexChanged);
        }
Exemplo n.º 22
0
        protected override void ExtraInit()
        {
            base.ExtraInit();

            _title         = "Диплом олимпиады";
            _tableName     = "ed.Olympiads";
            this.MdiParent = null;

            try
            {
                using (PriemEntities context = new PriemEntities())
                {
                    ComboServ.FillCombo(cbOlympType, HelpClass.GetComboListByTable("ed.OlympType", "ORDER BY Id"), false, false);
                    UpdateAfterType();
                    ComboServ.FillCombo(cbOlympValue, HelpClass.GetComboListByTable("ed.OlympValue"), false, false);
                }
            }
            catch (Exception exc)
            {
                WinFormsServ.Error("Ошибка при инициализации формы " + exc.Message);
            }
        }
Exemplo n.º 23
0
        public CardAttMarks(Guid?personId, bool isReadOnly)
        {
            InitializeComponent();
            InitFocusHandlers();

            this.CenterToParent();
            _personId = personId;

            _lMarks = new List <string>();

            ComboServ.FillCombo(cbSubjects, HelpClass.GetComboListByTable("ed.AttSubject"), true, false);

            UpdateDataGrid();

            if (isReadOnly)
            {
                cbSubjects.Enabled = false;
                tbMark.Enabled     = false;
                btnAdd.Enabled     = false;
                dgvExams.Columns["Delete"].Visible = false;
            }
        }
Exemplo n.º 24
0
        protected override void ExtraInit()
        {
            base.ExtraInit();

            _title         = "Олимпиада";
            _tableName     = "ed.OlympBook";
            this.MdiParent = null;

            try
            {
                using (PriemEntities context = new PriemEntities())
                {
                    ComboServ.FillCombo(cbOlympType, HelpClass.GetComboListByTable("ed.OlympType", "ORDER BY Id "), false, false);
                    ComboServ.FillCombo(cbOlympName, HelpClass.GetComboListByTable("ed.OlympName", "ORDER BY Number, Name"), false, false);
                    ComboServ.FillCombo(cbOlympSubject, HelpClass.GetComboListByTable("ed.OlympSubject", "ORDER BY Name"), false, false);
                    ComboServ.FillCombo(cbOlympLevel, HelpClass.GetComboListByTable("ed.OlympLevel", "ORDER BY Name"), false, false);
                }
            }
            catch (Exception exc)
            {
                WinFormsServ.Error("Ошибка при инициализации формы " + exc.Message);
            }
        }
Exemplo n.º 25
0
        private void UpdateAfterType()
        {
            if (OlympTypeId == 1 || OlympTypeId == 2)
            {
                ComboServ.FillCombo(cbOlympName, new List <KeyValuePair <string, string> >(), true, false);
                cbOlympName.SelectedIndex = 0;
                cbOlympName.Enabled       = false;

                ComboServ.FillCombo(cbOlympSubject, HelpClass.GetComboListByTable("ed.OlympSubject"), false, false);
                cbOlympSubject.SelectedIndex = 0;
                cbOlympSubject.Enabled       = true;

                ComboServ.FillCombo(cbOlympLevel, new List <KeyValuePair <string, string> >(), true, false);
                cbOlympLevel.SelectedIndex = 0;
                cbOlympLevel.Enabled       = false;
            }
            else
            {
                using (PriemEntities context = new PriemEntities())
                {
                    List <KeyValuePair <string, string> > lst = ((from ob in context.extOlympBook
                                                                  where ob.OlympTypeId == OlympTypeId
                                                                  select new
                    {
                        Id = ob.OlympNameId,
                        Name = ob.OlympNameName
                    }).Distinct()).ToList().Select(u => new KeyValuePair <string, string>(u.Id.ToString(), u.Name)).ToList();

                    cbOlympName.Enabled = true;
                    ComboServ.FillCombo(cbOlympName, lst, false, false);
                    cbOlympName.SelectedIndex = 0;

                    FillAfterOlympName();
                    FillAfterOlympSubject();
                }
            }
        }
Exemplo n.º 26
0
        //дополнительная инициализация контролов
        private void InitControls()
        {
            InitFocusHandlers();
            bdc = MainClass.Bdc;

            try
            {
                if (MainClass.IsCrypto() || MainClass.IsPasha())
                {
                    btnCreateCsv.Visible = true;
                }
                else
                {
                    btnCreateCsv.Visible = false;
                }

                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, true);

                    UpdateVedList();
                    UpdateVedRoomList();

                    UpdateDataGrid();

                    cbFaculty.SelectedIndexChanged     += new EventHandler(cbFaculty_SelectedIndexChanged);
                    cbStudyBasis.SelectedIndexChanged  += new EventHandler(cbStudyBasis_SelectedIndexChanged);
                    cbExamVed.SelectedIndexChanged     += new EventHandler(cbExamVed_SelectedIndexChanged);
                    cbExamVedRoom.SelectedIndexChanged += new EventHandler(cbExamVedRoom_SelectedIndexChanged);
                }
            }
            catch (Exception ex)
            {
                WinFormsServ.Error("Ошибка при инициализации формы ведомостей: " + ex.Message);
            }
        }
Exemplo n.º 27
0
        //дополнительная инициализация контролов
        private void InitControls()
        {
            InitFocusHandlers();
            bdc = MainClass.Bdc;

            try
            {
                btnDeleteFromVed.Visible = btnDeleteFromVed.Enabled = false;
                btnUnload.Visible        = btnUnload.Enabled = false;

                //наверное нужно писать права по отдельным группам. Чуть больше, зато на порядок понятнее. И чтобы "левых" вставок не было
                //Паше наклейки печатать нельзя??? Непорядок!!!
                if (MainClass.IsFacMain())
                {
                    btnCreate.Visible = true;
                    btnChange.Visible = true;
                    btnDelete.Visible = false;

                    tbCountCell.Visible     = false;
                    lblCountCell.Visible    = false;
                    btnLock.Visible         = false;
                    btnCreateAdd.Visible    = true;
                    btnPrintSticker.Visible = false;
                }
                else if (MainClass.IsCryptoMain() || MainClass.IsPasha())
                {
                    btnCreate.Visible = false;
                    btnChange.Visible = false;
                    btnDelete.Visible = false;

                    tbCountCell.Visible     = true;
                    lblCountCell.Visible    = true;
                    btnLock.Visible         = true;
                    btnCreateAdd.Visible    = true;
                    btnPrintSticker.Visible = true;
                }
                else if (MainClass.IsPasha())
                {
                    btnDelete.Visible        = true;
                    btnChange.Visible        = true;
                    btnDeleteFromVed.Visible = btnDeleteFromVed.Enabled = true;
                    btnUnload.Visible        = btnUnload.Enabled = true;
                }
                else
                {
                    btnCreate.Visible = false;
                    btnChange.Visible = false;
                    btnDelete.Visible = false;

                    tbCountCell.Visible     = false;
                    lblCountCell.Visible    = false;
                    btnLock.Visible         = false;
                    btnCreateAdd.Visible    = false;
                    btnPrintSticker.Visible = false;
                }

                if (MainClass.IsOwner())
                {
                    btnCreate.Visible       = true;
                    btnChange.Visible       = true;
                    btnDelete.Visible       = true;
                    tbCountCell.Visible     = true;
                    lblCountCell.Visible    = true;
                    btnLock.Visible         = true;
                    btnCreateAdd.Visible    = true;
                    btnPrintSticker.Visible = true;
                }

                //по умолчанию печатается 2 штрих-кода
                tbCountCell.Text = (2).ToString();

                using (PriemEntities context = new PriemEntities())
                {
                    ComboServ.FillCombo(cbStudyLevelGroup, HelpClass.GetComboListByTable("ed.StudyLevelGroup", ""), false, false);
                    ComboServ.FillCombo(cbFaculty, HelpClass.GetComboListByTable("ed.qFaculty", "ORDER BY Acronym"), false, false);
                    ComboServ.FillCombo(cbStudyBasis, HelpClass.GetComboListByTable("ed.StudyBasis", "ORDER BY Name"), false, true);

                    UpdateVedList();
                    UpdateDataGrid();

                    cbFaculty.SelectedIndexChanged    += new EventHandler(cbFaculty_SelectedIndexChanged);
                    cbStudyBasis.SelectedIndexChanged += new EventHandler(cbStudyBasis_SelectedIndexChanged);
                    cbExamVed.SelectedIndexChanged    += new EventHandler(cbExamVed_SelectedIndexChanged);
                }
            }
            catch (Exception ex)
            {
                WinFormsServ.Error("Ошибка при инициализации формы ведомостей: " + ex.Message);
            }
        }
Exemplo n.º 28
0
        //дополнительная инициализация
        protected virtual void InitControls()
        {
            this.MdiParent = MainClass.mainform;
            this.CenterToParent();
            InitFocusHandlers();

            Dgv = dgvRight;

            if (MainClass.IsPasha())
            {
                dtPassDate.Enabled = true;
            }
            else
            {
                dtPassDate.Enabled = false;
            }

            using (PriemEntities context = new PriemEntities())
            {
                tbExam.Text = (from vd in context.extExamInEntry
                               where vd.ExamId == examId
                               select vd.ExamName).FirstOrDefault();

                dtPassDate.Value = passDate;
                if (isAddVed)
                {
                    dtPassDate.Enabled = false;
                    lblAdd.Visible     = true;
                    if (addCount == 0)
                    {
                        lblAddCount.Text = "";
                    }
                    else
                    {
                        lblAddCount.Text = "(" + addCount + ")";
                    }
                }
                if (_Id == null)
                {
                    dtPassDate.Enabled = false;
                }

                if (studyBasisId == null)
                {
                    ComboServ.FillCombo(cbStudyBasis, HelpClass.GetComboListByTable("ed.StudyBasis", "ORDER BY Name"), false, true);
                }
                else
                {
                    ComboServ.FillCombo(cbStudyBasis, HelpClass.GetComboListByQuery(string.Format("SELECT CONVERT(varchar(100), Id) AS Id, Name FROM ed.StudyBasis WHERE Id = {0} ORDER BY Name", studyBasisId)), false, false);
                }

                ComboServ.FillCombo(cbStudyForm, HelpClass.GetComboListByQuery(string.Format("SELECT DISTINCT CONVERT(varchar(100), StudyFormId) AS Id, StudyFormName AS Name FROM ed.qEntry WHERE StudyLevelGroupId = {0} AND FacultyId = {1} ORDER BY Name", studyLevelGroupId, facultyId)), false, true);
                FillObrazProgram();

                //заполнение гридов
                FillGridLeft();
                UpdateRightGrid();

                cbStudyBasis.SelectedIndexChanged   += new EventHandler(cbStudyBasis_SelectedIndexChanged);
                cbStudyForm.SelectedIndexChanged    += new EventHandler(cbStudyForm_SelectedIndexChanged);
                cbObrazProgram.SelectedIndexChanged += new EventHandler(cbObrazProgram_SelectedIndexChanged);
            }
        }