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

            filter = model.ConvertVM <ManufacturerQueryVM, ManufacturerQueryFilter>();

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

            string relativeUrl = "/IMService/Manufacturer/QueryManufacturer";

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

                if (!(args == null || args.Result == null || args.Result.Rows == null))
                {
                    foreach (var item in args.Result.Rows)
                    {
                        item.IsChecked = false;
                    }
                }
                callback(obj, args);
            }
                                        );
        }
Exemplo n.º 2
0
 public override void OnPageLoad(object sender, EventArgs e)
 {
     base.OnPageLoad(sender, e);
     model            = new ManufacturerQueryVM();
     this.DataContext = model;
 }