private void GetPageData(int OnClickId) { try { vm = new ViewModel.VM_faq(); subQues = new Model.FAQ_Question(); subQues = vm.GetSubQuestion(OnClickId); ContentPanel.Children.Clear(); if (subQues.type.Equals("ans")) { ContentPanel.Children.Add(GetAns_UserControl(OnClickId)); } else if (subQues.quesType.Equals("multi"))// question type= multi ContentPanel.Children.Add(GetMultiQuest_UserControl(OnClickId)); else//question type= yes/no ContentPanel.Children.Add(GetYesNo_UserControl(OnClickId)); } catch (Exception ex) { //List<Parameter> Params = new List<Parameter>(); //Params.Add(AccountFunctions.createParameter("Location", "FAQ questionAns")); //Params.Add(AccountFunctions.createParameter("Method", "GetPageData by ClickId, Error:" + ex.Message)); //FlurryWP8SDK.Api.LogEvent("FAQ Exception", Params); } }
private CustomControls.UC_FAQ_QuestYesNo GetYesNo_UserControl(int Code) { vm = new ViewModel.VM_faq(); subQues = new Model.FAQ_Question(); subQues = vm.GetSubQuestion(Code); uc = new CustomControls.UC_FAQ_QuestYesNo(); uc.DataContext = subQues; uc.bt1.Click += YesNo_ButtonClickAction; uc.bt2.Click += YesNo_ButtonClickAction; return uc; }
private void LoadRecharge(int Code) { if (GrdRecharge.Children.Count == 0) { GrdRecharge.Children.Clear(); vm = new ViewModel.VM_faq(); subQues = new Model.FAQ_Question(); subQues = vm.GetSubQuestion(Code); if (subQues.quesType.Equals("multi"))// question type= multi GrdRecharge.Children.Add(GetMultiQuest_UserControl(Code)); else//question type= yes/no GrdRecharge.Children.Add(GetYesNo_UserControl(Code)); } }
private void LoadAccount(int Code) { if (GrdAccount.Children.Count == 0) { GrdAccount.Children.Clear(); vm = new ViewModel.VM_faq(); subQues = new Model.FAQ_Question(); subQues = vm.GetSubQuestion(Code); if (subQues.quesType.Equals("multi")) GrdAccount.Children.Add(GetMultiQuest_UserControl(Code)); else GrdAccount.Children.Add(GetYesNo_UserControl(Code)); } }