コード例 #1
0
 private void FormAddFormOfEducations_Load(object sender, EventArgs e)
 {
     if (formOfEducation == null)
     {
         formOfEducation = new TFormOfEducation();
     }
     bsFormOfEducation.DataSource = formOfEducation;
 }
コード例 #2
0
        public void LoadFormOfEducation()
        {
            string error = string.Empty;

            this.FormOfEducations = TFormOfEducation.LoadData(out error);

            if (!string.IsNullOrEmpty(error))
            {
                MessageBox.Show("Грешка при зареждане от базата данни");
                return;
            }

            bsFormOfEducation.DataSource = FormOfEducations;
        }
コード例 #3
0
        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;
            }
        }
コード例 #4
0
 public FormAddFormOfEducations(TFormOfEducation f)
 {
     InitializeComponent();
     formOfEducation = f;
 }