Example #1
0
        public int Create()
        {
            string Statement = string.Format("PedidoNota_add_upda|Id@INT={0}&Folio@VARCHAR={1}&Total@DOUBLE={2}&Id_Pedido@INT={3}",
                                             0,
                                             Folio,
                                             Total,
                                             Id_Pedido
                                             );
            int result;

            try
            {
                result = DBMysql_.ExecuteStoreProcedure(Statement);
                if (result != 0)
                {
                    throw new DBException(DBMysql_.MessageResponse);
                }
                return(result);
            }
            catch (DBException ex)
            {
                throw ex;
            }
            catch (MySqlException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
            }
        }
Example #2
0
        public int Update()
        {
            string Statement = string.Format("PedidoAporte|Id@INT={0}&Id_pedido@INT={1}&Total@DOUBLE={2}&Id_invercionista@INT={3}",
                                             Id,
                                             Id_pedido,
                                             Total,
                                             Id_invercionista
                                             );
            int result;

            try
            {
                result = DBMysql_.ExecuteStoreProcedure(Statement);
                if (result != 0)
                {
                    throw new DBException(DBMysql_.MessageResponse);
                }
                return(result);
            }
            catch (DBException ex)
            {
                throw ex;
            }
            catch (MySqlException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
            }
        }