private void FormAddSubjects_Load(object sender, EventArgs e) { this.LoadDepartment(); this.LoadFaculty(); if (subjects == null) { subjects = new TSubject(); } bsSubjects.DataSource = subjects; }
public void LoadSubject() { string error = string.Empty; this.Subjects = TSubject.LoadData(out error); if (!string.IsNullOrEmpty(error)) { MessageBox.Show("Грешка при зареждане от базата данни"); return; } bsSubjects.DataSource = Subjects; }
public void LoadSubject() { List <TSubject> subjects = new List <TSubject>(); string error = string.Empty; subjects = TSubject.LoadData(out error); if (!string.IsNullOrEmpty(error)) { MessageBox.Show("Грешка при зареждане на специалност"); return; } cBoxSubject.DisplayMember = "SubjectName"; cBoxSubject.ValueMember = "ID"; cBoxSubject.DataSource = subjects; }
public FormAddSubjects(TSubject s) { InitializeComponent(); subjects = s; }