示例#1
0
        public List <Transfers> getTransfers()
        {
            string           query  = maq_query;
            MySqlDataReader  data   = runQuery(query);
            List <Transfers> result = new List <Transfers>();

            if (data.HasRows)
            {
                while (data.Read())
                {
                    Transfers item = build_transfer(data);
                    result.Add(item);
                }
            }
            return(result);
        }
示例#2
0
        private Transfers build_transfer(MySqlDataReader data)
        {
            Transfers item = new Transfers(
                data.GetInt16("id"),
                data.GetInt16("folio"),
                data.GetString("tipo"),
                data.GetString("sucursal"),
                data.GetDouble("subtotal"),
                data.GetDouble("iva"),
                data.GetDouble("total"),
                data.GetDateTime("fecha"),
                data.GetInt16("facturado")
                );

            return(item);
        }
示例#3
0
        public List <Transfers> getTransferbysucursal(int id_sucursal)
        {
            string           query  = maq_query + " where sucursal='" + id_sucursal + "' and tipo='E'";
            MySqlDataReader  data   = runQuery(query);
            List <Transfers> result = new List <Transfers>();

            if (data.HasRows)
            {
                while (data.Read())
                {
                    Transfers item = build_transfer(data);
                    result.Add(item);
                }
            }
            return(result);
        }
示例#4
0
        public List <Transfers> getTransferbyfolio(int folio, string tipo)
        {
            string           query  = maq_query + " where folio='" + folio.ToString() + "' and tipo='" + tipo + "'";
            MySqlDataReader  data   = runQuery(query);
            List <Transfers> result = new List <Transfers>();

            if (data.HasRows)
            {
                while (data.Read())
                {
                    Transfers item = build_transfer(data);
                    result.Add(item);
                }
            }
            return(result);
        }
示例#5
0
        public List <Transfers> getTransferbyid(int id)
        {
            string           query  = maq_query + " where id='" + id.ToString() + "'";
            MySqlDataReader  data   = runQuery(query);
            List <Transfers> result = new List <Transfers>();

            if (data.HasRows)
            {
                while (data.Read())
                {
                    Transfers item = build_transfer(data);
                    result.Add(item);
                }
            }
            return(result);
        }