Posted by : Sudhir Chekuri Saturday, 12 March 2016

//Disconnected architecture - delete
        //Delete product
        private void BtnDeleteProduct_Click(object sender, EventArgs e)
        {
             //SqlCommand to delete Product
            SqlCommand cmd = new SqlCommand("exec Usp_DeleteProduct '"+CBExistingCategories.Text+"','"+CBExistingProducts.Text+"'", con);
            DataSet ds = new DataSet();
            SqlDataAdapter da = new SqlDataAdapter(cmd);
            da.Fill(ds);
            //Update Products
            PopulateProducts();
            //Clear product details
            TxtDescription.Text = "";
            NudPrice.Value = 1;
                MessageBox.Show("Product Deleted Successfully");
           

        }


Leave a Reply

Subscribe to Posts | Subscribe to Comments

Followers

Total Pageviews

Powered by Blogger.

- Copyright © 2013 DevStudent - Metrominimalist - Powered by Blogger - Designed by Johanes Djogan -