/// <summary> /// Очистка данных в текстбоксах /// </summary> private void DeleteTextBoxInfo() { SurnameTextBox.Text = ""; NameTextBox.Text = ""; MiddlenameTextBox.Text = ""; CityTextBox.Text = ""; AddressTextBox.Text = ""; TelefonTextBox.Text = ""; EmailTextBox.Text = ""; _manager.LoadDefaultPhoto(PhotoPictureBox); }
/// <summary> /// загрузка данных студента в текстбоксы и комбобоксы /// </summary> /// <param name="student">текущий студент</param> public void ChangeBoxes(Student student) { _student = student; SurnameTextBox.Text = _student.Surname; NameTextBox.Text = _student.Name; MiddlenameTextBox.Text = _student.MiddleName; CityTextBox.Text = _student.City; AddressTextBox.Text = _student.Street; TelefonTextBox.Text = _student.TelefonNumber; EmailTextBox.Text = _student.Email; FacultyComboBox.ValueMember = nameof(Faculty.ID); FacultyComboBox.SelectedValue = _student.FacultyID; SpecialityComboBox.ValueMember = nameof(Speciality.ID); SpecialityComboBox.SelectedValue = _student.SpecialityID; CourceComboBox.ValueMember = nameof(Cource.ID); CourceComboBox.SelectedValue = _student.CourceID; GroupComboBox.ValueMember = nameof(Group.ID); GroupComboBox.SelectedValue = _student.GroupID; if (_student.Photo) { _manager.LoadFoto(_student, PhotoPictureBox); PhotoPictureBox.Name = _student.Guid.ToString(); } else { _manager.LoadDefaultPhoto(PhotoPictureBox); } }
public StudentCard(StudentTable studentTable, List <Student> dataStudent) { _dataStudent = dataStudent; _studentTable = studentTable; InitializeComponent(); _comboBoxManager = new ComboBoxManager(); _manager = new SaveNLoadManager(); _comboBoxManager.LoadInfoToFacultyCombobox(FacultyComboBox); _comboBoxManager.LoadInfoToCourceComboBox(CourceComboBox); _manager.LoadDefaultPhoto(PhotoPictureBox); }
public StudentTable() { InitializeComponent(); new ComboBoxManager().LoadInfoToCourceComboBox(CourceSearchComboBox); _manager = new SaveNLoadManager(); _curriculumInfo = _manager.LoadCurruculumData(); courceList = CreateCourceListForTreeView(); _dataStudent = _manager.LoadStudentData(); _manager.LoadDefaultPhoto(PhotoPictureBox); LoadInfoToTree(); //StudentCardsTreeView.HideSelection = false; }