public void populateData(bool fetchOtherData)
        {
            //base.SetSearchOpts(index.Value);
            //Special case: Set the filter back if it existed so that if the user "re-visits" the page he gets the previous filter (unless reset or logged off)
            searchOpts = _Session.Search[Filters.list.ActivityLog];

            //vw_ActivityLog searchOptions = (vw_ActivityLog)(searchOpts);

            if (_Session.IsOnlyCustomer) //If its customer he can view only his activity
                (searchOpts as vw_ActivityLog).UserID = _SessionUsr.ID; // searchOptions

            if (fetchOtherData){
            ViewData["Activities"] = new ActivityLogService(ActivityLogService.Activity.Login).GetActivities();
            ViewData["UserList"] = new LookupService().GetLookup(LookupService.Source.User);
            }
        }
Beispiel #2
0
 // Indexer declaration.
 // If index is out of range, the array will throw the exception.
 public object this[Enum filterID]
 {
     get
     {
         object filterData = HttpContext.Current.Session[prefix + filterID.ToString()];
         try
         {
             if (filterData == null || filterData == empty)
             {
                 switch (_Enums.ParseEnum<list>(filterID))
                 {
                     case list.Dashboard: filterData = new DashboardService().emptyView; break;
                     case list.ActivityLog: filterData = new ActivityLogService(ActivityLogService.Activity.Login).emptyView; break;
                     case list.User: filterData = new UserService().emptyView; break;
                 }
             }
             return filterData;
         }
         catch { return null; }
     }
     set
     {
         HttpContext.Current.Session[prefix + filterID.ToString()] = value;
     }
 }