예제 #1
0
        protected void Button2_Click(object sender, EventArgs e)
        {
            SqlCommand    sqlCommand = new SqlCommand("insert into pozsprzedaz(nrfaktury, idproduktu, ilosc) values(@nrfaktury, @idproduktu, @ilosc)");
            SqlConnection connection = new SqlConnection(connectionString);

            sqlCommand.Parameters.AddWithValue("@nrfaktury", LabelNrFaktury.Text);
            sqlCommand.Parameters.AddWithValue("@idproduktu", DropDownListTowar.SelectedValue);
            sqlCommand.Parameters.AddWithValue("@ilosc", TextBoxIlosc.Text);
            sqlCommand.Connection = connection;
            connection.Open();
            sqlCommand.ExecuteNonQuery();
            connection.Close();


            GridViewLinies.DataBind();
            DetailsViewSuma.DataBind();
        }
예제 #2
0
 protected void SqlDataSource3_Deleted(object sender, SqlDataSourceStatusEventArgs e)
 {
     DetailsViewSuma.DataBind();
 }