private void FormAddFormOfEducations_Load(object sender, EventArgs e) { if (formOfEducation == null) { formOfEducation = new TFormOfEducation(); } bsFormOfEducation.DataSource = formOfEducation; }
public void LoadFormOfEducation() { string error = string.Empty; this.FormOfEducations = TFormOfEducation.LoadData(out error); if (!string.IsNullOrEmpty(error)) { MessageBox.Show("Грешка при зареждане от базата данни"); return; } bsFormOfEducation.DataSource = FormOfEducations; }
public void LoadFormOfEdu() { string err = string.Empty; List <TFormOfEducation> el = new List <TFormOfEducation>(); el = TFormOfEducation.LoadData(out err); cbFormOfEdu.DisplayMember = "Name"; cbFormOfEdu.ValueMember = "ID"; cbFormOfEdu.DataSource = el; if (student != null && student.FormOfEducationID > 0) { cbFormOfEdu.SelectedValue = student.FormOfEducationID; } }
public FormAddFormOfEducations(TFormOfEducation f) { InitializeComponent(); formOfEducation = f; }