Ejemplo n.º 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();
        }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 3
0
 /*
  * Add a Supplier to the list.
  */
 public void addSupplier(Supplier s)
 {
     _supplierList.Add(s);
 }
Ejemplo n.º 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();
        }