Esempio n. 1
0
        public ExamsVedCard(ExamsVedList owner, Guid?vedId)
        {
            InitializeComponent();

            _Id        = vedId;
            this.owner = owner;
            bdc        = MainClass.Bdc;

            using (PriemEntities context = new PriemEntities())
            {
                extExamsVed ved = (from vd in context.extExamsVed
                                   where vd.Id == _Id
                                   select vd).FirstOrDefault();

                this.facultyId    = ved.FacultyId;
                this.passDate     = ved.Date;
                this.isAdditional = ved.IsAdditional;
                this.examId       = ved.ExamId;
                this.studyBasisId = ved.StudyBasisId;
                this.isAddVed     = false;
                this.addCount     = 0;

                this.studyLevelGroupId = ved.StudyLevelGroupId;
            }

            InitControls();
        }
Esempio n. 2
0
        public SelectExamCrypto(ExamsVedList owner, int?_studyLevelGroupId, int?facId, int?basisId)
        {
            InitializeComponent();
            this.owner        = owner;
            this.facultyId    = facId;
            this.studyBasisId = basisId;
            this.isAdditional = false;

            studyLevelGroupId = _studyLevelGroupId;

            InitControls();
        }
Esempio n. 3
0
        public SelectExamCrypto(ExamsVedList owner, int?_studyLevelGroupId, int?facId, int?basisId, DateTime passDate, int?examId)
        {
            InitializeComponent();
            this.owner        = owner;
            this.facultyId    = facId;
            this.studyBasisId = basisId;
            this.isAdditional = true;
            studyLevelGroupId = _studyLevelGroupId;

            InitControls();
            cbExam.Enabled     = false;
            dtDateExam.Enabled = false;

            dtDateExam.Value = passDate;
            this.ExamId      = examId;
        }
Esempio n. 4
0
        public ExamsVedCard(ExamsVedList owner, int?StudyLevelGroupId, int?facId, int?examId, DateTime date, int?basisId, bool isAdd)
        {
            InitializeComponent();

            _Id        = null;
            this.owner = owner;
            bdc        = MainClass.Bdc;

            this.facultyId         = facId;
            this.passDate          = date;
            this.examId            = examId;
            this.studyBasisId      = basisId;
            this.isAddVed          = isAdd;
            this.studyLevelGroupId = StudyLevelGroupId;

            using (PriemEntities context = new PriemEntities())
            {
                if (isAddVed)
                {
                    addCount = (from vd in context.extExamsVed
                                where vd.ExamId == examId && vd.Date == passDate.Date &&
                                vd.FacultyId == facultyId && vd.StudyLevelGroupId == studyLevelGroupId &&
                                (studyBasisId != null ? vd.StudyBasisId == studyBasisId : true == true)
                                select vd.AddCount).Max();

                    if (addCount == null)
                    {
                        addCount = 0;
                    }

                    addCount++;
                }
                else
                {
                    addCount = 0;
                }

                isAdditional = (from vd in context.extExamsVed
                                where vd.ExamId == examId
                                select vd.IsAdditional).FirstOrDefault();
            }

            InitControls();
        }