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; }
public FrmAttendance(int courseId, string courseName) { if (LoggedInUser.UserId == 0) { FrmLogin login = new FrmLogin(); login.Show(); } InitializeComponent(); MaterialSkinBase.InitializeForm(this); lblTodaysDate.Text = DateTime.Now.ToLongDateString(); lblCourse.Text = courseName; lblUsername.Text = LoggedInUser.Fullname; _semesterRepo = new SessionSemesterRepo(); _attendanceRepo = new AttendanceRepo(); _studentRepo = new StudentRepo(); _bioRepo = new BiometricsRepo(); this.courseId = courseId; }