Пример #1
0
        private void Add(object sender, EventArgs e)
        {
            AddUniversity addUniversity = new AddUniversity();

            addUniversity.Owner = this;
            addUniversity.Show();
        }
Пример #2
0
 private void Update(object sender, EventArgs e)
 {
     if (DG.SelectedRows.Count == 1)
     {
         DataRow     Row      = ((DataRowView)DG.SelectedRows[0].DataBoundItem).Row;
         String[]    fullName = ((string)Row["FullNameRector"]).Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
         MUniversity mUniversity;
         if (fullName.Length == 3)
         {
             mUniversity = new MUniversity((string)Row["INN"],
                                           (string)Row["ShortName"],
                                           (string)Row["FullName"],
                                           (string)Row["ActualAddress"],
                                           (string)Row["LegalAddress"],
                                           fullName[1], fullName[0], fullName[2],
                                           (string)Row["Email"],
                                           (string)Row["Phone"]);
         }
         else
         {
             mUniversity = new MUniversity((string)Row["INN"],
                                           (string)Row["ShortName"],
                                           (string)Row["FullName"],
                                           (string)Row["ActualAddress"],
                                           (string)Row["LegalAddress"],
                                           fullName[1], fullName[0], fullName[2],
                                           (string)Row["Email"],
                                           (string)Row["Phone"]);
         }
         AddUniversity add = new AddUniversity(mUniversity);
         add.Owner = this;
         add.ShowDialog();
     }
     else if (DG.SelectedRows.Count > 1)
     {
         MessageBox.Show("Для изменения выделите только одну строку!");
     }
     else
     {
         MessageBox.Show("Для изменения выделите хотя бы одну строку !");
     }
 }
Пример #3
0
        private void Open_University_Click(object sender, EventArgs e)
        {
            AddUniversity addUniversity = new AddUniversity();

            addUniversity.Show();
        }
Пример #4
0
        private void button2_Click(object sender, EventArgs e)
        {
            AddUniversity a = new AddUniversity();

            a.Show();
        }