/// <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(); }
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); } }
partial void DeleteFileTracking(FileTracking instance);
partial void UpdateFileTracking(FileTracking instance);
partial void InsertFileTracking(FileTracking instance);
private void detach_FileTrackings(FileTracking entity) { this.SendPropertyChanging(); entity.ContentFile = null; }
private void detach_FileTrackings(FileTracking entity) { this.SendPropertyChanging(); entity.SiteUser = null; }