public void Init()
        {
            AdminData ad = new AdminData();

            metroGrid1.DataSource = ad.GetAdminShowList();
            metroGrid2.DataSource = ad.GetAdminOwnInfo(this.admId);
            metroTextBox1.Clear();
            metroTextBox2.Clear();
            metroTextBox3.Clear();
            metroTextBox4.Clear();
            if (metroComboBox1.Text == "Admin" || metroComboBox1.Text == "")
            {
                metroGrid1.DataSource = ad.GetAdminShowList();
            }
            if (metroComboBox1.Text == "Manager")
            {
                ManagerData md = new ManagerData();
                metroGrid1.DataSource = md.GetManagerShowList();
            }
            if (metroComboBox1.Text == "Employee")
            {
                EmployeeData ed = new EmployeeData();
                metroGrid1.DataSource = ed.GetEmployeeShowList();
            }
        }
        public void Init2()
        {
            metroTextBox1.Clear();
            EmployeeData ed = new EmployeeData();

            metroGrid1.DataSource = ed.GetEmployeeShowList();
            ManagerData md = new ManagerData();

            metroGrid2.DataSource = md.GetManagerShowList();
            metroGrid4.DataSource = md.GetManagerOwnInfo(this.manId);
            OrderListData od = new OrderListData();

            metroGrid3.DataSource = od.GetOrderShowList();
        }
Ejemplo n.º 3
0
        public void Init()
        {
            if (metroComboBox1.Text == "Manager")
            {
                ManagerData md = new ManagerData();

                data11.DataSource = md.GetManagerShowList();
            }
            if (metroComboBox1.Text == "Employee")
            {
                EmployeeData ed = new EmployeeData();

                data11.DataSource = ed.GetEmployeeShowList();
            }
        }