示例#1
0
        protected void btnDeleteProduct_Click(object sender, EventArgs e)
        {
            if (Session["productID"] == null)
            {
                lblDeleteProductStatus.Text      = "Please select a product's row in order to delete the user!";
                lblDeleteProductStatus.ForeColor = System.Drawing.Color.Red;
            }
            else
            {
                ECommerceBusiness ecb = new ECommerceBusiness();
                ecb.DeleteProduct(Session["productID"].ToString());

                SelectAllProduct();
                Response.Write("<script>alert('Product Deleted Successfully')</script>");
            }
        }