示例#1
0
        public void Init()
        {
            try
            {
                cbxData = new ObservableCollection <CommonCombobox>();
                cbxData.Add(new CommonCombobox {
                    Name = Localization.Resource.Qna_9, Value = "01"
                });
                cbxData.Add(new CommonCombobox {
                    Name = Localization.Resource.Qna_10, Value = "02"
                });
                cbxData.Add(new CommonCombobox {
                    Name = Localization.Resource.Qna_11, Value = "03"
                });
                cbxData.Add(new CommonCombobox {
                    Name = Localization.Resource.Qna_12, Value = "04"
                });
                cbxData.Add(new CommonCombobox {
                    Name = Localization.Resource.Qna_13, Value = "05"
                });

                SelectedCbx = cbxData[0];
            }
            catch (Exception ex)
            {
                SysLog.Error("Message[{0}], StackTrace[{1}]", ex.Message, ex.StackTrace);
            }
        }
示例#2
0
        public async void SearchContent()
        {
            try
            {
                using (RequestSelectBoardDetailModel req = new RequestSelectBoardDetailModel())
                {
                    req.boardId   = StringEnum.GetStringValue(EnumLib.BoardCode.Qna);
                    req.contentId = sContentId;

                    using (ResponseSelectBoardDetailModel res = await WebApiLib.AsyncCall <ResponseSelectBoardDetailModel, RequestSelectBoardDetailModel>(req))
                    {
                        if (res.resultStrCode == "000")
                        {
                            ResponseSelectBoardDetailDataModel item = res.data;
                            CommonCombobox selectItem = cbxData.Where(x => x.Value == res.data.catId).FirstOrDefault();
                            if (selectItem != null)
                            {
                                SelectedCbx = selectItem;
                            }
                            else
                            {
                                SelectedCbx = cbxData[0];
                            }
                            sTitle       = item.boardTitle;
                            sContent     = item.contentMsg;
                            sPhoneNumber = item.userPhone;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                SysLog.Error("Message[{0}], StackTrace[{1}]", ex.Message, ex.StackTrace);
            }
        }