Exemple #1
0
        protected void BindSum(EyouSoft.Model.StatisticStructure.QueryAccountAgeStatistic model)
        {
            Decimal total = 0; //总收入
            Decimal ys    = 0; //应收
            Decimal ws    = 0; //未收

            //BLL声明
            EyouSoft.BLL.StatisticStructure.StatAllOut outBLL = new EyouSoft.BLL.StatisticStructure.StatAllOut(SiteUserInfo);
            //获取总计数据
            outBLL.GetAllTotalAmount(model, ref total, ref ys);
            if (total != 0)
            {
                res = true;
            }
            //计算未收金额
            ws = total - ys;
            //总金额赋值_已结清
            this.sum_total_account.Text = EyouSoft.Common.Utils.FilterEndOfTheZeroString(EyouSoft.Common.Utils.GetDecimal(total.ToString()).ToString("0.00"));
            //总金额赋值_所有
            this.sum_total_noaccount.Text = EyouSoft.Common.Utils.FilterEndOfTheZeroString(EyouSoft.Common.Utils.GetDecimal(total.ToString()).ToString("0.00"));
            //应收金额赋值_已结清
            this.sum_ys_account.Text = EyouSoft.Common.Utils.FilterEndOfTheZeroString(EyouSoft.Common.Utils.GetDecimal(ys.ToString()).ToString("0.00"));
            //应收金额赋值_所有
            this.sum_ys_noaccount.Text = EyouSoft.Common.Utils.FilterEndOfTheZeroString(EyouSoft.Common.Utils.GetDecimal(ys.ToString()).ToString("0.00"));
            //未收金额赋值_已结清
            this.sum_ws_account.Text = EyouSoft.Common.Utils.FilterEndOfTheZeroString(EyouSoft.Common.Utils.GetDecimal(ws.ToString()).ToString("0.00"));
            //未收金额赋值_所有
            this.sum_ws_noaccount.Text = EyouSoft.Common.Utils.FilterEndOfTheZeroString(EyouSoft.Common.Utils.GetDecimal(ws.ToString()).ToString("0.00"));
        }
Exemple #2
0
        /// <summary>
        /// 添加支出明细
        /// </summary>
        /// <param name="?"></param>
        /// <returns></returns>
        private bool AddStatAllOut(LocalTravelAgencyInfo model)
        {
            EyouSoft.Model.EnumType.TourStructure.TourType?tourType = new EyouSoft.BLL.TourStructure.Tour().GetTourType(model.TourId);

            EyouSoft.BLL.StatisticStructure.StatAllOut   statics  = new EyouSoft.BLL.StatisticStructure.StatAllOut();
            EyouSoft.Model.StatisticStructure.StatAllOut staModel = new EyouSoft.Model.StatisticStructure.StatAllOut();
            staModel.AddAmount      = model.AddAmount;
            staModel.Amount         = 0;
            staModel.CheckAmount    = 0;
            staModel.CompanyId      = model.CompanyId;
            staModel.CreateTime     = System.DateTime.Now;
            staModel.ItemId         = model.ID;
            staModel.ItemType       = EyouSoft.Model.EnumType.StatisticStructure.PaidType.地接支出;
            staModel.NotCheckAmount = 0;
            staModel.OperatorId     = model.OperatorID;
            staModel.TotalAmount    = model.Settlement;
            staModel.TourId         = model.TourId;
            staModel.SupplierName   = model.LocalTravelAgency;
            staModel.SupplierId     = model.TravelAgencyID;
            staModel.TourType       = tourType != null ? tourType.Value : EyouSoft.Model.EnumType.TourStructure.TourType.散拼计划;

            return(statics.Add(staModel));
        }
Exemple #3
0
        private void InitOutDepartStaticlist()
        {
            #region 获取表单值
            PageIndex     = Utils.GetInt(Utils.GetQueryStringValue("Page"), 1);
            RouteAreaName = Utils.GetQueryStringValue("RouteArea");
            OperatorName  = Utils.GetQueryStringValue("OperatorName");
            OperatorId    = Utils.GetQueryStringValue("OperatorId");
            StartDate     = Utils.GetDateTimeNullable(Request.QueryString["StartDate"]);
            EndDate       = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("EndDate"));
            TourType      = Utils.GetQueryStringValue("TourType");
            CompanyName   = Utils.GetQueryStringValue("CompanyName");
            isAccount     = Utils.GetQueryStringValue("IsAccount");
            #endregion

            EyouSoft.BLL.StatisticStructure.StatAllOut OutlayBll = new EyouSoft.BLL.StatisticStructure.StatAllOut(SiteUserInfo);

            #region 查询实体赋值
            EyouSoft.Model.StatisticStructure.QueryAccountAgeStatistic SearchModel = new EyouSoft.Model.StatisticStructure.QueryAccountAgeStatistic();
            SearchModel.LeaveDateStart = StartDate;
            SearchModel.LeaveDateEnd   = EndDate;
            SearchModel.CompanyId      = this.SiteUserInfo.CompanyID;
            SearchModel.SaleIds        = Utils.GetIntArray(OperatorId, ",");
            if (RouteAreaName != "" && RouteAreaName != "0")
            {
                SearchModel.AreaId = int.Parse(RouteAreaName);
            }

            if (TourType != "" && TourType != "-1")
            {
                SearchModel.TourType = (EyouSoft.Model.EnumType.TourStructure.TourType) int.Parse(TourType);
            }
            SearchModel.BuyCompanyName = CompanyName;
            #endregion

            #region 表单初始化
            this.txtStartDate.Value = StartDate.HasValue ? StartDate.Value.ToString("yyyy-MM-dd") : new DateTime(DateTime.Now.Year, 1, 1).ToString("yyyy-MM-dd");
            this.txtEndDate.Value   = EndDate.HasValue ? EndDate.Value.ToString("yyyy-MM-dd") : new DateTime(DateTime.Now.Year, 12, 31).ToString("yyyy-MM-dd");
            if (TourType != "")
            {
                this.TourTypeList1.TourType = int.Parse(TourType);
            }
            if (RouteAreaName != "")
            {
                this.RouteAreaList1.RouteAreaId = int.Parse(RouteAreaName);
            }
            this.SelectOperator.OperName = OperatorName;
            this.SelectOperator.OperId   = OperatorId;
            this.txt_com.Value           = CompanyName;
            if (isAccount == "-1")
            {
                SearchModel.IsAccount = null;
            }
            else if (isAccount == "0")
            {
                SearchModel.IsAccount = true;
            }
            else if (isAccount == "1")
            {
                SearchModel.IsAccount = false;
            }
            BindSum(SearchModel);
            if (isAccount != "")
            {
                this.drpIsAccount.SelectedValue = isAccount;
            }
            #endregion

            //调用查询方法 获取列表
            list = OutlayBll.GetList(PageSize, PageIndex, ref RecordCount, SearchModel);
            if (Utils.GetInt(Request.QueryString["IsCartogram"], 0) == 1)//异步请求统计图时不执行列表绑定
            {
                return;
            }

            #region 绑定列表
            if (list != null && list.Count != 0)
            {
                this.tbl_ExportPage.Visible            = true;
                this.crp_OutDepartStatiList.DataSource = list;
                this.crp_OutDepartStatiList.DataBind();
                BindPage();//绑定分页
            }
            else
            {
                this.tbl_ExportPage.Visible           = false;
                this.crp_OutDepartStatiList.EmptyText = "<tr bgcolor='#e3f1fc'><td colspan='4' id=\"EmptyData\" height='50px' align='center'>暂时没有数据!</td></tr>";
            }
            #endregion
        }