Beispiel #1
0
        private Transfers build_transfer(MySqlDataReader data)
        {
            Transfers item = new Transfers(
                data.GetInt32("id"),
                data.GetInt32("folio"),
                data.GetString("tipo"),
                data.GetString("sucursal"),
                data.GetDouble("subtotal"),
                data.GetDouble("iva"),
                data.GetDouble("total"),
                data.GetDateTime("fecha"),
                data.GetInt32("facturado")
                );

            return(item);
        }
Beispiel #2
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);
        }
Beispiel #3
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);
        }
Beispiel #4
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);
        }
Beispiel #5
0
        public List <Transfers> getTransfers_e()
        {
            string           query  = maq_query + " where tipo='E' order by id desc";
            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);
        }