public EditServisVM(Edit_Service ownerEditService) { _servis = ServisVM.Instance; _editOwner = ownerEditService; if (_servis.SelectedService != null && _servis.SelectedTypeService != null) { _editOwner.Kategoria_btn.IsEnabled = false; _editOwner.Kategoria_tb.IsEnabled = false; _editOwner.Price_tb.IsEnabled = true; _editOwner.NameService_tb.IsEnabled = true; _editOwner.Service_btn.IsEnabled = true; NameServis = _servis.SelectedService.ServiceName; CostServis = _servis.SelectedService.ServicePrice; } else if (_servis.SelectedTypeService != null) { _editOwner.Price_tb.IsEnabled = false; _editOwner.NameService_tb.IsEnabled = false; _editOwner.Service_btn.IsEnabled = false; KategoriaServis = _servis.SelectedTypeService.TypeService; } }
public ServisVM() { Instance = this; }
public AddServisVM() { _servis = ServisVM.Instance; }
public ServisPage() { InitializeComponent(); servisVM = new ServisVM(); DataContext = servisVM; }