private void btnDelete_Click(object sender, EventArgs e) { try { Job jo = job.Get(int.Parse(txtJobCode.Text)); job.Delete(jo); MessageBox.Show("Selected Job Successfully Deleted"); RowFocusedIndex = 0; FRM_Job_Load(null, null); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void BtnDelete_Click(object sender, EventArgs e) { if (job == null) { MessageBox.Show("Öncelikle İş Bilgisi Seçiniz"); return; } DialogResult dr = MessageBox.Show(TxtName.Text + " İş Kaydı Silinecektir. Onaylıyor Musunuz ? ", "Soru", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (dr == DialogResult.Yes) { MessageBox.Show(jobManager.Delete(job.Id)); JobList(); } }