private void buttonDelete_Click(object sender, EventArgs e) { NationalityHL nation = new NationalityHL(); nation.nationalityId = nationId; NationalityManager.nationalityDelete(nation); MessageBox.Show("Success"); clearTextBoxes(); displayNationality(); }
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(); }
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); } }