Beispiel #1
0
        public FrmEnrollFinger(string id, bool isStudent = true)
        {
            InitializeComponent();
            _bioRepo   = new BiometricsRepo();
            _id        = id;
            _isStudent = isStudent;
            var settingsRepo = new SettingsRepo();

            if (isStudent)
            {
                _studentRepo = new StudentRepo();
            }
            else
            {
                _staffRepo                 = new StaffRepo();
                labelNo.Text               = "Staff Number";
                labelRequired.Visible      = false;
                lblFingersRequired.Visible = false;
            }

            _requiredFingers = settingsRepo.GetSetting().NoOfFinger;

            btnStartCapture.Enabled = false;
            btnStopCapture.Enabled  = false;
            btnSave.Enabled         = false;
            btnClear.Enabled        = false;
        }
        private void GetSetting()
        {
            var item = _settingsRepo.GetSetting();

            if (item == null)
            {
                Base.ShowError("Not Found", "Not Found");
                this.Close();
            }
            else
            {
                _id = item.Id;
                txtAdminEmail.Text     = item.SuperAdminEmail;
                txtAdminLastname.Text  = item.SuperAdminLastname;
                txtAdminFirstname.Text = item.SuperAdminFirstname;
                txtNoOfFinger.Text     = item.NoOfFinger.ToString();
            }
        }