コード例 #1
0
        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();
        }
コード例 #2
0
        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();
        }
コード例 #3
0
        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();
            }
        }