Exemplo n.º 1
0
        public void InsertarKardex(CapaDatos.Kardex moTabla)

        {
            string    sSQL   = "exec insertarKardex " + moTabla.fk_producto + "," + moTabla.cantidad + "," + moTabla.precio + "," + moTabla.total + "," + moTabla.fk_transaccion + "";
            DbCommand moComm = moConn.CreateCommand();

            moComm.CommandText = sSQL;
            moConn.Open();
            moComm.ExecuteNonQuery();
            moConn.Close();
        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            CapaDatos.Kardex nu = new CapaDatos.Kardex();
            nu.fk_producto    = DropDownList2.SelectedValue;
            nu.cantidad       = Convert.ToInt32(cantidad.Text);
            nu.precio         = precio.Text;
            nu.total          = total.Text;
            nu.fk_transaccion = DropDownList1.SelectedValue;

            moConeccion.InsertarKardex(nu);
        }