private void FormRequirementsNeeded_Load(object sender, System.EventArgs e) { //comboClass.Items.Add(Lan.g(this,"All")); //comboClass.SelectedIndex=0; _listSchoolClasses = SchoolClasses.GetDeepCopy(); _listSchoolCourses = SchoolCourses.GetDeepCopy(); for (int i = 0; i < _listSchoolClasses.Count; i++) { comboClassFrom.Items.Add(_listSchoolClasses[i].Descript); comboClassTo.Items.Add(_listSchoolClasses[i].Descript); } for (int i = 0; i < _listSchoolCourses.Count; i++) { comboCourseFrom.Items.Add(_listSchoolCourses[i].Descript); comboCourseTo.Items.Add(_listSchoolCourses[i].Descript); } if (comboClassFrom.Items.Count > 0) { comboClassFrom.SelectedIndex = 0; comboClassTo.SelectedIndex = 0; } if (comboCourseFrom.Items.Count > 0) { comboCourseFrom.SelectedIndex = 0; comboCourseTo.SelectedIndex = 0; } ReloadReqList(); FillGrid(); }
private void FormProvStudentEdit_Load(object sender, EventArgs e) { _existingUser = new Userod(); //Load the Combo Box _listSchoolClasses = SchoolClasses.GetDeepCopy(); for (int i = 0; i < _listSchoolClasses.Count; i++) { comboClass.Items.Add(SchoolClasses.GetDescript(_listSchoolClasses[i])); } comboClass.SelectedIndex = 0; //Create a provider object if none has been provided if (ProvStudent == null) { ProvStudent = new Provider(); } //From the add button - Select as much pre-given info as possible if (ProvStudent.IsNew) { labelPassDescription.Visible = false; _autoUserName = Providers.GetNextAvailableProvNum(); textUserName.Text = POut.Long(_autoUserName); //User-names are suggested to be the ProvNum of the provider. This can be changed at will. for (int i = 0; i < _listSchoolClasses.Count - 1; i++) { if (_listSchoolClasses[i].SchoolClassNum != ProvStudent.SchoolClassNum) { continue; } comboClass.SelectedIndex = i; break; } textFirstName.Text = ProvStudent.FName; textLastName.Text = ProvStudent.LName; } //Double-Clicking an existing student else { _isGeneratingAbbr = false; for (int i = 0; i < _listSchoolClasses.Count - 1; i++) { if (_listSchoolClasses[i].SchoolClassNum != ProvStudent.SchoolClassNum) { continue; } comboClass.SelectedIndex = i; break; } textAbbr.Text = ProvStudent.Abbr; textFirstName.Text = ProvStudent.FName; textLastName.Text = ProvStudent.LName; List <Userod> userList = Providers.GetAttachedUsers(ProvStudent.ProvNum); if (userList.Count > 0) { textUserName.Text = userList[0].UserName; //Should always happen if they are a student. _existingUser = userList[0]; } textProvNum.Text = POut.Long(ProvStudent.ProvNum); } }
private void FormDispensary_Load(object sender, EventArgs e) { comboClass.Items.Add(Lan.g(this, "All")); comboClass.SelectedIndex = 0; _listSchoolClasses = SchoolClasses.GetDeepCopy(); for (int i = 0; i < _listSchoolClasses.Count; i++) { comboClass.Items.Add(SchoolClasses.GetDescript(_listSchoolClasses[i])); } FillStudents(); }
private void FormProviderSelect_Load(object sender, System.EventArgs e) { SetFilterControlsAndAction(() => FillGrid(), (int)TimeSpan.FromSeconds(0.5).TotalMilliseconds, textFName, textLName, textProvNum); checkShowAll.Visible = IsShowAllAvailable; if (PrefC.GetBool(PrefName.EasyHideDentalSchools)) { groupDentalSchools.Visible = false; } else if (IsStudentPicker) { this.Text = "Student Picker"; gridMain.Title = "Students"; _schoolClasses = SchoolClasses.GetDeepCopy(); for (int i = 0; i < _schoolClasses.Count; i++) { comboClass.Items.Add(_schoolClasses[i].GradYear + " " + _schoolClasses[i].Descript); } if (comboClass.Items.Count > 0) { comboClass.SelectedIndex = 0; } } else { comboClass.Visible = false; labelClass.Visible = false; } FillGrid(); if (_listProviders != null) { for (int i = 0; i < _listProviders.Count; i++) { if (_listProviders[i].ProvNum == SelectedProvNum) { gridMain.SetSelected(i, true); break; } } } else if (SelectedProvNum != 0) { gridMain.SetSelected(Providers.GetIndex(SelectedProvNum), true); } butSelectNone.Visible = IsNoneAvailable; if (IsNoneAvailable) { //Default value for the selected provider when none is an option is always -1 SelectedProvNum = -1; } }
private void FormProvStudentBulkEdit_Load(object sender, EventArgs e) { SetFilterControlsAndAction(() => FillGrid(), (int)TimeSpan.FromSeconds(0.5).TotalMilliseconds, textProvNum); comboClass.Items.Add(Lan.g(this, "All")); comboClass.SelectedIndex = 0; _listSchoolClasses = SchoolClasses.GetDeepCopy(); for (int i = 0; i < _listSchoolClasses.Count; i++) { comboClass.Items.Add(SchoolClasses.GetDescript(_listSchoolClasses[i])); } FillGrid(); }
private void FormReqAppt_Load(object sender, EventArgs e) { _listSchoolClasses = SchoolClasses.GetDeepCopy(); _listSchoolCourses = SchoolCourses.GetDeepCopy(); for (int i = 0; i < _listSchoolClasses.Count; i++) { comboClass.Items.Add(SchoolClasses.GetDescript(_listSchoolClasses[i])); } if (comboClass.Items.Count > 0) { comboClass.SelectedIndex = 0; } for (int i = 0; i < _listSchoolCourses.Count; i++) { comboCourse.Items.Add(SchoolCourses.GetDescript(_listSchoolCourses[i])); } if (comboCourse.Items.Count > 0) { comboCourse.SelectedIndex = 0; } comboInstructor.Items.Add(Lan.g(this, "None")); comboInstructor.SelectedIndex = 0; _listProviders = Providers.GetDeepCopy(true); for (int i = 0; i < _listProviders.Count; i++) { comboInstructor.Items.Add(_listProviders[i].GetLongDesc()); //if(ProviderC.List[i].ProvNum==ReqCur.InstructorNum) { // comboInstructor.SelectedIndex=i+1; //} } FillStudents(); FillReqs(); reqsAttached = ReqStudents.GetForAppt(AptNum); if (reqsAttached.Count > 0) { comboInstructor.SelectedIndex = Providers.GetIndex(reqsAttached[0].ProvNum) + 1; //this will turn a -1 into a 0. } FillAttached(); }
private void FormReqStudentsMany_Load(object sender, EventArgs e) { _listSchoolClasses = SchoolClasses.GetDeepCopy(); _listSchoolCourses = SchoolCourses.GetDeepCopy(); for (int i = 0; i < _listSchoolClasses.Count; i++) { comboClass.Items.Add(SchoolClasses.GetDescript(_listSchoolClasses[i])); } if (comboClass.Items.Count > 0) { comboClass.SelectedIndex = 0; } for (int i = 0; i < _listSchoolCourses.Count; i++) { comboCourse.Items.Add(SchoolCourses.GetDescript(_listSchoolCourses[i])); } if (comboCourse.Items.Count > 0) { comboCourse.SelectedIndex = 0; } FillGrid(); }
///<summary>Fills the filter comboboxes on the "Users" tab.</summary> private void FillFilters() { foreach (UserFilters filterCur in Enum.GetValues(typeof(UserFilters))) { if (PrefC.GetBool(PrefName.EasyHideDentalSchools) && (filterCur == UserFilters.Students || filterCur == UserFilters.Instructors)) { continue; } comboShowOnly.Items.Add(new ODBoxItem <UserFilters>(Lan.g(this, filterCur.GetDescription()), filterCur)); } comboShowOnly.SelectedIndex = 0; comboSchoolClass.Items.Add(new ODBoxItem <SchoolClass>(Lan.g(this, "All"))); comboSchoolClass.SelectedIndex = 0; foreach (SchoolClass schoolClassCur in SchoolClasses.GetDeepCopy()) { comboSchoolClass.Items.Add(new ODBoxItem <SchoolClass>(SchoolClasses.GetDescript(schoolClassCur), schoolClassCur)); } if (PrefC.HasClinicsEnabled) { comboClinic.Visible = true; labelClinic.Visible = true; comboClinic.Items.Clear(); comboClinic.Items.Add(new ODBoxItem <Clinic>(Lan.g(this, "All Clinics"))); comboClinic.SelectedIndex = 0; foreach (Clinic clinicCur in Clinics.GetDeepCopy(true)) { comboClinic.Items.Add(new ODBoxItem <Clinic>(clinicCur.Abbr, clinicCur)); } } comboGroups.Items.Clear(); comboGroups.Items.Add(new ODBoxItem <UserGroup>(Lan.g(this, "All Groups"))); comboGroups.SelectedIndex = 0; foreach (UserGroup groupCur in UserGroups.GetList(IsForCEMT)) { comboGroups.Items.Add(new ODBoxItem <UserGroup>(groupCur.Description, groupCur)); } }
private void FormSchoolClasses_Load(object sender, System.EventArgs e) { _listSchoolCasses = SchoolClasses.GetDeepCopy(); FillList(); }