Esempio n. 1
0
        /// <summary>
        /// to xls
        /// </summary>
        private void ToXls()
        {
            if (!CheckGrant(global::Common.Enum.TravelPermission.统计分析_支出账龄分析_支出账龄分析栏目))
            {
                ResponseToXls(string.Empty);
            }

            int pageSize    = Utils.GetInt(Utils.GetQueryStringValue("recordcount"));
            int recordCount = 0;

            if (pageSize < 1)
            {
                ResponseToXls(string.Empty);
            }

            var chaXun = GetSearchInfo();
            var items  = new EyouSoft.BLL.StatisticStructure.AccountAgeStatistic(SiteUserInfo).GetZhiChuZhangLing(pageSize, 1, ref recordCount, CurrentUserCompanyID, chaXun);

            System.Text.StringBuilder s = new System.Text.StringBuilder();
            if (items != null && items.Count > 0)
            {
                s.Append("供应商\t\t交易总额\t\t欠款总额\t\t最早拖欠时间\n");

                foreach (var item in items)
                {
                    s.AppendFormat("[{0}] {1}\t\t{2}\t\t{3}\t\t{4}\n", item.GongYingShangLeiXing, item.GongYingShang, item.JiaoYiZongE.ToString("C2"), item.QianKuanZongE.ToString("C2"), item.EarlyTime.ToString("yyyy-MM-dd"));
                }
            }

            ResponseToXls(s.ToString());
        }
Esempio n. 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!CheckGrant(global::Common.Enum.TravelPermission.客户关系管理_销售分析_帐龄分析栏目))
            {
                Utils.ResponseNoPermit(global::Common.Enum.TravelPermission.客户关系管理_销售分析_帐龄分析栏目, true);
            }
            aasBll = new EyouSoft.BLL.StatisticStructure.AccountAgeStatistic(this.SiteUserInfo);

            string act = Utils.GetQueryStringValue("act");

            if (!IsPostBack)
            {
                switch (act)
                {
                case "toexcel":
                    ToExcel("Time_area_" + DateTime.Now.ToShortDateString());
                    break;

                case "toprint":
                    PrintInit();
                    break;

                default:
                    DataInit();
                    break;
                }
            }
        }
Esempio n. 3
0
        /// <summary>
        /// 绑定统计分析账龄分析按客户单位
        /// </summary>
        private void BindZhangLingAnKeHuDanWei()
        {
            int pageSize    = 20;
            int pageIndex   = Utils.GetInt(Utils.GetQueryStringValue("Page"), 1);
            int recordCount = 0;

            var searchInfo = new EyouSoft.Model.StatisticStructure.ZhangLingAnKeHuDanWeiChaXun();

            searchInfo.KeHuName = Utils.GetQueryStringValue("kehumingcheng");
            searchInfo.SortType = Utils.GetInt(Utils.GetQueryStringValue("sorttype"));
            searchInfo.LSDate   = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("lsdate"));
            searchInfo.LEDate   = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("ledate"));

            EyouSoft.BLL.StatisticStructure.AccountAgeStatistic bll = new EyouSoft.BLL.StatisticStructure.AccountAgeStatistic(SiteUserInfo);
            var items = bll.GetZhangLingAnKeHuDanWei(pageSize, pageIndex, ref recordCount, CurrentUserCompanyID, searchInfo);

            if (items != null && items.Count > 0)
            {
                ph.Visible      = true;
                phEmpty.Visible = false;
                rpt.DataSource  = items;
                rpt.DataBind();

                decimal weiShouKuanHeJi;
                bll.GetZhangLingAnKeHuDanWei(CurrentUserCompanyID, searchInfo, out weiShouKuanHeJi);

                ltrWeiShouHeJi.Text = weiShouKuanHeJi.ToString("C2");

                this.ExportPageInfo1.PageLinkURL    = Request.ServerVariables["SCRIPT_NAME"].ToString() + "?";
                this.ExportPageInfo1.UrlParams      = Request.QueryString;
                this.ExportPageInfo1.intPageSize    = pageSize;
                this.ExportPageInfo1.CurrencyPage   = pageIndex;
                this.ExportPageInfo1.intRecordCount = recordCount;
            }
            else
            {
                ph.Visible      = false;
                phEmpty.Visible = true;
            }

            RegisterScript(string.Format("var recordCount={0};", recordCount));
        }
Esempio n. 4
0
        /// <summary>
        /// 初始化支出账龄分析
        /// </summary>
        private void InitZhiChuZhangLingFenXi()
        {
            int pageSize    = 20;
            int pageIndex   = Utils.GetInt(Utils.GetQueryStringValue("page"), 1);
            int recordCount = 0;

            var chaXun = GetSearchInfo();
            var bll    = new EyouSoft.BLL.StatisticStructure.AccountAgeStatistic(SiteUserInfo);

            var items = bll.GetZhiChuZhangLing(pageSize, pageIndex, ref recordCount, CurrentUserCompanyID, chaXun);

            if (items != null && items.Count > 0)
            {
                phFXB.Visible   = true;
                phEmpty.Visible = false;

                rptZhiChuZhangLing.DataSource = items;
                rptZhiChuZhangLing.DataBind();

                ExportPageInfo1.PageLinkURL    = Request.ServerVariables["SCRIPT_NAME"].ToString() + "?";
                ExportPageInfo1.UrlParams      = Request.QueryString;
                ExportPageInfo1.intPageSize    = pageSize;
                ExportPageInfo1.CurrencyPage   = pageIndex;
                ExportPageInfo1.intRecordCount = recordCount;

                decimal weiFuKuanHeJi;
                decimal zongJinEHeJi;
                bll.GetZhiChuZhangLing(CurrentUserCompanyID, chaXun, out weiFuKuanHeJi, out zongJinEHeJi);
                ltrWeiFuKuanHeJi.Text = weiFuKuanHeJi.ToString("C2");
                ltrZongJinEHeJi.Text  = zongJinEHeJi.ToString("C2");
            }
            else
            {
                phFXB.Visible   = false;
                phEmpty.Visible = true;
            }

            RegisterScript(string.Format("var recordCount={0};", recordCount));
        }
Esempio n. 5
0
        /// <summary>
        /// to xls
        /// </summary>
        private void ToXls()
        {
            if (!CheckGrant(TravelPermission.统计分析_帐龄分析_帐龄分析栏目))
            {
                ResponseToXls(string.Empty);
            }

            int pageSize = Utils.GetInt(Utils.GetQueryStringValue("recordcount"));

            if (pageSize < 1)
            {
                ResponseToXls(string.Empty);
            }

            int recordCount = 0;
            var searchInfo  = new EyouSoft.Model.StatisticStructure.ZhangLingAnKeHuDanWeiChaXun();

            searchInfo.KeHuName = Utils.GetQueryStringValue("kehumingcheng");
            searchInfo.SortType = Utils.GetInt(Utils.GetQueryStringValue("sorttype"));
            searchInfo.LSDate   = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("lsdate"));
            searchInfo.LEDate   = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("ledate"));

            EyouSoft.BLL.StatisticStructure.AccountAgeStatistic bll = new EyouSoft.BLL.StatisticStructure.AccountAgeStatistic(SiteUserInfo);
            var items = bll.GetZhangLingAnKeHuDanWei(pageSize, 1, ref recordCount, CurrentUserCompanyID, searchInfo);

            System.Text.StringBuilder s = new System.Text.StringBuilder();
            if (items != null && items.Count > 0)
            {
                s.Append("客户单位\t拖欠款总额\t最长拖欠时间\n");

                foreach (var item in items)
                {
                    s.AppendFormat("{0}\t{1}\t{2}\n", item.KeHuName, item.WeiShouKuan.ToString("C2"), item.EarlyTime.ToString("yyyy-MM-dd"));
                }
            }

            ResponseToXls(s.ToString());
        }
Esempio n. 6
0
        private void InitAgeAreaStaList()
        {
            #region 获取参数
            PageIndex     = Utils.GetInt(Request.QueryString["Page"], 1);
            TourType      = Utils.GetQueryStringValue("tourType");
            RouteAreaName = Utils.GetQueryStringValue("routeAreaName");
            Salser        = Utils.GetQueryStringValue("Salser");
            SalerId       = Utils.GetQueryStringValue("SalserId");
            StartDate     = Utils.GetDateTimeNullable(Request.QueryString["startDate"], new DateTime(DateTime.Now.Year, 1, 1));
            EndDate       = Utils.GetDateTimeNullable(Request.QueryString["endDate"], new DateTime(DateTime.Now.Year, 12, 31));
            #endregion

            //调用底层方法
            EyouSoft.BLL.StatisticStructure.AccountAgeStatistic        AgeStaBll = new EyouSoft.BLL.StatisticStructure.AccountAgeStatistic(this.SiteUserInfo);
            EyouSoft.Model.StatisticStructure.QueryAccountAgeStatistic model     = new EyouSoft.Model.StatisticStructure.QueryAccountAgeStatistic();

            #region 查询实体赋值
            if (TourType != "" && TourType != "-1")
            {
                model.TourType = (EyouSoft.Model.EnumType.TourStructure.TourType) int.Parse(TourType);
            }
            model.LeaveDateStart = StartDate;
            model.LeaveDateEnd   = EndDate;
            if (RouteAreaName != "" && RouteAreaName != "0")
            {
                model.AreaId = int.Parse(RouteAreaName);
            }
            if (SalerId != "")
            {
                model.SaleIds = Utils.GetIntArray(SalerId, ",");
            }
            #endregion

            #region 初始化表单赋值

            txtStartDate.Value = StartDate.HasValue ? StartDate.Value.ToString("yyyy-MM-dd") : "";
            txtEndDate.Value   = EndDate.HasValue ? EndDate.Value.ToString("yyyy-MM-dd") : "";
            if (TourType != "")
            {
                this.TourTypeList1.TourType = int.Parse(TourType);
            }
            if (RouteAreaName != "")
            {
                this.RouteAreaList1.RouteAreaId = int.Parse(RouteAreaName);
            }
            this.SelectSalers.OperName = Salser;
            this.SelectSalers.OperId   = SalerId;
            #endregion

            #region 绑定列表
            list = EyouSoft.Common.Function.SelfExportPage.GetList <EyouSoft.Model.StatisticStructure.AccountAgeStatistic>(PageIndex, PageSize, out RecordCount, AgeStaBll.GetAccountAgeStatistic(model));
            if (list != null && list.Count != 0)
            {
                this.tbl_ExportPage.Visible             = true;
                this.crp_GetAgeDepartStaList.DataSource = list;
                this.crp_GetAgeDepartStaList.DataBind();
                BindPage();
            }
            else
            {
                this.tbl_ExportPage.Visible            = false;
                this.crp_GetAgeDepartStaList.EmptyText = "<tr bgcolor='#e3f1fc'><td id=\"EmptyData\" colspan='3' height='50px' align='center'>暂时没有数据!</td></tr>";
            }
            #endregion
        }