//需跟进维护 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; }); }
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; } }
public CustomerVisit() { PageView = new CustomerVisitView() { QueryInfo = new CustomerVisitQueryVM { SeachType = VisitSeachType.Visited, IsVip = false } }; InitializeComponent(); }
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); }