Beispiel #1
0
        void PopulateArray(clsDataConnection DB)
        {
            Int32 Index = 0;
            Int32 RecordCount;

            RecordCount = DB.Count;
            mOrderList  = new List <clsOrder>();
            while (Index < RecordCount)
            {
                clsOrder AnOrder = new clsOrder();
                AnOrder.OrderNo          = Convert.ToInt32(DB.DataTable.Rows[Index]["OrderNo"]);
                AnOrder.Address          = Convert.ToString(DB.DataTable.Rows[Index]["Address"]);
                AnOrder.DeliveryDate     = Convert.ToDateTime(DB.DataTable.Rows[Index]["DeliveryDate"]);
                AnOrder.DatePurchased    = Convert.ToDateTime(DB.DataTable.Rows[Index]["DatePurchased"]);
                AnOrder.ClothesAvailable = Convert.ToBoolean(DB.DataTable.Rows[Index]["ClothesAvailable"]);
                mOrderList.Add(AnOrder);
                Index++;
            }
        }
Beispiel #2
0
        void PopulateArray(clsDataConnection DB)
        {
            Int32 Index = 0;
            Int32 RecordCount;

            RecordCount = DB.Count;
            mOrderList  = new List <clsOrder>();
            while (Index < RecordCount)
            {
                clsOrder AnOrder = new clsOrder();
                AnOrder.OrderNo    = Convert.ToInt32(DB.DataTable.Rows[Index]["OrderNo"]);
                AnOrder.BookName   = Convert.ToString(DB.DataTable.Rows[Index]["BookName"]);
                AnOrder.Quantity   = Convert.ToInt32(DB.DataTable.Rows[Index]["Quantity"]);
                AnOrder.OrderDate  = Convert.ToDateTime(DB.DataTable.Rows[Index]["OrderDate"]);
                AnOrder.Dispatched = Convert.ToBoolean(DB.DataTable.Rows[Index]["Dispatched"]);
                mOrderList.Add(AnOrder);
                Index++;
            }
        }
        void PopulateArray(clsDataConnection DB)
        {
            Int32 Index = 0;
            Int32 RecordCount;

            RecordCount = DB.Count;
            mOrderList  = new List <clsOrder>();
            while (Index < RecordCount)
            {
                clsOrder anOrder = new clsOrder();
                anOrder.Payed       = Convert.ToBoolean(DB.DataTable.Rows[Index]["isPayed"]);
                anOrder.OrderNumber = Convert.ToInt32(DB.DataTable.Rows[Index]["OrderNumber"]);
                anOrder.ItemCount   = Convert.ToInt32(DB.DataTable.Rows[Index]["ItemCount"]);
                anOrder.OrderPrice  = Convert.ToDouble(DB.DataTable.Rows[Index]["OrderPrice"]);
                anOrder.Address     = Convert.ToString(DB.DataTable.Rows[Index]["Address"]);
                anOrder.Date        = Convert.ToDateTime(DB.DataTable.Rows[Index]["Date"]);

                mOrderList.Add(anOrder);
                Index++;
            }
        }
Beispiel #4
0
        void PopulateArray(clsDataConnection DB)
        {
            Int32 Index       = 0;
            Int32 RecordCount = 0;

            RecordCount = DB.Count;
            mOrderList  = new List <clsOrder>();
            while (Index < RecordCount)
            {
                clsOrder AOrder = new clsOrder();
                AOrder.OrderNo          = Convert.ToInt32(DB.DataTable.Rows[Index]["OrderNo"]);
                AOrder.StaffId          = Convert.ToInt32(DB.DataTable.Rows[Index]["StaffId"]);
                AOrder.DeliveryAddress  = Convert.ToString(DB.DataTable.Rows[Index]["DeliveryAddress"]);
                AOrder.ItemColour       = Convert.ToString(DB.DataTable.Rows[Index]["ItemColour"]);
                AOrder.ItemPrice        = Convert.ToDecimal(DB.DataTable.Rows[Index]["ItemPrice"]);
                AOrder.OrderPlaced      = Convert.ToDateTime(DB.DataTable.Rows[Index]["OrderPlaced"]);
                AOrder.ItemAvailability = true;
                mOrderList.Add(AOrder);
                Index++;
            }
        }
Beispiel #5
0
        void PopulateArray(clsDataConnection DB)
        {
            Int32 Index = 0;
            Int32 RecordCount;

            RecordCount = DB.Count;
            mOrderList  = new List <clsOrder>();
            while (Index < RecordCount)
            {
                clsOrder AnOrder = new clsOrder();
                AnOrder.Delivered    = Convert.ToBoolean(DB.DataTable.Rows[Index]["Delivered"]);
                AnOrder.OrderId      = Convert.ToInt32(DB.DataTable.Rows[Index]["OrderId"]);
                AnOrder.CustomerId   = Convert.ToInt32(DB.DataTable.Rows[Index]["CustomerId"]);
                AnOrder.OrderPrice   = Convert.ToInt32(DB.DataTable.Rows[Index]["OrderPrice"]);
                AnOrder.Description  = Convert.ToString(DB.DataTable.Rows[Index]["Description"]);
                AnOrder.OrderLineId  = Convert.ToInt32(DB.DataTable.Rows[Index]["OrderLineId"]);
                AnOrder.Quantity     = Convert.ToInt32(DB.DataTable.Rows[Index]["Quantity"]);
                AnOrder.DateReceived = Convert.ToDateTime(DB.DataTable.Rows[Index]["DateReceived"]);
                mOrderList.Add(AnOrder);
                Index++;
            }
        }
Beispiel #6
0
        void PopulateArray(clsDataConnection DB)
        {
            Int32 Index       = 0;
            Int32 RecordCount = 0;

            RecordCount = DB.Count;
            mOrderList  = new List <clsOrder>();
            while (Index < RecordCount)
            {
                clsOrder AOrder = new clsOrder();
                AOrder.OrderID            = Convert.ToInt32(DB.DataTable.Rows[Index]["OrderID"]);
                AOrder.CustomerNo         = Convert.ToInt32(DB.DataTable.Rows[Index]["CustomerNo"]);
                AOrder.CustomerAddress    = Convert.ToString(DB.DataTable.Rows[Index]["CustomerAddress"]);
                AOrder.ItemColour         = Convert.ToString(DB.DataTable.Rows[Index]["ItemColour"]);
                AOrder.ItemPrice          = Convert.ToDecimal(DB.DataTable.Rows[Index]["ItemPrice"]);
                AOrder.OrderDate          = Convert.ToDateTime(DB.DataTable.Rows[Index]["OrderDate"]);
                AOrder.ProductDescription = Convert.ToString(DB.DataTable.Rows[Index]["ProductDescription"]);
                AOrder.Availability       = true;
                mOrderList.Add(AOrder);
                Index++;
            }
        }
        void PopulateArray(clsDataConnection DB)
        {
            Int32 Index = 0;
            Int32 RecordCount;

            RecordCount = DB.Count;
            mOrderList  = new List <clsOrder>();

            while (Index < RecordCount)
            {
                clsOrder AnOrder = new clsOrder();

                AnOrder.orderID      = Convert.ToInt32(DB.DataTable.Rows[Index]["orderID"]);
                AnOrder.GameTitle    = Convert.ToString(DB.DataTable.Rows[Index]["gameTitle"]);
                AnOrder.TotalPrice   = Convert.ToDecimal(DB.DataTable.Rows[Index]["totalPrice"]);
                AnOrder.DeliveryDate = Convert.ToDateTime(DB.DataTable.Rows[Index]["deliveryDate"]);
                AnOrder.Shipment     = Convert.ToBoolean(DB.DataTable.Rows[Index]["shipment"]);

                mOrderList.Add(AnOrder); //add all attributes and give ID +1 to make a new Order
                Index++;
            }
        }
        public clsOrderCollection()
        {
            Int32             Index       = 0;
            Int32             RecordCount = 0;
            clsDataConnection DB          = new clsDataConnection();

            DB.Execute("sproc_tblOrder_SelectAll");
            PopulateArray(DB);
            while (Index < RecordCount)
            {
                clsOrder anOrder = new clsOrder();
                anOrder.Payed       = Convert.ToBoolean(DB.DataTable.Rows[Index]["isPayed"]);
                anOrder.OrderNumber = Convert.ToInt32(DB.DataTable.Rows[Index]["OrderNumber"]);
                anOrder.ItemCount   = Convert.ToInt32(DB.DataTable.Rows[Index]["ItemCount"]);
                anOrder.OrderPrice  = Convert.ToDouble(DB.DataTable.Rows[Index]["OrderPrice"]);
                anOrder.Address     = Convert.ToString(DB.DataTable.Rows[Index]["Address"]);
                anOrder.Date        = Convert.ToDateTime(DB.DataTable.Rows[Index]["Date"]);

                mOrderList.Add(anOrder);
                Index++;
            }
        }
        public clsOrderCollection()
        {
            Int32             Index       = 0;
            Int32             RecordCount = 0;
            clsDataConnection DB          = new clsDataConnection();

            DB.Execute("sproc_tblOrder_SelectAll");
            RecordCount = DB.Count;
            while (Index < RecordCount)
            {
                clsOrder AnOrder = new clsOrder();
                AnOrder.ItemAvailable   = Convert.ToBoolean(DB.DataTable.Rows[Index]["ItemAvailable"]);
                AnOrder.OrderID         = Convert.ToInt32(DB.DataTable.Rows[Index]["OrderID"]);
                AnOrder.TotalItem       = Convert.ToInt32(DB.DataTable.Rows[Index]["TotalItem"]);
                AnOrder.TotalPrice      = Convert.ToDouble(DB.DataTable.Rows[Index]["TotalPrice"]);
                AnOrder.DeliveryAddress = Convert.ToString(DB.DataTable.Rows[Index]["DeliveryAddress"]);
                AnOrder.DateOrdered     = Convert.ToDateTime(DB.DataTable.Rows[Index]["DateOrdered"]);

                mOrderList.Add(AnOrder);
                Index++;
            }
        }
        public void PopulateArray(clsDataConnection DB)
        {
            int Index       = 0;
            int RecordCount = 0;

            RecordCount = DB.Count;
            mOrderList  = new List <clsOrder>();
            while (Index < RecordCount)
            {
                clsOrder AnOrder = new clsOrder();
                AnOrder.OrderNum         = Convert.ToInt32(DB.DataTable.Rows[Index]["OrderNum"]);
                AnOrder.CustomerNum      = Convert.ToInt32(DB.DataTable.Rows[Index]["CustomerNum"]);
                AnOrder.ItemNum          = Convert.ToInt32(DB.DataTable.Rows[Index]["ItemNum"]);
                AnOrder.DateFinalised    = Convert.ToDateTime(DB.DataTable.Rows[Index]["DateFinalised"]);
                AnOrder.StandaloneOrSet  = Convert.ToString(DB.DataTable.Rows[Index]["StandaloneOrSet"]);
                AnOrder.Quantity         = Convert.ToInt32(DB.DataTable.Rows[Index]["Quantity"]);
                AnOrder.TotalPrice       = Convert.ToDouble(DB.DataTable.Rows[Index]["TotalPrice"]);
                AnOrder.ReadyForShipping = Convert.ToBoolean(DB.DataTable.Rows[Index]["ReadyForShipping"]);
                mOrderList.Add(AnOrder);
                Index++;
            }
        }
        void PopulateArray(clsDataConnection DB)
        {
            Int32 Index = 0;
            Int32 RecordCount;

            RecordCount = DB.Count;
            mOrderList  = new List <clsOrder>();

            while (Index < RecordCount)
            {
                //create blank order
                clsOrder AnOrder = new clsOrder();
                //read in fields from the current records in the tbale
                AnOrder.OrderNo     = Convert.ToInt32(DB.DataTable.Rows[Index]["OrderNo"]);
                AnOrder.DateOrdered = Convert.ToDateTime(DB.DataTable.Rows[Index]["DateOrdered"]);
                AnOrder.ProductName = Convert.ToString(DB.DataTable.Rows[Index]["ProductName"]);
                AnOrder.QuantityNo  = Convert.ToInt32(DB.DataTable.Rows[Index]["QuantityNo"]);
                AnOrder.OrderPrice  = Convert.ToDecimal(DB.DataTable.Rows[Index]["OrderPrice"]);
                //add record to private data member
                mOrderList.Add(AnOrder);
                //point at next record
                Index++;
            }
        }
Beispiel #12
0
 public bool Find(clsOrder anOrder)
 {
     return(true);
 }