示例#1
0
        protected void DeleteDetails(object sender, GridViewDeleteEventArgs e)
        {
            GridViewRow row     = grid.Rows[e.RowIndex];
            string      orderid = dt1.Rows[row.DataItemIndex]["OrderID"].ToString();

            DialogResult dialogResult = MessageBox.Show("Are you sure?", "Delete", MessageBoxButtons.YesNo);

            if (dialogResult == DialogResult.Yes)
            {
                BLL.DeleteOrder(orderid);
                DisplayOrders(orderDate);
            }
            else if (dialogResult == DialogResult.No)
            {
                DisplayOrders(orderDate);
            }
        }