Exemple #1
0
        internal void Login(string username, TethysContext context)
        {
            var user = context.Users.FirstOrDefault(x => x.Login == username);

            if (user == null) return;

            LoggedUser = user;
        }
Exemple #2
0
        protected BaseService(TethysContext context)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }

            this.context = context;
        }
Exemple #3
0
        public bool TryLogin(string login, string password, TethysContext context)
        {
            var user = context.Users.Include("Role").FirstOrDefault(x => x.Login == login);

            if (user == null) return false;

            if (user.Password != password.GetSHA512()) { return false; }

            LoggedUser = user;
            HttpContext.Current.Session.Timeout = 24 * 60;

            return true;
        }
Exemple #4
0
 public LocationService(TethysContext context)
     : base(context)
 {
 }
Exemple #5
0
 public DeviceService(TethysContext context)
     : base(context)
 {
 }
 public DepartmentService(TethysContext context)
     : base(context)
 {
 }
Exemple #7
0
 public CallService(TethysContext context)
     : base(context)
 {
 }
Exemple #8
0
 public UserService(TethysContext context)
     : base(context)
 {
 }
Exemple #9
0
 public RoomService(TethysContext context)
     : base(context)
 {
 }