示例#1
0
        public int agregarFactura(FacturaProductos f)
        {
            SqlCommand comando = new SqlCommand();

            armarParametrosFacturaAgregar(ref comando, f);
            return(ds.EjecutarProcedimientoAlmacenado(comando, "SP_Insert_Factura"));
        }
示例#2
0
        public bool agregarFactura(FacturaProductos f)
        {
            int seAgrego = df.agregarFactura(f);

            if (seAgrego > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
示例#3
0
        //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;
        }