Example #1
0
        private void NewTalkPage_Loaded(object sender, RoutedEventArgs e)
        {
            _isConfimPartyInfo = false;
            ChongGuanSafetySupervisionQZ.DAL.TalkTypeDAL talkTypeDAL = new DAL.TalkTypeDAL();

            var result_t = talkTypeDAL.Query();

            if (result_t.IsSuccessed)
            {
                List <QZ_TalkType> talkTypes = result_t.Data.ToList();

                this.ComboBox_TalkTpye.ItemsSource   = talkTypes;
                this.ComboBox_TalkTpye.SelectedIndex = 0;
            }

            _homeWindow = (Window.GetWindow(this) as HomeWindow);

            _getCardInfoThread = new Thread(new ThreadStart(GlobalData.NewTalkViewModel.ReadCDCard));
            _getCardInfoThread.IsBackground = true;
            _getCardInfoThread.Start();
        }
        private void TalkingRecordManagePage_Loaded(object sender, RoutedEventArgs e)
        {
            ChongGuanSafetySupervisionQZ.DAL.TalkTypeDAL talkTypeDAL = new DAL.TalkTypeDAL();

            var result_t = talkTypeDAL.Query();

            if (result_t.IsSuccessed)
            {
                List <QZ_TalkType> talkTypes = result_t.Data.ToList();

                talkTypes.Insert(0, new QZ_TalkType {
                    TalkTypeId = -1, TalkTypeName = "请选择"
                });
                this.ComboBox_TalkTpye.ItemsSource   = talkTypes;
                this.ComboBox_TalkTpye.SelectedIndex = 0;
            }

            GlobalData.TalkingRecordManageViewModel.SearchAll(SystemParameters.PrimaryScreenWidth / 4 - 80);
            //GlobalData.TalkingRecordManageViewModel.Search(SystemParameters.PrimaryScreenWidth / 4 - 80, 0, "张三");

            this.DataContext = GlobalData.TalkingRecordManageViewModel;
            //this.ListBox_TalkingRecords.ItemsSource = GlobalData.TalkingRecordManageViewModel.CurrentInquiryAndPartyList;
        }