예제 #1
0
 private void removeSubFoldersRef(Folder folder)
 {
     OnPropertyChanging();
     folder.ParentFolderRef = null;
 }
예제 #2
0
 private void addSubFoldersRef(Folder folder)
 {
     OnPropertyChanging();
     folder.ParentFolderRef = this;
 }
예제 #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);
 }
예제 #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();
 }
예제 #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);
 }