Exemple #1
0
        // This is the home Page and will be loaded first
        public HomePage(LoginFunction loginFunction, UserFunction userFunction, Search search, ErrorHandling errorHandling, GameList gameList)
        {
            _loginFunction = loginFunction;
            _userFunction  = userFunction;
            _errorHandling = errorHandling;
            _gameList      = gameList;
            _search        = search;


            InitializeComponent();
        }
    public bool pendingApprovalLeave(string username)
    {
        bool hasPendingLeave      = false;
        var  sql                  = "SELECT COUNT(*) FROM tbl_leaveApplication WHERE submitted_by = @0 AND status = 'Pending Approval' ";
        var  pendingApprovalLeave = db.QueryValue(sql, LoginFunction.getNamebyUsername(username));

        if (pendingApprovalLeave > 0)
        {
            hasPendingLeave = true;
        }
        return(hasPendingLeave);
    }