Пример #1
0
 //根据输入的电话号码列出所有外卖人的信息
 private void LoaderTakeoutClientInfoListByInputNumber()
 {
     new Task(() =>
     {
         List <TakeoutClientInfo> clientInfos = _DataService.FindTakeoutClientListByTelephone(InputNumber);
         DispatcherHelper.CheckBeginInvokeOnUI(() =>
         {
             if (clientInfos != null)
             {
                 ClientInfoItems.Clear();
                 for (int x = 0; x < clientInfos.Count; x++)
                 {
                     var info            = clientInfos.ElementAt(x);
                     ClientInfoItem item = new ClientInfoItem()
                     {
                         IsMember      = false,
                         ClientNum     = info.OrderPeopleId.ToString(),
                         ClientAddress = info.Address,
                         ClientName    = info.Order_people,
                         ClientContact = info.Telephone,
                         ClientPhone   = info.Mobile
                     };
                     ClientInfoItems.Add(item);
                 }
             }
             else
             {
                 MessageBox.Show("没有找到订餐人信息");
             }
             InputNumber = null;
         });
     }).Start();
 }
 //根据输入的电话号码列出所有外卖人的信息
 private void LoaderTakeoutClientInfoListByInputNumber()
 {
     new Task(() =>
     {
         List<TakeoutClientInfo> clientInfos = _DataService.FindTakeoutClientListByTelephone(InputNumber);
         DispatcherHelper.CheckBeginInvokeOnUI(() =>
         {
             if (clientInfos != null)
             {
                 ClientInfoItems.Clear();
                 for (int x = 0; x < clientInfos.Count; x++)
                 {
                     var info = clientInfos.ElementAt(x);
                     ClientInfoItem item = new ClientInfoItem()
                     {
                         IsMember = false,
                         ClientNum = info.OrderPeopleId.ToString(),
                         ClientAddress = info.Address,
                         ClientName = info.Order_people,
                         ClientContact = info.Telephone,
                         ClientPhone = info.Mobile
                     };
                     ClientInfoItems.Add(item);
                 }
             }
             else
             {
                 MessageBox.Show("没有找到订餐人信息");
             }
             InputNumber = null;
         });  
     }).Start();
    
 }