Example #1
0
 private void removeSubFoldersRef(Folder folder)
 {
     OnPropertyChanging();
     folder.ParentFolderRef = null;
 }
Example #2
0
 private void addSubFoldersRef(Folder folder)
 {
     OnPropertyChanging();
     folder.ParentFolderRef = this;
 }
Example #3
0
 public void CreateFolder(string name, Folder parentFolder = null)
 {
     Folder folder = new Folder { Name = name };
     db.Folders.InsertOnSubmit(folder);
     if (parentFolder != null) { parentFolder.SubFoldersRef.Add(folder); }
     db.SubmitChanges();
     AllFolderItems.Add(folder);
 }
Example #4
0
 public void DeleteFolder(Folder folder)
 {
     //foreach (Activity item in folder.ActivitiesRef) { deleteActivity(item); };
     if (folder.ParentFolderRef != null) { folder.ParentFolderRef.SubFoldersRef.Remove(folder); }
     AllFolderItems.Remove(folder);
     db.Folders.DeleteOnSubmit(folder);
     db.SubmitChanges();
 }
Example #5
0
 public void CreateActivity(string name, Folder folder = null)
 {
     Activity activity = new Activity { Name = name };
     db.Activities.InsertOnSubmit(activity);
     if (folder != null) { folder.ActivitiesRef.Add(activity); }
     db.SubmitChanges();
     AllActivityItems.Add(activity);
 }