Exemplo n.º 1
0
        public string GetAdminAudit()
        {
            List <string> auditText        = new List <string>();
            var           auditInformation = new CommonRal().GetAudit("Admin");

            foreach (var audit in auditInformation)
            {
                string action = audit.ActionType == "I" ? "Enabled" : "Changed to";
                auditText.Add($"{audit.UpdateDate},{GlobalConstants.LogginInUser}: {audit.UserName} {audit.FieldName} {action} {audit.NewValue}");
            }

            return(string.Join("\n", auditText.ToArray()));
        }
Exemplo n.º 2
0
        public bool GetUserDetails(string uName)
        {
            bool loginsuccess = false;
            var  userDetails  = new CommonRal().GetuserDetails <LoggedUserDetails>(uName);

            if (userDetails != null)
            {
                GlobalConstants.LogginInUserId          = userDetails.LoggedUserid;
                GlobalConstants.LogginInUserDisplayName = userDetails.LoggedDisplayUserName;
                GlobalConstants.LogginInUserName        = userDetails.LoggeduserName;
                GlobalConstants.LogginInUserRole        = userDetails.LoggedUserRole;
                GlobalConstants.LogginInUserRoleId      = userDetails.LoggedRoleId;
                GetSettings();
                loginsuccess = true;
            }
            return(loginsuccess);
        }