private void ArmarParametrosProductoEliminar(ref SqlCommand Comando, Producto p) { SqlParameter SqlParametros = new SqlParameter(); SqlParametros = Comando.Parameters.Add("@IDProducto", SqlDbType.Char, 4); SqlParametros.Value = p.getCodigoProducto(); }
private void ArmarParametrosProductoModificar(ref SqlCommand Comando, Producto p) { SqlParameter SqlParametros = new SqlParameter(); SqlParametros = Comando.Parameters.Add("@Cod_Producto_PR", SqlDbType.Char, 4); SqlParametros.Value = p.getCodigoProducto(); SqlParametros = Comando.Parameters.Add("@Nombre_Producto_PR", SqlDbType.NVarChar, 100); SqlParametros.Value = p.getNombreProducto(); SqlParametros = Comando.Parameters.Add("@Descripcion_Producto_PR", SqlDbType.NVarChar, 500); SqlParametros.Value = p.getDescripcion(); SqlParametros = Comando.Parameters.Add("@Cod_Marca_PR", SqlDbType.Char, 4); SqlParametros.Value = p.getIdCodigoMarca(); SqlParametros = Comando.Parameters.Add("@Cod_Categoria_PR", SqlDbType.Char, 4); SqlParametros.Value = p.getIdCodigoCategoria(); SqlParametros = Comando.Parameters.Add("@Cod_Genero_PR", SqlDbType.Char, 4); SqlParametros.Value = p.getIdCodigoGenero(); SqlParametros = Comando.Parameters.Add("@fPublicacion_Producto_PR", SqlDbType.SmallDateTime); SqlParametros.Value = p.getFechaPublicacion().ToString("dd/MM/yyyy"); }