예제 #1
0
        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;
            }
        }
예제 #2
0
 public ServisVM()
 {
     Instance = this;
 }
예제 #3
0
 public AddServisVM()
 {
     _servis = ServisVM.Instance;
 }
예제 #4
0
 public ServisPage()
 {
     InitializeComponent();
     servisVM    = new ServisVM();
     DataContext = servisVM;
 }