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); } }
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); } }