Пример #1
0
        /*
         * Item constructor
         * Parameters: Bar Code, Item Name, Stock quantity, Order Threshold, Retail Price,
         * Item Key, and Preferred Supplier
         */
        public Item(int bc, string iN, int sq, int ot, double rp, int k, Supplier ps)
        {
            _barCode = bc;
            _itemName = iN;
            _stockQuantity = sq;
            _orderThreshold = ot;
            _retailPrice = rp;
            _key = k;
            _preferredSupplier = ps;

            // Checks for item scarcity
            stockCheck();
        }
Пример #2
0
        public void LoadSuppliers_Handler(string fileName)
        {
            StreamReader readFile = new StreamReader(fileName);
            string[] SupplierInfo;

            while (!readFile.EndOfStream)
            {
                string readLine = readFile.ReadLine();
                SupplierInfo = readLine.Split('&');
                Supplier newSupplier = new Supplier(SupplierInfo);
                SupplierList.Add(newSupplier);
            }
        }
Пример #3
0
 /*
  * Add a Supplier to the list.
  */
 public void addSupplier(Supplier s)
 {
     _supplierList.Add(s);
 }
Пример #4
0
        private void bnListAllSuppliers_Click(object sender, EventArgs e)
        {
            ListDialog listDialog = new ListDialog();
            Supplier[] temp = new Supplier[control.Suppliers.Count];
            temp = control.Suppliers.ToArray();
            for (int i = 0; i < temp.Length; i++)
            {
                listDialog.AddDisplayItems(temp[i].ToString());
            }

            listDialog.ShowDialog();
        }