Пример #1
0
        private void buttonDelete_Click(object sender, EventArgs e)
        {
            NationalityHL nation = new NationalityHL();

            nation.nationalityId = nationId;
            NationalityManager.nationalityDelete(nation);
            MessageBox.Show("Success");
            clearTextBoxes();
            displayNationality();
        }
Пример #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            NationalityHL nation = new NationalityHL();

            nation.nationalityName = this.textBoxNationalityName.Text;
            NationalityManager.nationalityInsert(nation);
            MessageBox.Show("Success");
            clearTextBoxes();
            displayNationality();
        }
Пример #3
0
 private void buttonUpdate_Click(object sender, EventArgs e)
 {
     try
     {
         NationalityHL nation = new NationalityHL();
         nation.nationalityName = this.textBoxNationalityName.Text;
         nation.nationalityId   = nationId;
         NationalityManager.nationalityUpdate(nation);
         MessageBox.Show("Success");
         clearTextBoxes();
     }
     catch (System.Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }