예제 #1
0
        /// <summary>
        /// 绑定收款单据列表数据
        /// </summary>
        private void BindRpList()
        {
            double zje = 0;

            if (Session["login"] == null)
            {
                Response.Redirect("~/Login.aspx", true);
            }
            else
            {
                LoginInfo login = Session["login"] as LoginInfo;

                AspNetPager1.RecordCount = To_CollectingManager.GetTotalCount(FilterSql, login.Id);

                SearchPageSet sps = SearchPageSetManager.getSearchPageSetByLoginId(login.Id, 019);
                if (sps == null)
                {
                    AspNetPager1.NumericButtonCount = 5;
                    AspNetPager1.PageSize           = 5;
                }
                else
                {
                    AspNetPager1.NumericButtonCount = sps.Pagecount;
                    AspNetPager1.PageSize           = sps.Pageitem;
                }
                if (HttpContext.Current.Request.QueryString["page"] != null)
                {
                    AspNetPager1.CurrentPageIndex = int.Parse(HttpContext.Current.Request.QueryString["page"]);
                }

                collectingList = To_CollectingManager.GetListByPage(FilterSql, login.Id, AspNetPager1.StartRecordIndex, AspNetPager1.EndRecordIndex);
                //5.31 增加总计的计算
                if (collectingList.Count > 0 && collectingList != null)
                {
                    foreach (To_Collecting cl in collectingList)
                    {
                        zje += cl.ReceiptAmount.ToString() == "" ? 0.00 : Convert.ToDouble(cl.ReceiptAmount.ToString());
                    }
                }
                RpList.DataSource = collectingList;
                RpList.DataBind();
                this.zje.Text = "¥" + zje.ToString("0.00");
            }
        }