예제 #1
0
 private async void OnNewTaskList(object sender, RoutedEventArgs e)
 {
     await new NewTaskList {
         DataContext = ViewModel.AddTaskListViewModel
     }.ShowAsync();
     AddFlyout.Hide();
 }
예제 #2
0
        private void Button5_Click(object sender, RoutedEventArgs e)
        {
            string code     = ComboBox4.SelectedItem.ToString();
            string quantity = TexBox4.Text;

            AddToPendingSuppliers(code, quantity);
            AddFlyout.Hide();
        }
예제 #3
0
 private async void OnNewBoard(dynamic sender, RoutedEventArgs e)
 {
     try
     {
         await new UpdateBoard {
             DataContext = ViewModel.BoardsListViewModel.AddBoardViewModel
         }.ShowAsync();
         AddFlyout.Hide();
     }
     catch (RuntimeBinderException ex)
     {
         Debug.WriteLine($"on new board: {ex}");
     }
 }
예제 #4
0
 private async void OnNewProject(object sender, RoutedEventArgs e)
 {
     try
     {
         await new NewProject {
             DataContext = ViewModel.ProjectViewModel.NewProjectViewModel
         }.ShowAsync();
         AddFlyout.Hide();
     }
     catch (RuntimeBinderException ex)
     {
         Debug.WriteLine($"add project ex:{ex}");
     }
 }
예제 #5
0
        private async void AddToWatchList_Click(object sender, RoutedEventArgs e)
        {
            Mapper.CreateMap <RootObject, TvShow>()
            .ForMember(dest => dest.ShowTitle, opt => opt.MapFrom(src => src.name))
            .ForMember(dest => dest.ShowPosterIcon, opt => opt.MapFrom(src => src.image.medium))
            .ForMember(dest => dest.Rating, opt => opt.MapFrom(src => src.rating.average))
            .ForMember(dest => dest.ShowStatus, opt => opt.MapFrom(src => src.status))
            .ForMember(dest => dest.ShowTime, opt => opt.MapFrom(src => src.schedule.time))
            .ForMember(dest => dest.ShowNetwork, opt => opt.MapFrom(src => src.network.name))
            .ForMember(dest => dest.ShowDays, opt => opt.MapFrom(src => String.Join(String.Empty, src.schedule.days.ToArray())));
            TvShow show = Mapper.Map <TvShow>(showDets);
            var    flag = tableQueries.insertRecord(show);

            if (flag == false)
            {
                var btn    = sender as Button;
                var result = await WarningContentDialog.ShowAsync();
            }
            WatchListGrid.ItemsSource = tableQueries.selectAll();
            findListView.Visibility   = Visibility.Collapsed;
            searchShow.Text           = String.Empty;
            AddFlyout.Hide();
        }
예제 #6
0
        private void AddConfirmBtn_Click(object sender, RoutedEventArgs e)
        {
            NewPatient.Visibility  = Visibility.Collapsed;
            PatientInfo.Visibility = Visibility.Visible;

            int age = DateTime.Now.Year - DOBDpk.Date.Year;

            if (DOBDpk.Date.AddYears(age) > DateTime.Now)
            {
                age--;
            }


            ShowNameTbl.Text   = NameTb.Text;
            ShowAgeTbl.Text    = age.ToString("G");
            ShowHeightTbl.Text = HeightTb.Text;
            ShowWeightTbl.Text = WeightTb.Text;
            ShowTelTbl.Text    = "Tel. " + TelTb.Text;

            EditNameTb.Text   = NameTb.Text;
            EditDOBDpk.Date   = DOBDpk.Date;
            EditHeightTb.Text = HeightTb.Text;
            EditWeightTb.Text = WeightTb.Text;
            if (CurrentLocationRBtn.IsChecked == true)
            {
                EditCurrentLocationRBtn.IsChecked = true;
            }
            else if (OtherRBtn.IsChecked == true)
            {
                OtherRBtn.IsChecked = true; EditOtherTb.Text = OtherTb.Text;
            }
            EditTelTb.Text = TelTb.Text;

            addStatus = true;

            AddFlyout.Hide();
        }