Exemplo n.º 1
0
 public AddEditInstructorsCategoriesForm(AutoschoolDataSet.InstructorsCategoriesDataTable instructorsCategoriesDataTable,
                                         AutoschoolDataSet.InstructorsDataTable instructorsDataTable,
                                         AutoschoolDataSet.CategoriesDataTable categoriesDataTable, DataRow row)
 {
     InitializeComponent();
     this.instructorsCategoriesDataTable = instructorsCategoriesDataTable;
     this.instructorsDataTable           = instructorsDataTable;
     this.categoriesDataTable            = categoriesDataTable;
     dataRow = row;
 }
Exemplo n.º 2
0
        private void Group_comboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (FormLoad)
            {
                GroupSelected = false;
                if (Group_comboBox.SelectedIndex != -1)
                {
                    int CategoryID = groupsDataTable[Group_comboBox.SelectedIndex].Category;
                    instructorsForThisGroupDataTable = BusinessLogic.ReadInstructorsCategoriesByCategoryID(CategoryID).InstructorsCategories;

                    Instructor_comboBox.DataSource       = instructorsForThisGroupDataTable;
                    Instructor_comboBox.DisplayMember    = "InstructorFIO";
                    Instructor_comboBox.ValueMember      = "Instructor";
                    Instructor_comboBox.AutoCompleteMode = AutoCompleteMode.Append;
                    Instructor_comboBox.SelectedIndex    = -1;
                    Instructor_comboBox.Enabled          = true;
                }
                else
                {
                    Instructor_comboBox.Enabled = false;
                }
                GroupSelected = true;
            }
        }