static void OnSessionEnd(object sender, EventArgs e)
 {
     DataManager manager = new DataManager();
     manager.Parameters.Clear();
     manager.Parameters.Add("@UserId", (HttpContext.Current.User as AccessControlPrincipal).Identity.UserId);
     manager.ExecuteNonQuery("delete from UsersOnline where UserId = @UserId");
     manager.Commit();
 }
 public BusinessManager(IDataAccessor container)
 {
     _dataManager = (container != null) ? container.DataManager : new DataManager(false);
 }
 /// <summary> This method retrieves a current System Parameters by Application.
 /// Change this method to alter how that record is received.
 /// </summary>
 internal static Dictionary<string, SystemParameter> GetCurrentSystemParameters()
 {
     DataManager manager = new DataManager();
     ConfigurationDataContext db = manager.CreateDataContext<ConfigurationDataContext>();
     return db.SystemParameters.Where(x => x.ApplicationId == _currentApplication.ApplicationId).ToDictionary(x => x.Name);
 }