Пример #1
0
        public void EnableOrDisableThisForm(bool status, bool resetText)
        {
            if (resetText)
            {
                imageData = null;
                pictureBoxPersonnel.Image = Properties.Resources.Person;
                txtDocumentsCount.Text    = "0";
            }
            if (status)
            {
                btnNewDossier.Text = "انصراف";
            }
            else
            {
                btnNewDossier.Text = "ویرایش";
            }

            btnSetImage.Enabled                 = status;
            btnEditPersonnelNumber.Enabled      = btnSaveDossier.Enabled = status;
            dossierTypeComboBoxExtended.Enabled = status;
            DossierFormHelper.EnableOrDisableTabcontrol(tabControlExtended, status, resetText);
            PersonnelNumberTextBox.Enabled = !status;
            Control lblPersonnelNumber = GetPersonnelNumberLabel();

            if (lblPersonnelNumber != null)
            {
                lblPersonnelNumber.Enabled = !status;
            }
            if (!status)
            {
                PersonnelNumberTextBox.Focus();
            }
        }
Пример #2
0
 public void EnableOrDisableForm(bool status, bool resetText)
 {
     if (resetText)
     {
         imageData = null;
         pictureBoxPersonnel.Image = Properties.Resources.Person;
         txtDocumentsCount.Text    = "0";
     }
     btnSetImage.Enabled                 = status;
     btnSaveDossier.Enabled              = status;
     btnImportFiles.Enabled              = !status;
     btnShowDocuments.Enabled            = !status;
     dossierTypeComboBoxExtended.Enabled = status;
     DossierFormHelper.EnableOrDisableTabcontrol(tabControlExtended, status, resetText);
 }