Esempio n. 1
0
        /// <summary>
        /// 列表数据绑定
        /// </summary>
        private void DataBind()
        {
            List <RPlugInfo> list = DataSource;

            Pager.RecorderCount = list.Count;

            if (Pager.PageIndex < 0)
            {
                Pager.PageIndex = 0;
            }
            Pager.FreshMyself();

            PluginListGridView.DataSource = list.GetRange(Pager.Begin, Pager.Count);
            PluginListGridView.DataBind();
        }
Esempio n. 2
0
        void BindData()
        {
            try
            {
                ShopService.ProductInfo[] infos = ShopService.LoadRegistedProducts(SiteInfo.ShopLoginName, SiteInfo.ShopPassword, SiteInfo.SiteUrl);

                Pager.PageIndex = PageNumber;

                Pager.ItemCount  = infos != null ? infos.Length : 0;
                Pager.UrlFormat  = We7Helper.AddParamToUrl(Request.RawUrl.Replace("{", "{{").Replace("}", "}}"), Keys.QRYSTR_PAGEINDEX, "{0}");
                Pager.PrefixText = "共 " + Pager.MaxPages + "  页 ·   第 " + Pager.PageIndex + "  页 · ";

                PluginListGridView.DataSource = new List <ShopService.ProductInfo>(infos).GetRange(Pager.Begin - 1, Pager.Count);
                PluginListGridView.DataBind();
            }
            catch (Exception ex)
            {
                Messages.ShowError("应用程序程序!");
            }
        }
Esempio n. 3
0
        public void BindData()
        {
            ShopService.ShopService service = new ShopService.ShopService();
            service.Url = GeneralConfigs.GetConfig().ShopService.TrimEnd('/').TrimEnd('\\') + "/Plugins/ShopPlugin/ShopService.asmx";

            try
            {
                if (QueryType == 9)
                {
                    PluginListGridView.DataSource = service.QueryPlugins(Request["qtext"]);
                }
                else
                {
                    PluginListGridView.DataSource = service.GetPlugins(QueryType, PageSize);
                }
                PluginListGridView.DataBind();
            }
            catch (Exception ex)
            {
                Messages.ShowError("与" + GeneralConfigs.GetConfig().ShopService + "的插件服务连接错误!");
            }
        }