Пример #1
0
        public Container()
        {
            InitializeComponent();
            MaterialSkinBase.InitializeForm(this);
            if (LoggedInUser.UserId == 0)
            {
                FrmLogin loginForm = new FrmLogin();
                loginForm.Show();
            }

            //FrmAttendance markAttendance = new FrmAttendance(1, "New course");
            //markAttendance.Show();
        }
Пример #2
0
 public Container()
 {
     if (LoggedInUser.UserId == 0)
     {
         FrmLogin loginForm = new FrmLogin();
         loginForm.Show();
     }
     else
     {
         InitializeComponent();
         MaterialSkinBase.InitializeForm(this); // Initialize MaterialWinformsManager
         foreach (MaterialFlatButton button in this.MenuControls())
         {
             button.Capitalized = false;
         }
         lblFullname.Text = LoggedInUser.Fullname;
         lblAdmin.Text    = LoggedInUser.IsAdmin ? "Admin" : "";
     }
 }
        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;
        }
Пример #4
0
 public FrmLogin()
 {
     InitializeComponent();
     MaterialSkinBase.InitializeForm(this);
     _authRepo = new AuthRepo();
 }