Пример #1
0
        public ArrayList Pedidos_CQ()
        {
            SessionClass session = new SessionClass();

            session.UserLogon("admin", "admin", "PRESU", 2, "BPD_DESA");

            OAdQuerydef queryDef = (OAdQuerydef)session.BuildQuery("Pedido_Pago");

            queryDef.BuildField("id");
            queryDef.BuildField("Importe_Total");

            OAdResultset resultset = (OAdResultset)session.BuildResultSet(queryDef);

            ArrayList PedidosdePagos = new ArrayList();

            resultset.Execute();

            var Status = resultset.MoveNext();

            while (Convert.ToInt32(Status) == 1)
            {
                Pedido_Pago data = new Pedido_Pago();
                data.id_pedido     = (String)resultset.GetColumnValue(1);
                data.importe_total = (String)resultset.GetColumnValue(2);
                PedidosdePagos.Add(data);
                Status = resultset.MoveNext();
            }

            return(PedidosdePagos);
        }
Пример #2
0
        public String Pedidos_CQ_Instant()
        {
            SessionClass session = new SessionClass();

            session.UserLogon("admin", "admin", "PRESU", 2, "BPD_DESA");

            OAdQuerydef queryDef = (OAdQuerydef)session.BuildQuery("Pedido_Pago");

            queryDef.BuildField("id");
            queryDef.BuildField("Importe_Total");

            OAdResultset resultset = (OAdResultset)session.BuildResultSet(queryDef);

            resultset.Execute();

            var    Status = resultset.MoveNext();
            String data   = "";

            while (Convert.ToInt32(Status) == 1)
            {
                data = (String)resultset.GetColumnValue(2);

                Status = resultset.MoveNext();
            }

            return(data);
        }
Пример #3
0
        internal static object GetColumnValue(OAdResultset resultSet, int index)
        {
            object retval = null;

            try
            {
                retval = resultSet.GetColumnValue(index);
            }
            catch (COMException ex)
            {
                InteropErrorHandler.HandleCQException(ex);
            }
            return(retval);
        }