コード例 #1
0
ファイル: ReportsController.cs プロジェクト: sdroy/sdroygit
 public ActionResult GetDocumentsDownloadedReportBySpecificUser(string userName)
 {
     if (!String.IsNullOrEmpty(userName))
     {
         DocumentsOperations documentsOperations = new DocumentsOperations();
         List<FilesDownloadAuditTrail> filesDownloadAuditTrails = documentsOperations.GetFilesDownloadedAuditTrailsBySpecificUser(userName);
         List<FilesDownloadAuditTrailViewModel> filesDownloadAuditTrailViewModeldata = new List<FilesDownloadAuditTrailViewModel>();
         foreach (FilesDownloadAuditTrail item in filesDownloadAuditTrails)
         {
             FilesDownloadAuditTrailViewModel filesDownloadAuditTrailViewModel = new FilesDownloadAuditTrailViewModel();
             filesDownloadAuditTrailViewModel.FileID = item.FileID;
             filesDownloadAuditTrailViewModel.NiceNameOrAreaName = item.File.NiceNameOrAreaName;
             filesDownloadAuditTrailViewModel.DateTimeDownloaded = item.DateTimeDownloaded;
             filesDownloadAuditTrailViewModeldata.Add(filesDownloadAuditTrailViewModel);
         }
         return View(new GridModel<FilesDownloadAuditTrailViewModel>
         {
             Total = filesDownloadAuditTrailViewModeldata.Count,
             Data = filesDownloadAuditTrailViewModeldata
         });
     }
     else
     {
         List<FilesDownloadAuditTrailViewModel> filesDownloadAuditTrails = new List<FilesDownloadAuditTrailViewModel>();
         return View(new GridModel<FilesDownloadAuditTrailViewModel>
         {
             Total = filesDownloadAuditTrails.Count,
             Data = filesDownloadAuditTrails
         });
     }
 }
コード例 #2
0
ファイル: ReportsController.cs プロジェクト: sdroy/sdroygit
 public ActionResult GetTotalDocumentsDownloadedReport(string isLoad)
 {
     if (isLoad == "True")
     {
         DocumentsOperations documentsOperations = new DocumentsOperations();
         List<FilesDownloadAuditTrail> filesDownloadAuditTrails = documentsOperations.GetTotalFilesDownloadedAuditTrails();
         List<FilesDownloadAuditTrailViewModel> filesDownloadAuditTrailViewModeldata = new List<FilesDownloadAuditTrailViewModel>();
         foreach (FilesDownloadAuditTrail item in filesDownloadAuditTrails)
         {
             FilesDownloadAuditTrailViewModel filesDownloadAuditTrailViewModel = new FilesDownloadAuditTrailViewModel();
             filesDownloadAuditTrailViewModel.FileID = item.FileID;
             filesDownloadAuditTrailViewModel.NiceNameOrAreaName = item.File.NiceNameOrAreaName;
             filesDownloadAuditTrailViewModel.DateTimeDownloaded = item.DateTimeDownloaded;
             filesDownloadAuditTrailViewModeldata.Add(filesDownloadAuditTrailViewModel);
         }
         return View(new GridModel<FilesDownloadAuditTrailViewModel>
        {
            Total = filesDownloadAuditTrailViewModeldata.Count,
            Data = filesDownloadAuditTrailViewModeldata
        });
     }
     else
     {
         List<FilesDownloadAuditTrailViewModel> filesDownloadAuditTrails = new List<FilesDownloadAuditTrailViewModel>();
         return View(new GridModel<FilesDownloadAuditTrailViewModel>
         {
             Total = filesDownloadAuditTrails.Count,
             Data = filesDownloadAuditTrails
         });
     }
 }