No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
3 Posted Topics
[code] protected void Button1_Click(object sender, EventArgs e) { SqlConnection con = new SqlConnection(System.Web.Configuration.WebConfigurationManager.ConnectionStrings["shortycaponeConnectionString"].ConnectionString); //SqlConnection mySqlConnection = new SqlConnection(System.Web.Configuration.WebConfigurationManager.ConnectionStrings["shortycaponeConnectionString"].ConnectionString); //// open the Sql connection //mySqlConnection.Open(); //DataSet ds = new DataSet(); //SqlDataAdapter da1 = new SqlDataAdapter("Select Quantity from InwardEntries where ProductCode='" + DropDownList4.SelectedItem.Text + "'", mySqlConnection); //da1.Fill(ds); //GridView2.DataSource = ds; //GridView2.DataBind(); for …
[CODE]CREATE FUNCTION dbo.update ( @Quantity int ) RETURNS TABLE AS GO UPDATE Quantity.Quantity1 SET Quantity = Quantity+Quantity FROM Quantity.Quantity1 AS sp JOIN Quantity.InwardEntries AS so ON sp.Id = so.Id GO RETURN /*select ... from ... */ [/CODE] how to call above function in asp.net
[code] protected void Button1_Click(object sender, EventArgs e) { SqlConnection con = new SqlConnection(System.Web.Configuration.WebConfigurationManager.ConnectionStrings["shortycaponeConnectionString"].ConnectionString); for (int i = 0; i < GridView1.Rows.Count; i++) { GridViewRow row = GridView1.Rows[i]; CheckBox chkbox = (CheckBox)row.FindControl("cbRows"); TextBox Quantity = (TextBox)row.FindControl("tbx_TextBox"); if (chkbox.Checked == true) { try { con.Open(); SqlCommand cmd = new SqlCommand("INSERT INTO InwardEntries(ProductCode,Size,Quantity,DateTimeNow) …
The End.
diptibhatore