Beispiel #1
0
        public void LoadSpeciality()
        {
            List <TSpeciality> specialities = new List <TSpeciality>();
            string             error        = string.Empty;

            specialities = TSpeciality.LoadData(out error);

            if (!string.IsNullOrEmpty(error))
            {
                MessageBox.Show("Грешка при зареждане на специалности");
                return;
            }
            TSpeciality s = new TSpeciality();

            s.NameSpeciality = "всички";
            s.ID             = -1;

            specialities.Insert(0, s);

            cBoxStudentsSpeciality.DisplayMember = "NameSpeciality";
            cBoxStudentsSpeciality.ValueMember   = "ID";
            //Изключване на събитие
            cBoxStudentsSpeciality.SelectedIndexChanged -= new EventHandler(CBoxStudentsSpeciality_SelectedIndexChanged);
            cBoxStudentsSpeciality.DataSource            = specialities;
            //Включване на събитие
            cBoxStudentsSpeciality.SelectedIndexChanged += new EventHandler(CBoxStudentsSpeciality_SelectedIndexChanged);
        }
        public void LoadSpeciality()
        {
            string error = string.Empty;

            this.Specialities = TSpeciality.LoadData(out error);

            if (!string.IsNullOrEmpty(error))
            {
                MessageBox.Show("Грешка при зареждане от базата данни");
                return;
            }
            bsSpecialities.DataSource = Specialities;
        }
        public void LoadSpeciality()
        {
            string             err  = string.Empty;
            List <TSpeciality> spec = new List <TSpeciality>();

            spec = TSpeciality.LoadData(out err);

            cbSpeciality.DisplayMember = "NameSpeciality";
            cbSpeciality.ValueMember   = "ID";
            cbSpeciality.DataSource    = spec;

            if (student != null && student.SpecialityID > 0)
            {
                cbSpeciality.SelectedValue = student.SpecialityID;
            }
        }
Beispiel #4
0
        public void LoadSpeciality()
        {
            List <TSpeciality> specialities = new List <TSpeciality>();
            string             error        = string.Empty;

            specialities = TSpeciality.LoadData(out error);

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

            cBoxSpeciality.DisplayMember = "NameSpeciality";
            cBoxSpeciality.ValueMember   = "ID";
            cBoxSpeciality.DataSource    = specialities;
        }
Beispiel #5
0
        public void LoadSpeciality()
        {
            List <TSpeciality> specialities = new List <TSpeciality>();
            string             error        = string.Empty;

            specialities = TSpeciality.LoadData(out error);

            if (!string.IsNullOrEmpty(error))
            {
                MessageBox.Show("Грешка при зареждане на специалност");
                return;
            }
            TSpeciality speciality = new TSpeciality();

            speciality.NameSpeciality = "Всички";
            speciality.ID             = -1;

            specialities.Insert(0, speciality);
            cBoxFormElectiveSubjectsSpeciality.DisplayMember = "NameSpeciality";
            cBoxFormElectiveSubjectsSpeciality.ValueMember   = "ID";
            cBoxFormElectiveSubjectsSpeciality.DataSource    = specialities;
        }