Пример #1
0
 public UpsertPolicemanPage(PolicemenViewModel viewModel, string action)
 {
     InitializeComponent();
     DataContext = viewModel;
     if (action == "Insert")
     {
         Edit.Visibility = Visibility.Hidden;
     }
     else
     {
         Register.Visibility = Visibility.Hidden;
     }
 }
Пример #2
0
 public EditorWindow(string action, PolicemenViewModel policemen)
 {
     InitializeComponent();
     Title = action == "Insert" ? "Въвеждане на служител" : "Редакция на служител";
     EditorFrame.Navigate(new UpsertPolicemanPage(policemen, action));
 }