Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
        public void Delete()
        {
            var service = new MvvmService();

            service.DeleteFolder(FolderDTO);
        }
Ejemplo n.º 3
0
        public void Save()
        {
            var service = new MvvmService();

            service.UpdateFolder(FolderDTO);
        }
Ejemplo n.º 4
0
        public void Delete()
        {
            var service = new MvvmService();

            service.DeletePassword(PasswordDTO);
        }
Ejemplo n.º 5
0
        public void Save()
        {
            var service = new MvvmService();

            service.UpdatePassword(PasswordDTO);
        }