Beispiel #1
0
        private async void BtnAdd_OnClick(object sender, RoutedEventArgs e)
        {
            NewServiceMaster = new ServiceMaster()
            {
                FirstName  = TbFirstName.Text,
                MiddleName = TbMiddleName.Text,
                LastName   = TbLastName.Text
            };
            await _repository.Create(NewServiceMaster);

            _hideFlyout.Invoke();
        }
        private async void BtnAdd_OnClick(object sender, RoutedEventArgs e)
        {
            if (TbPrice.Value == null || TbWorkingHours.Value == null)
            {
                return;
            }
            var descr = new TextRange(TbDescription.Document.ContentStart, TbDescription.Document.ContentEnd).Text;

            NewWorkType = new WorkType()
            {
                Description  = descr,
                Name         = TbName.Text,
                Price        = (double)TbPrice.Value,
                WorkingHours = (double)TbWorkingHours.Value
            };

            await _repository.Create(NewWorkType);

            _hideFlyout.Invoke();
        }