Esempio n. 1
0
		void OnEdit()
		{
			var employeeCardDetailsViewModel = new EmployeeCardDetailsViewModel(Organisation, EmployeeCardsViewModel.Employee, Card);
			if (DialogService.ShowModalWindow(employeeCardDetailsViewModel))
			{
				var card = employeeCardDetailsViewModel.Card;
				Card = card;
				OnPropertyChanged(() => Card);
				OnPropertyChanged(() => Name);
				SetCardDoors();
			}
		}
		private void BeginEdit(EmployeeCardViewModel card = null)
		{
			EmployeeCardDetailsViewModel viewModel = new EmployeeCardDetailsViewModel(card);
			if (DialogService.ShowModalWindow(viewModel))
			{
				if (card == null)
				{
					card = viewModel.EmployeeCardViewModel;
					EmployeeCardIndex.Add(card);
				}
				else
					card.Update();
				SelectedEmployeeCard = card;
			}
		}