Exemplo n.º 1
0
        /// <summary>
        /// 初始化合计信息
        /// </summary>
        private void InitHeJi()
        {
            EyouSoft.Model.StatisticStructure.AreaSoldStatSearch searchInfo = new EyouSoft.Model.StatisticStructure.AreaSoldStatSearch();
            DateTime?st       = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("st"));
            DateTime?et       = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("et"));
            int      tourType = Utils.GetInt(Utils.GetQueryStringValue("tourType"), -1);

            searchInfo.SalerIds = Utils.GetQueryStringValue("SalerId");
            searchInfo.CityIds  = Utils.GetQueryStringValue("cityId");
            EyouSoft.Model.EnumType.TourStructure.TourType?tmp = tourType < 0
                                                                      ? null
                                                                      : (EyouSoft.Model.EnumType.TourStructure.TourType?)tourType;

            EyouSoft.BLL.StatisticStructure.SoldStatistic bll = new EyouSoft.BLL.StatisticStructure.SoldStatistic();

            System.Text.StringBuilder s = new System.Text.StringBuilder();

            //if (DepartList == null)
            //{
            //    DepartList = new EyouSoft.BLL.StatisticStructure.SoldStatistic().getDepartList(SiteUserInfo.CompanyID, Year, Month);
            //}

            if (DepartList != null && DepartList.Count > 0)
            {
                foreach (var item in DepartList)
                {
                    int heJi;
                    bll.GetQuYuXiaoShouTongJiHeJi(
                        CurrentUserCompanyID, st, et, item.DepartId, searchInfo, tmp, out heJi);
                    s.AppendFormat("<td align=\"center\" bgcolor=\"#bddcf4\"><b>{0}</b></td>", heJi);
                }
            }

            ltrHeJi.Text = s.ToString();
        }
Exemplo n.º 2
0
        /// <summary>
        /// 加载组团社数据
        /// </summary>
        private void InitCustomerList()
        {
            PageIndex = Utils.GetInt(Utils.GetQueryStringValue("Page"), 1);//页码
            if (PageIndex < 1)
            {
                PageIndex = 1;
            }
            IList <EyouSoft.Model.CompanyStructure.CustomerInfo> list = null;//客户资料集合

            //客户资料排序实体
            EyouSoft.Model.CompanyStructure.MCustomerSoldStatSearchInfo Seachinfo = new EyouSoft.Model.CompanyStructure.MCustomerSoldStatSearchInfo();
            Seachinfo = SearchPara();
            list      = new EyouSoft.BLL.StatisticStructure.SoldStatistic().GetCustomers(SiteUserInfo.CompanyID, PageSize, PageIndex, ref RecordCount, Seachinfo);
            if (list != null && list.Count > 0)
            {
                double pageCount = Math.Ceiling((double)RecordCount / (double)PageSize);
                if (PageIndex > pageCount)
                {
                    PageIndex = (int)pageCount;
                }

                rptCustomer.DataSource = list;
                rptCustomer.DataBind();
                BindExportPage();
            }
            else
            {
                rptCustomer.EmptyText   = "<tr><td colspan='10' align='center'>对不起,暂无客户资料信息!</td></tr>";
                ExportPageInfo1.Visible = false;
            }

            RegisterScript(string.Format("var recordCount={0};", RecordCount));
        }
Exemplo n.º 3
0
        /// <summary>
        /// 绑定纺计数据
        /// </summary>
        private void InitSumStat()
        {
            EyouSoft.Model.CompanyStructure.MCustomerSoldStatSearchInfo Seachinfo = new EyouSoft.Model.CompanyStructure.MCustomerSoldStatSearchInfo();
            Seachinfo = SearchPara();
            Dictionary <string, int> soldStat = new EyouSoft.BLL.StatisticStructure.SoldStatistic().GetSoldStatSumInfo(SiteUserInfo.CompanyID, PageSize, PageIndex, ref RecordCount, Seachinfo);

            this.ltrSumTourNumber.Text   = soldStat["TradeTourNum"].ToString();
            this.ltrSumTradeNumber.Text  = soldStat["TradeNum"].ToString();
            this.ltrSumVistorNumber.Text = (soldStat["TradeNum"] - soldStat["TradeTourNum"]).ToString();
        }
Exemplo n.º 4
0
 /// <summary>
 /// 加载部门人数信息
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void InitDepartStat(object sender, RepeaterItemEventArgs e)
 {
     if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
     {
         System.Web.UI.WebControls.Literal ltrDepartStatInfo = (System.Web.UI.WebControls.Literal)e.Item.FindControl("ltrDepartStatInfo");
         //if (DepartList == null)
         //    DepartList = new EyouSoft.BLL.StatisticStructure.SoldStatistic().getDepartList(SiteUserInfo.CompanyID, Year, Month);
         DateTime?st       = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("st"));
         DateTime?et       = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("et"));
         int      tourType = Utils.GetInt(Utils.GetQueryStringValue("tourType"), -1);
         EyouSoft.Model.EnumType.TourStructure.TourType?tmp = tourType < 0
                                                               ? null
                                                               : (EyouSoft.Model.EnumType.TourStructure.TourType?)tourType;
         EyouSoft.Model.StatisticStructure.AreaDepartStat             row  = (EyouSoft.Model.StatisticStructure.AreaDepartStat)e.Item.DataItem;
         IList <EyouSoft.Model.StatisticStructure.AreaDepartStatInfo> list =
             new EyouSoft.BLL.StatisticStructure.SoldStatistic().getDepartStatList(
                 SiteUserInfo.CompanyID, st, et, row.CityId, row.SaleId, tmp);
         System.Text.StringBuilder tmpStr = new System.Text.StringBuilder();
         if (list.Count > 0)
         {
             foreach (EyouSoft.Model.StatisticStructure.AreaStatDepartList depart in DepartList)
             {
                 bool IsExists = true;
                 foreach (EyouSoft.Model.StatisticStructure.AreaDepartStatInfo item in list)
                 {
                     if (depart.DepartId == item.DepartId)
                     {
                         tmpStr.AppendFormat("<th width=\"80\" align=\"center\" >{0}</th>", item.TradeNumber);
                         IsExists = false;
                         break;
                     }
                 }
                 if (IsExists)
                 {
                     tmpStr.AppendFormat("<th width=\"80\" align=\"center\" >0</th>");
                 }
             }
         }
         else
         {
             for (int i = 0; i < DepartList.Count; i++)
             {
                 tmpStr.Append("<th width=\"80\" align=\"center\" >0</th>");
             }
         }
         ltrDepartStatInfo.Text = tmpStr.ToString();
     }
 }
Exemplo n.º 5
0
        /// <summary>
        /// 绑定部门列表
        /// </summary>
        private void InitDepartList()
        {
            DepartList = new List <EyouSoft.Model.StatisticStructure.AreaStatDepartList>();
            DateTime?st       = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("st"));
            DateTime?et       = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("et"));
            int      tourType = Utils.GetInt(Utils.GetQueryStringValue("tourType"), -1);

            EyouSoft.Model.EnumType.TourStructure.TourType?tmp = tourType < 0
                                                                      ? null
                                                                      : (EyouSoft.Model.EnumType.TourStructure.TourType?)tourType;

            IList <EyouSoft.Model.StatisticStructure.AreaStatDepartList> list =
                new EyouSoft.BLL.StatisticStructure.SoldStatistic().getDepartList(
                    SiteUserInfo.CompanyID, st, et, tmp);

            System.Text.StringBuilder tmpStr = new System.Text.StringBuilder();

            if (list != null && list.Count > 0)
            {
                if (CheckGrant(TravelPermission.统计分析_区域销售统计_查看全部统计数据))
                {
                    DepartList = list;
                }
                else
                {
                    foreach (EyouSoft.Model.StatisticStructure.AreaStatDepartList item in list)
                    {
                        if (item.DepartId == SiteUserInfo.DepartId)
                        {
                            DepartList.Add(item); break;
                        }
                    }
                }
            }

            if (DepartList != null && DepartList.Count > 0)
            {
                foreach (EyouSoft.Model.StatisticStructure.AreaStatDepartList item in DepartList)
                {
                    tmpStr.AppendFormat("<th width=\"80\" align=\"center\" bgcolor=\"#bddcf4\">{0}</th>", item.DepartName);
                }
            }

            list = null;
            this.ltrDepartList.Text = tmpStr.ToString();
        }
Exemplo n.º 6
0
        /// <summary>
        /// 加载列表
        /// </summary>
        private void InitAreaList()
        {
            PageIndex = Utils.GetInt(Utils.GetQueryStringValue("Page"), 1);//页码
            EyouSoft.Model.StatisticStructure.AreaSoldStatSearch searchInfo = new EyouSoft.Model.StatisticStructure.AreaSoldStatSearch();
            searchInfo.SalerIds = Utils.GetQueryStringValue("SalerId");
            searchInfo.CityIds  = Utils.GetQueryStringValue("cityId");
            IList <EyouSoft.Model.StatisticStructure.AreaDepartStat> list = new EyouSoft.BLL.StatisticStructure.SoldStatistic().getAreaStatList(SiteUserInfo.CompanyID, PageSize, PageIndex, ref RecordCount, searchInfo);

            if (list != null && list.Count > 0)
            {
                crp_AreaSoldList.DataSource = list;
                crp_AreaSoldList.DataBind();
                BindExportPage();
            }
            else
            {
                crp_AreaSoldList.EmptyText = "<tr><td colspan='10' align='center'>对不起,暂无信息!</td></tr>";
                ExportPageInfo1.Visible    = false;
            }
        }
Exemplo n.º 7
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 = SearchPara();
            var items  = new EyouSoft.BLL.StatisticStructure.SoldStatistic().GetCustomers(SiteUserInfo.CompanyID, pageSize, 1, ref recordCount, chaXun);

            System.Text.StringBuilder s = new System.Text.StringBuilder();
            if (items != null && items.Count > 0)
            {
                s.AppendFormat("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}\n", "所属区域", "组团社名称", "联系人", "联系电话", "责任销售", "团队人数", "散客人数", "合计人数");

                foreach (var item in items)
                {
                    s.AppendFormat("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}\n",
                                   item.ProvinceName + " " + item.CityName,
                                   item.Name,
                                   item.ContactName,
                                   item.Phone,
                                   item.Saler,
                                   item.TradeNum - item.TradeTourNum,
                                   item.TradeTourNum,
                                   item.TradeNum);
                }
            }

            ResponseToXls(s.ToString());
        }