Example #1
0
        public void LoadCourse()
        {
            string error = string.Empty;

            this.Courses = TCourse.LoadData(out error);

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

            bsCourse.DataSource = Courses;
        }
        public void LoadCourse()
        {
            List <TCourse> courses = new List <TCourse>();
            string         error   = string.Empty;

            courses = TCourse.LoadData(out error);

            if (!string.IsNullOrEmpty(error))
            {
                MessageBox.Show("Грешка при зареждане на курс");
                return;
            }
            cBoxElectiveSubjectCourse.DisplayMember = "NameCourse";
            cBoxElectiveSubjectCourse.ValueMember   = "ID";
            cBoxElectiveSubjectCourse.DataSource    = courses;
        }
        public void LoadCourses()
        {
            string         err    = string.Empty;
            List <TCourse> course = new List <TCourse>();

            course = TCourse.LoadData(out err);

            cbCourse.DisplayMember = "NameCourse";
            cbCourse.ValueMember   = "ID";
            cbCourse.DataSource    = course;

            if (student != null && student.CourseID > 0)
            {
                cbCourse.SelectedValue = student.CourseID;
            }
        }
        public void LoadCourse()
        {
            List <TCourse> courses = new List <TCourse>();
            string         error   = string.Empty;

            courses = TCourse.LoadData(out error);

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

            TCourse course = new TCourse();

            course.NameCourse = "Всички";
            course.ID         = -1;

            courses.Insert(0, course);
            cBoxEvaluationCourse.DisplayMember = "NameCourse";
            cBoxEvaluationCourse.ValueMember   = "ID";
            cBoxEvaluationCourse.DataSource    = courses;
        }