/// <summary>
 /// Saves a File Tracking Object into the Database
 /// </summary>
 /// <param name="tracking"></param>
 public void Save(FileTracking tracking)
 {
     if (tracking.ID == 0)
     {
         tracking.Created = DateTime.Now;
         _Data.FileTrackings.InsertOnSubmit(tracking);
     }
     _Data.SubmitChanges();
 }
Esempio n. 2
0
    private void TrackViewInfo(long fileID)
    {
        ContentFileManager fileManager = new ContentFileManager();
        ContentFile file = fileManager.GetByID(fileID);
        if (file != null && SessionCache.CurrentUser != null)
        {
            FileTracking tracking = new FileTracking();
            tracking.UserID = SessionCache.CurrentUser.UserID;
            tracking.UserIP = AppUtil.GetRemoteIPAddress();
            tracking.FileID = fileID;
            tracking.IsViewed = true;
            tracking.IsDownloaded = false;

            FileTrackingManager manager = new FileTrackingManager();
            manager.Save(tracking);
        }
    }
Esempio n. 3
0
 partial void DeleteFileTracking(FileTracking instance);
Esempio n. 4
0
 partial void UpdateFileTracking(FileTracking instance);
Esempio n. 5
0
 partial void InsertFileTracking(FileTracking instance);
Esempio n. 6
0
		private void detach_FileTrackings(FileTracking entity)
		{
			this.SendPropertyChanging();
			entity.ContentFile = null;
		}
Esempio n. 7
0
		private void detach_FileTrackings(FileTracking entity)
		{
			this.SendPropertyChanging();
			entity.SiteUser = null;
		}