Exemplo n.º 1
0
        public void QueryPM(PMQueryVM model, int PageSize, int PageIndex, string SortField, EventHandler <RestClientEventArgs <dynamic> > callback)
        {
            ProductManagerQueryFilter filter;

            filter = model.ConvertVM <PMQueryVM, ProductManagerQueryFilter>();

            filter.UserID      = model.PMID;
            filter.UserName    = model.PMName;
            filter.PMGroupName = model.PMGroupName;
            PMStatus statusValue;

            Enum.TryParse(model.Status, out statusValue);
            filter.Status = statusValue;

            filter.PagingInfo = new PagingInfo
            {
                PageSize  = PageSize,
                PageIndex = PageIndex,
                SortBy    = SortField
            };

            string relativeUrl = "/IMService/ProductManager/QueryProductManagerInfo";

            restClient.QueryDynamicData(relativeUrl, filter,
                                        (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }

                callback(obj, args);
            }
                                        );
        }
Exemplo n.º 2
0
 public override void OnPageLoad(object sender, EventArgs e)
 {
     base.OnPageLoad(sender, e);
     model                    = new PMQueryVM();
     this.DataContext         = model;
     cbPMStatus.SelectedIndex = 0;
 }