public FFindCustomerByDate(NodesUser u,typeSearchCustomer search)
        {
            InitializeComponent();
            users = new List<string>();
            switch (search)
            {
                case typeSearchCustomer.TOMOROW:
                    label1.Text = "Customer(s) Leaving Tomorow";
                    users = u.TomorowCustomerLeave();
                    break;
                case typeSearchCustomer.TODAY:
                    label1.Text = "Customer(s) Leaving Today";
                    users = u.TomorowCustomerToday();
                    break;
                case typeSearchCustomer.PAST:
                    label1.Text = "Customer(s) Left";
                    users = u.TomorowCustomerLeft();
                    break;
            }

            foreach(string s in users)
            {
                listBox1.Items.Add(s);
            }
        }
Beispiel #2
0
        private void fillTree()
        {
            try
            {
                nodeCategory = new NodesCategory();
            }
            catch (Exception e) { MessageBox.Show("Error Category " + e.Message); }

            try {
            nodeCustomer = new NodesUser();
            } catch(Exception e1) { MessageBox.Show("Error User " + e1.Message); }
                try
                {
            nodephotographer = new NodesPhotographer();
                }catch(Exception e2) { MessageBox.Show("Error PhotoGrapher " + e2.Message); }
                try
                {
            nodeInfo = new NodesInfo();
                }catch(Exception e3) { MessageBox.Show("Error Info " + e3.Message); }
                try
                {
            nodeConfig = new NodeConfig();
                }
                    catch(Exception e4) { MessageBox.Show("Error Config " + e4.Message); }
                try
                {
            nodePrice = new NodePrice();
                }
                        catch(Exception e5) { MessageBox.Show("Error Config " + e5.Message); }

            treeView1.Nodes.Add(nodeConfig);
            treeView1.Nodes.Add(nodeCategory);
            treeView1.Nodes.Add(nodeCustomer);
            treeView1.Nodes.Add(nodephotographer);
            treeView1.Nodes.Add(nodeInfo);
            treeView1.Nodes.Add(nodePrice);

            for (int n = 0; n < nodePrice.NbProduct(); n++)
            {
                flowLayoutPanelProduct.Controls.Add((Control)new ProductControl(nodePrice.getProduct(n)));
            }
            photoPromotionEntry1.setXmlNode(nodePrice.getPromotion(0));
            photoPromotionEntry2.setXmlNode(nodePrice.getPromotion(1));
            photoPromotionEntry3.setXmlNode(nodePrice.getPromotion(2));
            photoPromotionEntry4.setXmlNode(nodePrice.getPromotion(3));
            photoPromotionEntry5.setXmlNode(nodePrice.getPromotion(4));
            photoPromotionEntry6.setXmlNode(nodePrice.getPromotion(5));
        }