Ejemplo n.º 1
0
        public Recordset ReadSalesOrderDetails(int salesOrderID)
        {
            Recordset salesOrderDetails = new Recordset();
            DataSet   ds = fillDataset(USP_SALESORDERDETAILS, TBL_SALESORDERDETAILS, new object[] { salesOrderID });

            salesOrderDetails.Merge(ds);
            return(salesOrderDetails);
        }
Ejemplo n.º 2
0
        public Recordset.SalesOrderTableRow ReadSalesOrder(int salesOrderID)
        {
            Recordset salesOrder = new Recordset();
            DataSet   ds         = fillDataset(USP_SALESORDER_READ, TBL_SALESORDERS, new object[] { salesOrderID });

            salesOrder.Merge(ds);
            return(salesOrder.SalesOrderTable[0]);
        }
Ejemplo n.º 3
0
        public Recordset.SalesOrderDetailTableRow ReadSalesOrderDetail(int salesOrderDetailID)
        {
            Recordset salesOrderDetail = new Recordset();
            DataSet   ds = fillDataset(USP_SALESORDERDETAIL_READ, TBL_SALESORDERDETAILS, new object[] { salesOrderDetailID });

            salesOrderDetail.Merge(ds);
            return(salesOrderDetail.SalesOrderDetailTable[0]);
        }
        public Recordset ReadSalesOrders()
        {
            Recordset salesOrders = new Recordset();
            DataSet   ds          = fillDataset(USP_SALESORDERS, TBL_SALESORDERS, new object[] { });

            salesOrders.Merge(ds);
            return(salesOrders);
        }
Ejemplo n.º 5
0
        public static SalesOrderRowGateway ReadSalesOrder(int salesOrderID)
        {
            Recordset salesOrder = new Recordset();
            Database  db         = DatabaseFactory.CreateDatabase("SQLConnection");
            DbCommand cmd        = db.GetStoredProcCommand(USP_SALESORDER_READ, new object[] { salesOrderID });
            DataSet   ds         = new DataSet();

            db.LoadDataSet(cmd, ds, TBL_SALESORDERS);
            salesOrder.Merge(ds);
            return(new SalesOrderRowGateway(salesOrder.SalesOrderTable[0]));
        }
Ejemplo n.º 6
0
        //Interface
        public static Recordset ReadSalesOrders()
        {
            Recordset salesOrders = new Recordset();
            Database  db          = DatabaseFactory.CreateDatabase("SQLConnection");
            DbCommand cmd         = db.GetStoredProcCommand(USP_SALESORDERS, new object[] { });
            DataSet   ds          = new DataSet();

            db.LoadDataSet(cmd, ds, TBL_SALESORDERS);
            salesOrders.Merge(ds);
            return(salesOrders);
        }
        public Recordset ReadSalesOrders() {
            Recordset salesOrders=null;

            //Caching: best to use with master tables not transactional tables
            ObjectCache cache = MemoryCache.Default;
            salesOrders = cache["salesorders"] as Recordset;
            if(salesOrders == null) {
                salesOrders = new Recordset();
                DataSet ds = fillDataset(USP_SALESORDERS,TBL_SALESORDERS,new object[] { });
                salesOrders.Merge(ds);

                //CacheItemPolicy policy = new CacheItemPolicy();
                //policy.ChangeMonitors.Add(new SqlChangeMonitor(new SqlDependency(new SqlCommand())));
                DateTimeOffset policy = new DateTimeOffset(DateTime.Now.AddMinutes(5));
                cache.Set("salesorders",salesOrders,policy);
            }
            return salesOrders;
        }
Ejemplo n.º 8
0
        public Recordset ReadSalesOrders()
        {
            Recordset salesOrders = null;

            //Caching: best to use with master tables not transactional tables
            ObjectCache cache = MemoryCache.Default;

            salesOrders = cache["salesorders"] as Recordset;
            if (salesOrders == null)
            {
                salesOrders = new Recordset();
                DataSet ds = fillDataset(USP_SALESORDERS, TBL_SALESORDERS, new object[] { });
                salesOrders.Merge(ds);

                //CacheItemPolicy policy = new CacheItemPolicy();
                //policy.ChangeMonitors.Add(new SqlChangeMonitor(new SqlDependency(new SqlCommand())));
                DateTimeOffset policy = new DateTimeOffset(DateTime.Now.AddMinutes(5));
                cache.Set("salesorders", salesOrders, policy);
            }
            return(salesOrders);
        }
 public Recordset.SalesOrderDetailTableRow ReadSalesOrderDetail(int salesOrderDetailID) {
     Recordset salesOrderDetail = new Recordset();
     DataSet ds = fillDataset(USP_SALESORDERDETAIL_READ,TBL_SALESORDERDETAILS,new object[] { salesOrderDetailID });
     salesOrderDetail.Merge(ds);
     return salesOrderDetail.SalesOrderDetailTable[0];
 }
Ejemplo n.º 10
0
 public Recordset ReadSalesOrderDetails(int salesOrderID) {
     Recordset salesOrderDetails = new Recordset();
     DataSet ds = fillDataset(USP_SALESORDERDETAILS,TBL_SALESORDERDETAILS,new object[] { salesOrderID });
     salesOrderDetails.Merge(ds);
     return salesOrderDetails;
 }
Ejemplo n.º 11
0
 public Recordset.SalesOrderTableRow ReadSalesOrder(int salesOrderID) {
     Recordset salesOrder = new Recordset();
     DataSet ds = fillDataset(USP_SALESORDER_READ,TBL_SALESORDERS,new object[] { salesOrderID });
     salesOrder.Merge(ds);
     return salesOrder.SalesOrderTable[0];
 }