private bool SettingsAreOK()
        {
            PassingRateBLL passingRateBLL = new PassingRateBLL();
            int            passingRate    = passingRateBLL.GetCurrentPassingRate();

            if (passingRate == 0)
            {
                //Console.WriteLine("PASSING RATE NOT SET");
                return(false);
            }

            ExamineeFailureBLL examineeFailureBLL = new ExamineeFailureBLL();
            int currentWaitDays = examineeFailureBLL.GetCurrentWaitDays();

            if (currentWaitDays == 0)
            {
                //Console.WriteLine("WAIT DAYS NOT SET");
                return(false);
            }

            ExamBLL examBLL      = new ExamBLL();
            bool    isIncomplete = false;

            isIncomplete = examBLL.HasIncompleteExam();

            if (isIncomplete)
            {
                //Console.WriteLine("INCOMPLETE ACTIVE EXAM");
                return(false);
            }

            return(true);
        }
示例#2
0
        public UCtrlSettings()
        {
            InitializeComponent();


            _passingRateBLL     = new PassingRateBLL();
            _currentPassingRate = _passingRateBLL.GetCurrentPassingRate();

            _examineeFailureBLL = new ExamineeFailureBLL();
            _currentWaitDays    = _examineeFailureBLL.GetCurrentWaitDays();

            _examBLL           = new ExamBLL();
            _examViewModelList = _examBLL.GetExamViewModelList(true);

            dgvPassingRate.AutoGenerateColumns     = false;
            dgvExamineeFailure.AutoGenerateColumns = false;
            dgvExam.AutoGenerateColumns            = false;

            SetPassingRateDefaultSettings();
            SetWaitDaysDefaultSettings();
            SetArchivedExam();
        }
示例#3
0
 private void UCtrlExamCode_Load(object sender, EventArgs e)
 {
     _currentWaitDays          = _examineeFailureBLL.GetCurrentWaitDays();
     lblCurrentDaysToWait.Text = string.Format("Days To Wait If Examinee Failed: {0} days", _currentWaitDays);
 }