public int agregarDetallePeriferico(DetalleFacturaPeriferico dp) { SqlCommand comando = new SqlCommand(); armarParametrosDetallePerifericoAgregar(ref comando, dp); return(ds.EjecutarProcedimientoAlmacenado(comando, "SP_Insert_Detalle_Periferico")); }
private void armarParametrosDetallePerifericoAgregar(ref SqlCommand comando, DetalleFacturaPeriferico dp) { SqlParameter sqlParametros = new SqlParameter(); sqlParametros = comando.Parameters.Add("@DP_Codigo_Periferico", SqlDbType.VarChar); sqlParametros.Value = dp.CodigoPeriferico; sqlParametros = comando.Parameters.Add("@DP_Cantidad", SqlDbType.Int); sqlParametros.Value = dp.Cantidad; sqlParametros = comando.Parameters.Add("@DP_PrecioUnitario", SqlDbType.Decimal); sqlParametros.Value = dp.PrecioUnitario; }
public bool agregarDetallePeriferico(DetalleFacturaPeriferico dp) { int seAgrego = df.agregarDetallePeriferico(dp); if (seAgrego > 0) { return(true); } else { return(false); } }