public int agregarFactura(FacturaProductos f) { SqlCommand comando = new SqlCommand(); armarParametrosFacturaAgregar(ref comando, f); return(ds.EjecutarProcedimientoAlmacenado(comando, "SP_Insert_Factura")); }
public bool agregarFactura(FacturaProductos f) { int seAgrego = df.agregarFactura(f); if (seAgrego > 0) { return(true); } else { return(false); } }
//FIN private void armarParametrosFacturaAgregar(ref SqlCommand comando, FacturaProductos f) { SqlParameter sqlParametros = new SqlParameter(); sqlParametros = comando.Parameters.Add("@F_Codigo_Usuario", SqlDbType.VarChar); sqlParametros.Value = f.Codigo_Usuario; sqlParametros = comando.Parameters.Add("@F_Codigo_CodDescuento", SqlDbType.VarChar); sqlParametros.Value = f.Codigo_CodDescuento; sqlParametros = comando.Parameters.Add("@F_MontoTotal", SqlDbType.Decimal); sqlParametros.Value = f.Monto_Total; sqlParametros = comando.Parameters.Add("@F_Fecha", SqlDbType.Date); sqlParametros.Value = f.Fecha; }