Пример #1
0
        public FrmContainer()
        {
            InitializeComponent();
            _sessionRepo = new SessionSemesterRepo();
            _panelWidth  = panelMenu.Width;
            _isCollapsed = false;
            if (LoggedInUser.UserId == "")
            {
                this.Close();
                var loginForm = new FrmLogin(false);
                loginForm.ShowDialog();
            }

            btnOpenConnSettings.Visible = LoggedInUser.IsSuperAdmin;

            lblTitle.Text          = ApplicationSetting.ApplicationName;
            lblTitle.ForeColor     = ApplicationSetting.PrimaryColor;
            panelActive.BackColor  = ApplicationSetting.SecondaryColor;
            panelWelcome.BackColor = ApplicationSetting.SecondaryColor;

            using (MemoryStream ms = new MemoryStream(ApplicationSetting.LogoBytes))
            {
                pictureBox1.Image = Image.FromStream(ms);
            }

            lblFooter.Text = Convert.ToChar(169) + @" Dolapo Oguntuga 2020";
        }
Пример #2
0
        public FrmSession(string sessionId = "")
        {
            InitializeComponent();
            _repo = new SessionSemesterRepo();
            _id   = sessionId;

            if (sessionId != "")
            {
                lblTitle.Text = "Update Session/Semester";
                GetItem(sessionId);
            }
        }
Пример #3
0
 public SessionSemesterForm(SessionSemester data = null)
 {
     InitializeComponent();
     _semesterRepo = new SessionSemesterRepo();
     if (data != null)
     {
         lblId.Text          = data.Id.ToString();
         txtSession.Text     = data.Session;
         txtSemester.Text    = data.Semester;
         chkIsActive.Checked = data.IsActive;
         lblTitle.Text       = "Update Session/Semester";
     }
 }
        public static void LoadSessions(ref ComboBox dropDown, bool includeAll = false, bool noSemesters = false)
        {
            var repo     = new SessionSemesterRepo();
            var allItems = repo.GetAllSessionSemesters();

            var allSessions = new List <SessionSemester>();

            if (noSemesters)
            {
                allSessions = (from x in allItems
                               select new SessionSemester
                {
                    Id = x.Id,
                    Session = x.Session
                }).ToList();

                allSessions.Insert(0, new SessionSemester
                {
                    Session = "Select Session",
                    Id      = Base.IdForSelect
                });
            }

            if (includeAll)
            {
                allItems.Insert(0, new SessionSemester
                {
                    Session = "Select All",
                    Id      = Base.IdForSelectAll
                });
            }
            else
            {
                allItems.Insert(0, new SessionSemester
                {
                    Session = "Select Session/Semester",
                    Id      = Base.IdForSelect
                });
            }

            dropDown.DataSource    = noSemesters ? allSessions : allItems;
            dropDown.DisplayMember = noSemesters ? "Session" : "Fullname";
            dropDown.ValueMember   = "Id";
            dropDown.SelectedIndex = 0;
        }
        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;
        }
Пример #6
0
 public PgSession()
 {
     InitializeComponent();
     _repo = new SessionSemesterRepo();
 }
Пример #7
0
 public SessionSemesterList()
 {
     InitializeComponent();
     _semesterRepo = new SessionSemesterRepo();
 }