protected override void OnInitializeInRuntime() { Entries = new ObservableCollection <ViewModelBase>(); var service = new MvvmService(); var folders = service.GetFolders(); var passwords = service.GetPasswords(); foreach (var folderModel in folders) { FolderViewModel vm = new FolderViewModel((int)folderModel.Id, folderModel.Name, folderModel.Description, folderModel.ParentId); Entries.Add(vm); } foreach (var passwordModel in passwords) { PasswordViewModel vm = new PasswordViewModel((int)passwordModel.Id, passwordModel.Name, passwordModel.Description, passwordModel.ParentId); Entries.Add(vm); } base.OnInitializeInRuntime(); }
public void Delete() { var service = new MvvmService(); service.DeleteFolder(FolderDTO); }
public void Save() { var service = new MvvmService(); service.UpdateFolder(FolderDTO); }
public void Delete() { var service = new MvvmService(); service.DeletePassword(PasswordDTO); }
public void Save() { var service = new MvvmService(); service.UpdatePassword(PasswordDTO); }