private void btnDelete_Click(object sender, EventArgs e) { BL_ScheduleEvents obj = new BL_ScheduleEvents(); obj.DEventId = Convert.ToInt32(txtEventid.Text); obj.DeleteEvent(); MessageBox.Show("Event Deleted Successfully"); ViewDetails(); AllClear(); }
protected void btnDelete_Click(object sender, EventArgs e) { BL_ScheduleEvents obj = new BL_ScheduleEvents(); obj.DEventId = Convert.ToInt32(TextBox1.Text); obj.DeleteEvent(); Label1.Text = "Event Deleted Successfully"; AllClear(); TextBox1.Text = ""; FillGridView(); }
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == 0) { //delete BL_ScheduleEvents obj = new BL_ScheduleEvents(); obj.DEventId = Convert.ToInt32(dataGridView1.Rows[e.RowIndex].Cells["BookedEventId"].Value); dataGridView1.Columns["BookedEventId"].Visible = false; obj.DeleteEvent(); ViewDetails(); } }