Exemple #1
0
 private void bnBalance_Click(object sender, EventArgs e)
 {
     ListDialog listDialog = new ListDialog();
     listDialog.AddDisplayItems(syst.listTransactions());
     listDialog.ShowDialog();
 }
Exemple #2
0
 private void bnListOutstandingOrders_Click(object sender, EventArgs e)
 {
     ListDialog listDialog = new ListDialog();
     listDialog.AddDisplayItems(syst.listOrders());
     listDialog.ShowDialog();
 }
Exemple #3
0
        private void bnTotal_Click(object sender, EventArgs e)
        {
            if (currentTransaction == null) MessageBox.Show("No current Transaction");
            else
            {
                currentTransaction.executeTransaction();

                List<string> sl = currentTransaction.displayItems();
                if (sl != null)
                {
                    ListDialog listDialog = new ListDialog();
                    listDialog.AddDisplayItems(sl.ToArray());
                    listDialog.ShowDialog();

                    syst.addTransaction(currentTransaction);
                }
                currentTransaction = null;
            }

            tbName.Text = "";
            tbPrice.Text = "";
        }
Exemple #4
0
 private void bnListAllSuppliers_Click(object sender, EventArgs e)
 {
     ListDialog listDialog = new ListDialog();
     listDialog.AddDisplayItems(syst.listSuppliers());
     listDialog.ShowDialog();
 }
Exemple #5
0
 private void bnListStockBelowTH_Click(object sender, EventArgs e)
 {
     ListDialog listDialog = new ListDialog();
     listDialog.AddDisplayItems(syst.listScarceStock());
     listDialog.ShowDialog();
 }
 private void bnListAllStock_Click(object sender, EventArgs e)
 {
     ListDialog listDialog = new ListDialog();
     Stock[] temp = new Stock[control.Stock.Count];
     temp = control.Stock.ToArray();
     for (int i = 0; i < temp.Length; i++)
     {
         listDialog.AddDisplayItems(temp[i].ToString());
     }
     listDialog.ShowDialog();
 }
        private void bnListStockBelowTH_Click(object sender, EventArgs e)
        {
            ListDialog listDialog = new ListDialog();
            while (control.ScarceCheck() != null)
            {
                listDialog.AddDisplayItems(control.ScarceCheck().ToString());

            }
            listDialog.ShowDialog();
        }
 private void bnListOutstandingOrders_Click(object sender, EventArgs e)
 {
     // the following lines are to instruct you how to use ListDialog.
     // You should replace the following code with yours
     ListDialog listDialog = new ListDialog();
     listDialog.AddDisplayItems("This is a test", "You can write any number of arguments,",
         "to pass to AddDisplayItems");
     object[] displayObjects= {
                                  "You can also pass object[],",
                                  "which contains any number of objects"
                              };
     listDialog.AddDisplayItems(displayObjects);
     listDialog.AddDisplayItems("You can call AddDisplayItems as many times as you want");
     listDialog.AddDisplayItems("Each invocation adds lines to be displayed");
     listDialog.AddDisplayItems("By the way, did you know that ToString() of string returns its string component");
     listDialog.ShowDialog();
 }