Exemple #1
0
        protected void btnInsert_Click(object sender, EventArgs e)
        {
            string query = "INSERT INTO Products";

            Dictionary <string, object> parametters = new Dictionary <string, object>();

            parametters.Add("ProductName", txtProductName.Text);
            parametters.Add("Discontinued", false);

            SqlProvider.ExecuteSqlQueryInsert(query, parametters, delegate(int id)
            {
                grdResult.DataSource = new List <int>()
                {
                    { id }
                };
                grdResult.DataBind();
            });
        }