private void btnSave_Clicked(object sender, EventArgs e) { foreach (var q in _survey.SurveyAnswers) { if (q.OhaTyp.ToLower() == "int") { q.NumericValue = Convert.ToInt32(q._numeric.Value); } if (q.OhaTyp.ToLower() == "chr") { q.TextBoxText = q._editor.Text; } if (q.OhaTyp.ToLower() == "sel") { q.PrmChr = q.Dsc; for (int i = 0; i < q._checks.Count; i++) { if (q._checks[i].IsChecked == true) { q.PrmChr += "¤" + q._checks[i].AutomationId + "|" + "1"; } else { q.PrmChr += "¤" + q._checks[i].AutomationId + "|" + "0"; } } } } CaritaUATdb.SurveyAddOrUpdate(_survey); Navigation.PopAsync(); }
private void ToolbarItem_Clicked(object sender, EventArgs e) { _patient.Surveys = CaritaUATdb.GetPatientSurveys(_patient); Items = new ObservableCollection <Survey>(); foreach (var sur in _patient.Surveys) { Items.Add(sur); } radListViewSurveys.ItemsSource = Items; }
public MainPage() { InitializeComponent(); MasterBehavior = MasterBehavior.Popover; MenuPages.Add((int)MenuItemType.Home, (NavigationPage)Detail); /* MESDEBUG */ //CaritaUATdb.LoadDEMOData(); CaritaUATdb.LoadDbData(); }
private void radListViewSurveys_RefreshRequested(object sender, Telerik.XamarinForms.DataControls.ListView.PullToRefreshRequestedEventArgs e) { _patient.Surveys = CaritaUATdb.GetPatientSurveys(_patient); Items = new ObservableCollection <Survey>(); foreach (var sur in _patient.Surveys) { Items.Add(sur); } radListViewSurveys.ItemsSource = Items; radListViewSurveys.EndRefresh(); }
public HealthCardPatientPage(Patient patient) { _patient = patient; if (_patient.Surveys == null) { _patient.Surveys = CaritaUATdb.GetPatientSurveys(_patient); } Items = new ObservableCollection <Survey>(); foreach (var sur in _patient.Surveys) { Items.Add(sur); } InitializeComponent(); this.Title = _patient.Dsc + " " + _patient.PNR; }
private void AddHealthCard_Clicked(object sender, EventArgs e) { SurveyForm thisForm; try { thisForm = CaritaUATdb.SurveyForms.First(x => x.Typ == "HLA"); } catch { DisplayAlert("Fel", "Inga hälsokortformulär sparade i appen!", "Ok"); return; } Survey survey = CaritaUATdb.CreateSurveyFromForm(thisForm); survey.PatPNr = _patient.PatPNr; SurveyEditPage surveyPage = new SurveyEditPage(_patient, survey); Navigation.PushAsync(surveyPage); }