Beispiel #1
0
        public string ValidateUser(string UserName, string Password)
        {
            LoggedOnUser LOU = (Session["LoggedOnUserDetails"] == null ? UserTools.getLoggedOnUserDetails(UserName, Password) : (LoggedOnUser)Session["LoggedOnUserDetails"]);

            if (UserTools.authenticateUserOnDefault(LOU) == true)
            {
                Session["USER_ID"]   = LOU.UserID;
                Session["USER_NAME"] = LOU.FullName;
                Session["EMAIL"]     = LOU.EmailID;
                Session["RoleID"]    = LOU.RoleID;
                Session["AccountID"] = LOU.AccountID;

                string UrlPath = string.Empty;
                //Organization Login
                if (LOU.AccountID == 1)
                {
                    UrlPath = "/Organisation/Entity";
                }
                //Entity Login
                else if (LOU.AccountID == 2)
                {
                    UrlPath = "/SessionMgmt/ViewSessions";
                }
                //Center Login
                else if (LOU.AccountID == 3)
                {
                    UrlPath = "/CenterMgmt/ViewSessions";
                }
                return(UrlPath);
            }
            else
            {
                return("false");
            }
        }