コード例 #1
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);
            }
        }
コード例 #2
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);
            }
        }
コード例 #3
0
        public DisEntryViewList()
        {
            this.CenterToParent();
            this.MdiParent = MainClass.mainform;

            this.sQuery = @"SELECT DISTINCT ed.extPerson.Id, ed.extPerson.PersonNum as Ид_номер, ed.extPerson.Surname AS Фамилия, ed.extPerson.Name AS Имя, ed.extPerson.SecondName AS Отчество, 
                            ed.extPerson.BirthDate AS Дата_рождения FROM ed.extPerson INNER JOIN ed.ExamsVedHistory ON ed.ExamsVedHistory.PersonId = ed.extPerson.Id ";

            InitializeComponent();
            InitControls();

            if (!MainClass.IsPasha())
            {
                btnPrintOrder.Visible  = btnPrintOrder.Enabled = btnCancelView.Enabled = btnCancelView.Visible = false;
                chbIsForeign.Visible   = false;
                btnCreateOrder.Visible = btnCreateOrder.Enabled = false;
            }

            if (MainClass.IsReadOnly())
            {
                btnCreate.Visible     = btnCreate.Enabled = false;
                btnPrintOrder.Visible = btnPrintOrder.Enabled = true;
            }
        }
コード例 #4
0
ファイル: BookList.cs プロジェクト: wladengine/Foreigners
 protected override bool IsForReadOnly()
 {
     return(MainClass.IsReadOnly());
 }