コード例 #1
0
 //需跟进维护
 private void dgFollowUpMaintenance_LoadingDataSource(object sender, Newegg.Oversea.Silverlight.Controls.Data.LoadingDataEventArgs e)
 {
     SetQuery(e);
     if (this.cbMore.IsChecked.Value)
     {
         TempView = PageView;
     }
     else
     {
         IsNormalQuery(PageView.QueryInfo.SeachType.Value);
         TempView = newQueryView;
     }
     facade.Query(TempView, (restSender, args) =>
     {
         if (args.FaultsHandle())
         {
             return;
         }
         foreach (var a in args.Result.Rows)
         {
             if (a.IsDefined("Cellphone") && !string.IsNullOrEmpty(a.Cellphone))
             {
                 a.Phone = string.Format("{0},{1}", a.Phone, a.Cellphone);
             }
         }
         dgFollowUpMaintenance.TotalCount  = args.Result.TotalCount;
         dgFollowUpMaintenance.ItemsSource = args.Result.Rows;
     });
 }
コード例 #2
0
        private void btnSearch_Click(object sender, RoutedEventArgs e)
        {
            if (PageView.QueryInfo.HasValidationErrors)
            {
                return;
            }
            currentType  = PageView.QueryInfo.SeachType.Value;
            newQueryView = PageView.DeepCopy();
            switch (currentType)
            {
            case VisitSeachType.Visited:
                this.dgVisited.Bind();
                break;

            case VisitSeachType.WaitingVisit:
                this.dgWaitingVisit.Bind();
                break;

            case VisitSeachType.FollowUpVisit:
                this.dgFollowUpVisit.Bind();
                break;

            case VisitSeachType.Maintenance:
                this.dgMaintenance.Bind();
                break;

            case VisitSeachType.FollowUpMaintenance:
                this.dgFollowUpMaintenance.Bind();
                break;
            }
        }
コード例 #3
0
 public CustomerVisit()
 {
     PageView = new CustomerVisitView()
     {
         QueryInfo = new CustomerVisitQueryVM
         {
             SeachType = VisitSeachType.Visited,
             IsVip     = false
         }
     };
     InitializeComponent();
 }
コード例 #4
0
        public void Query(CustomerVisitView view, EventHandler <RestClientEventArgs <dynamic> > callback)
        {
            CustomerVisitQueryFilter filter = ECCentral.Portal.Basic.Utilities.EntityConverter <CustomerVisitQueryVM, CustomerVisitQueryFilter> .Convert(view.QueryInfo, (v, f) =>
            {
                if (v.CustomerRank.HasValue)
                {
                    f.CustomerRank = (int)v.CustomerRank;
                }
                f.SeachType = v.SeachType.HasValue ? (int)v.SeachType : (int)VisitSeachType.WaitingVisit;
            });

            string relativeUrl = "/CustomerService/Visit/Query";

            restClient.QueryDynamicData(relativeUrl, filter, callback);
        }