Ejemplo n.º 1
0
        public void LoadDepartment()
        {
            string error = string.Empty;

            this.Departments = TDepartments.LoadData(out error);

            if (!string.IsNullOrEmpty(error))
            {
                MessageBox.Show("Грешка при зареждане от базата данни");
                return;
            }
            bsDepartments.DataSource = Departments;
        }
Ejemplo n.º 2
0
        public void LoadDepartment()
        {
            List <TDepartments> departments = new List <TDepartments>();
            string error = string.Empty;

            departments = TDepartments.LoadData(out error);

            if (!string.IsNullOrEmpty(error))
            {
                MessageBox.Show("Грешка при зареждане на дисциплини");
                return;
            }
            cBoxFormAddSubjectDepartment.DisplayMember = "Name";
            cBoxFormAddSubjectDepartment.ValueMember   = "ID";
            cBoxFormAddSubjectDepartment.DataSource    = departments;
        }
Ejemplo n.º 3
0
        public void LoadDepartment()
        {
            List <TDepartments> departments = new List <TDepartments>();
            string error = string.Empty;

            departments = TDepartments.LoadData(out error);

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

            depart.Name = "всички";
            depart.ID   = -1;

            departments.Insert(0, depart);

            cBoxLecturesDepartments.DisplayMember = "Name";
            cBoxLecturesDepartments.ValueMember   = "ID";
            cBoxLecturesDepartments.DataSource    = departments;
        }