public ListViewCodeCnt() { #region ListViewSetup_Cnt var lstViewMet = new ListView { ItemsSource = CntSurvey, ItemTemplate = new DataTemplate(typeof(EntryCell)) }; // Bind inputs lstViewMet.ItemTemplate.SetBinding(EntryCell.LabelProperty, "SurQuestion"); lstViewMet.ItemTemplate.SetBinding(EntryCell.TextProperty, "TextData"); // Set content value Content = lstViewMet; #endregion #region PopulateFromqGetSurvey_Cnt var qSurvey = UtilDal.GetSurvey("Cnt"); if (qSurvey.Any()) foreach (var que in qSurvey) { CntSurvey.Add(new SurveyModel {SurQuestion = que.Question, TextData = string.Empty}); } else throw new Exception("Survey list is empty for Cnt"); #endregion }
public ListViewCodeVad() { #region ListViewSetup_Vad var lstViewVad = new ListView { ItemsSource = VadSurvey, ItemTemplate = new DataTemplate(typeof(SwitchCell)) }; // Bind inputs lstViewVad.ItemTemplate.SetBinding(SwitchCell.TextProperty, "SurQuestion"); lstViewVad.ItemTemplate.SetBinding(SwitchCell.OnProperty, "IsTrue"); // Set content value Content = lstViewVad; #endregion #region PopulateFromqGetSurvey_Vad var qSurvey = UtilDal.GetSurvey("Vad"); if (qSurvey.Any()) { foreach (var que in qSurvey) { VadSurvey.Add(new SurveyModel { SurQuestion = que.Question, IsTrue = false }); } } else { throw new Exception("Survey list is empty for Vad"); } #endregion }
public ListViewXamlMet() { #region ListViewSetup_Met_XAML InitializeComponent(); LstViewMet.ItemsSource = MetSurvey; #endregion #region PopulateFromqGetSurvey_Met_XAML var qSurvey = UtilDal.GetSurvey("Met"); if (qSurvey.Any()) { foreach (var que in qSurvey) { MetSurvey.Add(new SurveyModel() { SurQuestion = que.Question, TextData = string.Empty }); } } else { throw new Exception("Survey list is empty for Met"); } #endregion }
public ListViewXamlVad(PatientInfoModel patient) { curPatient = patient; #region ListViewSetup_Vad_XAML InitializeComponent(); LstViewVad.ItemsSource = VadSurvey; #endregion #region PopulateFromqGetSurvey_Vad_XAML var qSurvey = UtilDal.GetSurvey("Vad"); if (qSurvey.Any()) { foreach (var que in qSurvey) { VadSurvey.Add(new SurveyModel() { SurQuestion = que.Question, IsTrue = false }); } } else { throw new Exception("Survey list is empty for Vad"); } #endregion }