示例#1
0
文件: Item.cs 项目: Ripper555/SCS
        /*
         * 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();
        }