public override void Delete() { using (var service = new PersonsServiceClient()) { try { service.Delete(this.ViewModel.Person.Id); } catch (Exception e) { } } }
public override void Load() { using (var service = new PersonsServiceClient()) { try { this.ViewModel.Person = service.GetPersonById(this.CurrentId); } catch (Exception e) { } } }
public override void Add() { using (var service = new PersonsServiceClient()) { try { this.ViewModel.CurrentId = service.Save(this.ViewModel.Person); this.CurrentId = this.ViewModel.CurrentId; } catch (Exception e) { } } }