コード例 #1
0
        /// <summary>
        /// Get total number of successful login, failed login and attempted login from the service layer and save into the list
        /// index 0 = Total number of successful login
        /// index 1 = Total number of failed login
        /// index 2 = Total number of attempted login
        /// </summary>
        /// <returns></returns>
        public IDictionary <string, long> GetFailedSuccessfulLogIn()
        {
            IDictionary <string, long> totalSuccessFailed = new Dictionary <string, long>();

            long numSuccessLogin = _dashboardService.CountTotalSuccessfulLogin();
            long numFailedLogin  = _dashboardService.CountTotalFailedLogin();
            long totalLogin      = numSuccessLogin + numFailedLogin;

            totalSuccessFailed.Add(BusinessRuleConstants.GetFailedSuccessfulLogIn_Total, totalLogin);           // Total
            totalSuccessFailed.Add(BusinessRuleConstants.GetFailedSuccessfulLogIn_Successful, numSuccessLogin); // Successful
            totalSuccessFailed.Add(BusinessRuleConstants.GetFailedSuccessfulLogIn_Failed, numFailedLogin);      // Failed

            return(totalSuccessFailed);
        }