コード例 #1
0
 public AddFormStudent(MainForm mainForm, Student student, string fileName, FlagAddOrUpdate flag) : this(mainForm)
 {
     this.student  = student;
     this.fileName = fileName;
     this.flag     = flag;
     InitializeFieldsAndDataGridsAddFormStudent();
     SetOptionsForUpdateOrAdditingForm(flag);
     SetButtonsContactEnabledOrDisabled();
     SetButtonsAdressEnabledOrDisabled();
     AddButton.Enabled = false;
 }
コード例 #2
0
        public AddFormContacts(DataTable dataTableContact, CRUDStudent crudStudent, int currentRowContactIndex, FlagAddOrUpdate flag) : this()
        {
            SetDataSourceTypeContactComboBox();

            _currentRowContactIndex = currentRowContactIndex;
            _dataTableContact       = dataTableContact;
            _crudStudent            = crudStudent;
            _flag = flag;

            SetAdditingOrUpdateForm(flag);
            SetOptionColorForStringMaskedTextBox();
        }
コード例 #3
0
 private void SetAdditingOrUpdateForm(FlagAddOrUpdate flag)
 {
     if (flag == FlagAddOrUpdate.Addition)
     {
         AdditingSettingForm();
     }
     else
     {
         UpdateSettingForm();
         SetFieldsUpdateFormContact();
     }
 }
コード例 #4
0
 private void SetSetAdditingOrUpdateForm(FlagAddOrUpdate flag)
 {
     if (flag == FlagAddOrUpdate.Addition)
     {
         AdditingSettingForm();
     }
     else
     {
         UpdationgSettingForm();
         SetFieldsUpdateFormAdress();
     }
 }
コード例 #5
0
        public AdressForm(DataTable dataTableAdress, CRUDStudent crudStudent, int currentRowAdressIndex, FlagAddOrUpdate flag) : this()
        {
            SetDataSourceTypeAdressComboBox();

            _dataTableAdress       = dataTableAdress;
            _crudStudent           = crudStudent;
            _currentRowAdressIndex = currentRowAdressIndex;
            _flag = flag;

            OkButton.Enabled = false;

            SetSetAdditingOrUpdateForm(flag);
        }
コード例 #6
0
 private void SetOptionsForUpdateOrAdditingForm(FlagAddOrUpdate flag)
 {
     Text = flag == FlagAddOrUpdate.Addition ? Resources.AddMessageStudent : Resources.UpdateMessageStudent;
 }
コード例 #7
0
 public AddFormStudent()
 {
     InitializeComponent();
     InitialiZeColorFields();
     flag = FlagAddOrUpdate.Addition;
 }