Example #1
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            try
            {
                Inv_Product invProduct = new Inv_Product();

                int ProductId = Convert.ToInt16(ddlProductName.SelectedValue);
                int GroupId   = Convert.ToInt16(ddlGroupName.SelectedValue);

                invProduct.Price = Convert.ToDecimal(txtPrice.Text);
                int result = groupBll.UpdatePrice(invProduct, ProductId, GroupId);
                if (result == 1)
                {
                    //  lblMessage.Text = "Data Update successfully";
                    // lblMessage.ForeColor = System.Drawing.Color.Green;
                    ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "func('Data Updated Sucessfully')", true);
                    reset();
                    LoadGrid();
                }
            }
            catch (Exception ex)
            {
                ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "func('" + ex.Message + "')", true);
            }
        }