コード例 #1
0
        private async void NewRecord()
        {
            Dictionary <int, string> typesOfColumnDictionary = (Dictionary <int, string>)RosterViewModel.ColumnTypes;
            NewRecordDialog          createDialog            = new NewRecordDialog(RosterViewModel.ColumnNames, typesOfColumnDictionary,
                                                                                   RosterViewModel.EnumTypes);
            ContentDialogResult dialogResult = await createDialog.ShowAsync();

            if (dialogResult == ContentDialogResult.Primary && createDialog.ValuesOfNewObject.Any())
            {
                List <string> valuesList = createDialog.ValuesOfNewObject;
                await RosterViewModel.CreateRecordAsync("Lekarze", valuesList);
            }
        }
コード例 #2
0
        private async void NewRecord()
        {
            Dictionary <int, string> typesOfColumnDictionary = (Dictionary <int, string>)RosterViewModel.ColumnTypes;
            NewRecordDialog          createDialog            = new NewRecordDialog(RosterViewModel.ColumnNames, typesOfColumnDictionary,
                                                                                   RosterViewModel.EnumTypes);

            createDialog.Width  = Window.Current.Bounds.Width;
            createDialog.Height = Window.Current.Bounds.Height;
            ContentDialogResult dialogResult = await createDialog.ShowAsync();

            if (dialogResult == ContentDialogResult.Primary && createDialog.ValuesOfNewObject.Any())
            {
                List <string> valuesList = createDialog.ValuesOfNewObject;
                await RosterViewModel.CreateRecordAsync("Pacjenci", valuesList);
            }
        }