Esempio n. 1
0
        public void QueryPMGroup(PMGroupQueryVM model, int PageSize, int PageIndex, string SortField, EventHandler <RestClientEventArgs <dynamic> > callback)
        {
            ProductManagerGroupQueryFilter filter;

            filter = model.ConvertVM <PMGroupQueryVM, ProductManagerGroupQueryFilter>();

            filter.PMGroupName = model.PMGroupName;
            PMGroupStatus statusValue;

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

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

            string relativeUrl = "/IMService/ProductManagerGroup/QueryProductManagerGroupInfo";

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

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