Ejemplo n.º 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);
        }
 private void FormАddSpecialities_Load(object sender, EventArgs e)
 {
     this.LoadFaculty();
     if (speciality == null)
     {
         speciality = new TSpeciality();
     }
     bsSpeciality.DataSource = speciality;
 }
Ejemplo n.º 3
0
 private void CBoxEvaluationSpeciality_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (cBoxEvaluationSpeciality.SelectedItem != null)
     {
         TSpeciality c = cBoxEvaluationSpeciality.SelectedItem as TSpeciality;
         if (c == null)
         {
             return;
         }
         this.specID = c.ID;
         Filter();
     }
 }
Ejemplo n.º 4
0
 private void cBoxFormElectiveSubjectsSpeciality_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (cBoxFormElectiveSubjectsSpeciality.SelectedItem != null)
     {
         TSpeciality s = cBoxFormElectiveSubjectsSpeciality.SelectedItem as TSpeciality;
         if (s == null)
         {
             return;
         }
         this.specID = s.ID;
         Filter();
     }
 }
Ejemplo n.º 5
0
 private void CBoxStudentsSpeciality_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (cBoxStudentsSpeciality.SelectedItem != null)
     {
         TSpeciality s = cBoxStudentsSpeciality.SelectedItem as TSpeciality;
         if (s == null)
         {
             return;
         }
         this.specName = s;
         Filter();
     }
 }
        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;
            }
        }
Ejemplo n.º 8
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;
        }
Ejemplo n.º 9
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;
        }
 public FormАddSpecialities(TSpeciality s)
 {
     InitializeComponent();
     speciality = s;
 }