Esempio n. 1
0
 private void pupulateControls()
 {
     cmbUsername.DataSource    = null;
     cmbUsername.ValueMember   = "password";
     cmbUsername.DisplayMember = "username";
     cmbUsername.DataSource    = AppUserDAO.getList();
 }
        private void updateAdminControls()
        {
            List <AppUser>   listU = AppUserDAO.getList();
            List <Business>  listB = BusinessDAO.getList();
            List <Product>   listP = ProductDAO.getList();
            List <FullOrder> listf = OrderDAO.consultOrders();

            comboBox1.DataSource    = null;
            comboBox1.DisplayMember = "username";
            comboBox1.DataSource    = listU;

            comboBox2.DataSource    = null;
            comboBox2.DisplayMember = "username";
            comboBox2.DataSource    = listU;

            comboBox3.DataSource    = null;
            comboBox3.DisplayMember = "name";
            comboBox3.DataSource    = listB;

            comboBox4.DataSource    = null;
            comboBox4.DisplayMember = "name";
            comboBox4.DataSource    = listP;

            comboBox5.DataSource    = null;
            comboBox5.DisplayMember = "name";
            comboBox5.ValueMember   = "idbusiness";
            comboBox5.DataSource    = listB;

            dataGridView1.DataSource = null;
            dataGridView1.DataSource = listU;

            dataGridView2.DataSource = null;
            dataGridView2.DataSource = listB;

            dataGridView3.DataSource = null;
            dataGridView3.DataSource = listP;

            dataGridView4.DataSource = null;
            dataGridView4.DataSource = listf;

            poblarGrafico();
        }