internal void Login(string username, TethysContext context) { var user = context.Users.FirstOrDefault(x => x.Login == username); if (user == null) return; LoggedUser = user; }
protected BaseService(TethysContext context) { if (context == null) { throw new ArgumentNullException("context"); } this.context = context; }
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; }
public LocationService(TethysContext context) : base(context) { }
public DeviceService(TethysContext context) : base(context) { }
public DepartmentService(TethysContext context) : base(context) { }
public CallService(TethysContext context) : base(context) { }
public UserService(TethysContext context) : base(context) { }
public RoomService(TethysContext context) : base(context) { }