Beispiel #1
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();
        }
Beispiel #2
0
        // карточка открывается в режиме read-only
        protected override void  SetAllFieldsNotEnabled()
        {
            base.SetAllFieldsNotEnabled();

            dgvApplications.Enabled = true;
            dgvOtherAppl.Enabled    = true;

            btnAttMarks.Enabled = true;

            if (HasAssignToHostel && MainClass.RightsFacMain() && MainClass.HasRightsForFaculty(HostelFacultyId))
            {
                SetBtnPrintHostelEnabled();
            }

            if (HasExamPass && MainClass.RightsFacMain() && MainClass.HasRightsForFaculty(ExamPassFacultyId))
            {
                SetBtnPrintExamPassEnabled();
            }

            if (!IsForReadOnly() && !inEntryView)
            {
                btnAddAbit.Enabled = true;
            }

            btnDocs.Enabled = true;
        }
Beispiel #3
0
 //создать новый протокол
 private void btnCreate_Click(object sender, EventArgs e)
 {
     if (MainClass.RightsFacMain())
     {
         SelectExamCrypto frm = new SelectExamCrypto(this, StudyLevelGroupId, FacultyId, StudyBasisId);
         frm.Show();
     }
 }
Beispiel #4
0
 //изменение - только для супер
 private void btnChange_Click(object sender, EventArgs e)
 {
     if (MainClass.RightsFacMain())
     {
         ExamsVedCard p = new ExamsVedCard(this, ExamVedId);
         p.Show();
     }
 }
Beispiel #5
0
        //убрать режим read-only
        protected override void SetAllFieldsEnabled()
        {
            base.SetAllFieldsEnabled();

            btnPrintHostel.Enabled   = false;
            btnPrintExamPass.Enabled = false;

            if (HasAssignToHostel)
            {
                chbHostelAbitYes.Enabled     = chbHostelAbitNo.Enabled = false;
                btnGetAssignToHostel.Enabled = false;

                if (MainClass.RightsFacMain() && MainClass.HasRightsForFaculty(HostelFacultyId))
                {
                    btnPrintHostel.Enabled = true;
                }
            }
            else
            {
                if (chbHostelAbitYes.Checked)
                {
                    btnGetAssignToHostel.Enabled = true;
                }
                else
                {
                    btnGetAssignToHostel.Enabled = false;
                }
            }

            if (HasExamPass)
            {
                btnGetExamPass.Enabled = false;

                if (MainClass.RightsFacMain() && MainClass.HasRightsForFaculty(ExamPassFacultyId))
                {
                    btnPrintExamPass.Enabled = true;
                }
            }
            else
            {
                btnGetExamPass.Enabled = true;
            }

            btnAttMarks.Enabled = true;

            tbNum.Enabled   = false;
            gbEnter.Enabled = false;
        }
Beispiel #6
0
 private void btnLists_Click(object sender, EventArgs e)
 {
     if (MainClass.RightsFacMain())
     {
         foreach (DataGridViewRow dgvr in dgvVed.Rows)
         {
             if (dgvr.Cells["Печать"].Value.ToString() == "True")
             {
                 Guid abitId = new Guid(dgvr.Cells["Id"].Value.ToString());
                 Print.PrintExamListWord(abitId, false /*true*/);
             }
         }
     }
     else
     {
         WinFormsServ.Error("Невозможно создание экзаменационных листов, недостаточно прав");
     }
 }
Beispiel #7
0
        private void btnGetAssignToHostel_Click(object sender, EventArgs e)
        {
            using (PriemEntities context = new PriemEntities())
            {
                if (_Id == null)
                {
                    return;
                }

                if (HasAssignToHostel)
                {
                    return;
                }

                int facId = MainClass.GetFacultyIdInt();

                string facName = (from fac in context.qFaculty
                                  where fac.Id == facId
                                  select fac.Name).FirstOrDefault();

                if (MessageBox.Show(string.Format("Будет выдано направление на поселение. Факультет: {0}, продолжить?", facName), "Сохранить", MessageBoxButtons.YesNo) == DialogResult.Yes)
                {
                    context.Person_UpdateHostel(true, facId, GuidId);
                    HasAssignToHostel = true;
                    HostelFacultyId   = facId;

                    btnGetAssignToHostel.Enabled = false;

                    if (MainClass.RightsFacMain())
                    {
                        btnPrintHostel.Enabled = true;
                    }

                    btnPrintHostel_Click(null, null);
                }
            }
        }