Exemplo n.º 1
0
        public ResponseMessage <List <PipingInfo> > Search(string usertoken, SearchRequst request)
        {
            ResponseMessage <List <PipingInfo> > result = new ResponseMessage <List <PipingInfo> >();

            //验证token
            result = service.Search(usertoken, request);
            return(result);
        }
        private void Search(object sender, RoutedEventArgs e)
        {
            SearchRequst requst = new SearchRequst();

            requst.startNo  = startNo.Text;
            requst.year     = layingDate.SelectionBoxItem.ToString();
            requst.texture  = caizhi.SelectionBoxItem.ToString();
            requst.diameter = zhijing.SelectionBoxItem.ToString();
            requst.type     = type.SelectionBoxItem.ToString();

            ResponseMessage <List <PipingInfo> > result = service.Search(loginUser.UserName, requst);

            pipingInfoData.ItemsSource = result.ext;
            if (IsOver.IsChecked == true)
            {
                ShowOnlyOrNot(sender, e);
            }
            SortResult();
            if (result == null || result.ext.Count == 0)
            {
                System.Windows.Forms.MessageBox.Show(string.Format("数据库无符合条件数据"));
            }
        }