Ejemplo n.º 1
0
        public UserInfo Login(string username, string password, UserType userType)
        {
            UserInfo userinfo;

            if (userType == UserType.Supplier)
            {
                userinfo = _supplierService.Login(username, password);
            }
            else
            {
                userinfo = _userService.Login(username, password);
            }

            var session = SessionService.SessionInfo;

            session.Id       = userinfo.Id;
            session.UserName = userinfo.UserName;
            session.UserType = userType;
            session.Module   = GetModule(userinfo.Id);

            SessionService.Save();
            return(userinfo);
        }
Ejemplo n.º 2
0
 public void SignOut()
 {
     SessionService.Clear();
 }