private void F500_SkillManage_Load(object sender, EventArgs e) { // tabManage data. // Assign data to lists. SkillList = PSkill.SkillList(); UserSkills = PSkill.GetUserSkill(UserID); // Assign boxes datasource. comboBoxSkill.DataSource = SkillList; comboBoxSkill.DisplayMember = "SkillName"; comboBoxSkill.ValueMember = "SkillListID"; listBoxSkill.DataSource = UserSkills; listBoxSkill.DisplayMember = "SkillName"; listBoxSkill.ValueMember = "SkillListID"; // // tabEdit data. AutoCompleteSource = new AutoCompleteStringCollection(); // Strings for skillname,type suggestions. foreach (SkillData skill in SkillList) { UtilFormFunctions.AddUnique(comboSkillType, skill.SkillType); UtilFormFunctions.AddUnique(AutoCompleteSource, skill.SkillName); } // Assign data to AutoComplete. txtSkillName.AutoCompleteCustomSource = AutoCompleteSource; // Assign boxes datasource. listBoxSkillEdit.DataSource = SkillList; listBoxSkillEdit.DisplayMember = "SkillName"; listBoxSkillEdit.ValueMember = "SkillListID"; }
private void F300_Employee_Load(object sender, EventArgs e) { AutoCompleteSource = new AutoCompleteStringCollection(); // Strings for Project Name suggestions. foreach (EmployeeData employee in employeeList) { UtilFormFunctions.AddUnique(AutoCompleteSource, employee.EmployeeName); } // Set Autocomplete source. txtName.AutoCompleteCustomSource = AutoCompleteSource; }
private void F200_Project_Load(object sender, EventArgs e) { AutoCompleteSource = new AutoCompleteStringCollection(); // Strings for Project Name suggestions. foreach (ProjectsData project in projectList) { UtilFormFunctions.AddUnique(AutoCompleteSource, project.ProjectName); } // Set Autocomplete source. txtProjectName.AutoCompleteCustomSource = AutoCompleteSource; }
// Refresh Form. public void RefreshForm() { comboSkillType.Items.Clear(); AutoCompleteSource.Clear(); // Re-get data. UserSkills = PSkill.GetUserSkill(UserID); SkillList = PSkill.SkillList(); foreach (SkillData skill in SkillList) { UtilFormFunctions.AddUnique(comboSkillType, skill.SkillType); UtilFormFunctions.AddUnique(AutoCompleteSource, skill.SkillName); } // Assign data. txtSkillName.AutoCompleteCustomSource = AutoCompleteSource; listBoxSkill.DataSource = UserSkills; listBoxSkillEdit.DataSource = SkillList; }