コード例 #1
0
 private void AddButton_Click(object sender, EventArgs e)
 {
     if (!(StudyTextBox.Text.Trim().Equals(string.Empty)) && !(HochschuleComboBox.Equals(string.Empty)) && !(TitelComboBox.Text.Trim().Equals(string.Empty)))
     {
         int ID_Hochschule = Search_Hochschule_ID(HochschuleComboBox.Text.Trim());
         int ID_titel      = Search_Title_ID(TitelComboBox.Text.Trim());
         if (ID_Hochschule != 0 && ID_Hochschule != -1 && ID_titel != 0 && ID_titel != -1)
         {
             Add_Studiengang(ID_Hochschule, ID_titel);
         }
         else if (ID_Hochschule == 0)
         {
             DialogResult dialogResult = MessageBox.Show("Hochschule doesn't exist! Please click Ok to add a new hochschule!", "confirmation", MessageBoxButtons.OKCancel);
             if (dialogResult == DialogResult.OK)
             {
                 Add_Hochschule add_Hochschule = new Add_Hochschule(HochschuleComboBox.Text);
                 add_Hochschule.Show();
                 this.Close();
             }
         }
     }
     else
     {
         MessageBox.Show("Please fill all the field!");
     }
 }
コード例 #2
0
        private void HochschuleHinzufügenBtn_Click(object sender, EventArgs e)
        {
            Add_Hochschule add_Hochschule = new Add_Hochschule(HochschuleCB.Text.Trim());

            add_Hochschule.Show();
        }
コード例 #3
0
        private void AddHochschuleBtn_Click(object sender, EventArgs e)
        {
            Add_Hochschule add_Hochschule = new Add_Hochschule(HochshuleCB.Text);

            add_Hochschule.Show();
        }