コード例 #1
0
        private void BindEmployeeComboBox()
        {
            Employee objEmployee = new Employee();

            comboBoxEPHEmplyeeID.DisplayMember = "EmployeeName";
            comboBoxEPHEmplyeeID.ValueMember   = "EmployeeID";
            comboBoxEPHEmplyeeID.DataSource    = objEmployee.SelEmployee().ToList();

            comboBoxENName.DisplayMember = "EmployeeName";
            comboBoxENName.ValueMember   = "EmployeeID";
            comboBoxENName.DataSource    = objEmployee.SelEmployee().ToList();
        }
コード例 #2
0
        private void RefreshAll()
        {
            EmployeeProjectHour objHours = new EmployeeProjectHour();

            dataGridViewEmployeeHours.DataSource = objHours.SelEmployeeProjectHours().ToList();

            Employee objEmployeeName = new Employee();

            dataGridViewEmployeeName.DataSource = objEmployeeName.SelEmployee().ToList();

            Project objProjectName = new Project();

            dataGridViewProjectID.DataSource = objProjectName.SelProjects().ToList();

            BindEmployeeComboBox();
            BindProjectComboBox();
            BindHoursComboBox();
        }