Пример #1
0
        protected void BindSelectList()
        {
            //设置数据的查询条件
            EyouSoft.Model.CompanyStructure.QueryParamsCompanyBase query = new EyouSoft.Model.CompanyStructure.QueryParamsCompanyBase();
            query.AreaId = AreaId;
            query.CityId = cityID;
            IList <EyouSoft.Model.CompanyStructure.CompanyInfo> CompanyList = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetListCityAreaAdvRouteAgencyName(query);

            if (CompanyList != null && CompanyList.Count > 0 && CompanyList.Count < 7)
            {
                this.dalSelectList.DataSource = CompanyList;
                this.dalSelectList.DataBind();
            }
            //释放资源
            CompanyList = null;
        }
Пример #2
0
        /// <summary>
        /// 初始化批发商列表
        /// </summary>
        private void InitCompanys()
        {
            this.InitFavors();

            int pageSize    = 20;
            int pageIndex   = Utils.GetInt(Request.QueryString["Page"], 1);
            int recordCount = 0;

            EyouSoft.Model.CompanyStructure.QueryParamsCompanyBase query = new EyouSoft.Model.CompanyStructure.QueryParamsCompanyBase();

            query.AreaId      = Utils.GetInt(Request.QueryString["AreaId"], 0);
            query.CompanyName = Utils.InputText(Request.QueryString["CompanyName"]);
            query.CityId      = SiteUserInfo.CityId;

            EyouSoft.IBLL.CompanyStructure.ICompanyInfo bll = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance();
            var items = bll.GetListRouteAgency(query, pageSize, pageIndex, ref recordCount);
            var obj   = new { html = string.Empty, pageSize = pageSize, pageIndex = pageIndex, recordCount = recordCount };

            if (items != null && items.Count > 0)
            {
                StringBuilder html = new StringBuilder();
                html.Append(@"<table width=""210"" border=""0"" cellpadding=""0"" align=""center"" cellspacing=""1"" bgcolor=""#eeeeee"" > ");

                foreach (EyouSoft.Model.CompanyStructure.CompanyInfo tmp in items)
                {
                    html.Append("<tr>");
                    html.Append(this.GetstrCompany(tmp.ID, tmp.CompanyName, tmp.ContactInfo.ContactName, tmp.ContactInfo.Tel, tmp.ContactInfo.Mobile));
                    html.Append("</tr>");
                }

                html.Append("</table>");

                obj = new { html = html.ToString(), pageSize = pageSize, pageIndex = pageIndex, recordCount = recordCount };
            }

            bll = null;

            Response.Clear();
            Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(obj));
            Response.End();
        }
Пример #3
0
        /// <summary>
        /// 获的销售城市/线路区域下的批发商列表
        /// </summary>
        /// <param name="CityId">销售城市ID</param>
        /// <param name="TourAreaId">线路区域ID</param>
        protected string  GetAllCompanyList(int CityId, int TourAreaId, string keys)
        {
            int recordCount = 0;

            EyouSoft.Model.CompanyStructure.QueryParamsCompanyBase SearchModel = new EyouSoft.Model.CompanyStructure.QueryParamsCompanyBase();
            SearchModel.CityId      = CityId;
            SearchModel.AreaId      = TourAreaId;
            SearchModel.CompanyName = keys;
            IList <EyouSoft.Model.CompanyStructure.CompanyInfo> CompanyList = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetListRouteAgency(SearchModel, 10, 1, ref recordCount);
            StringBuilder strAllCompany = new StringBuilder();

            if (CompanyList != null && CompanyList.Count > 0)
            {
                foreach (EyouSoft.Model.CompanyStructure.CompanyInfo item in CompanyList)
                {
                    strAllCompany.Append(item.CompanyName + "\n");
                }
            }
            SearchModel = null;
            CompanyList = null;
            return(strAllCompany.ToString());
        }
Пример #4
0
 private void BindCompanyList()
 {
     //销售城市编号
     int SaleCityID = Utils.GetInt(Request.QueryString["EditSiteId"]);
     int AreaId = Utils.GetInt(Request.QueryString["AreaId"]);
     EyouSoft.Model.CompanyStructure.QueryParamsCompanyBase query = new EyouSoft.Model.CompanyStructure.QueryParamsCompanyBase();
     query.AreaId =AreaId;
     query.CityId =SaleCityID;
     IList<EyouSoft.Model.CompanyStructure.CompanyInfo> CompanyList = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetListCityAreaAdvRouteAgencyName(query); 
     if (CompanyList != null && CompanyList.Count > 0)
     {
         //绑定数据源
         this.CompanyList.DataSource = CompanyList;
         this.CompanyList.DataBind();
     }
     else
     {
         this.NoData.Visible = true;
     }
     //释放资源
     CompanyList = null;
 }
Пример #5
0
        /// <summary>
        /// 绑定该线路区域下面的批发商
        /// </summary>
        protected void BindList()
        {
            //根据公司名称查询数据
            string CompanyName = Server.UrlDecode(Utils.InputText(Request.QueryString["kw"]));

            EyouSoft.Model.CompanyStructure.QueryParamsCompanyBase query = new EyouSoft.Model.CompanyStructure.QueryParamsCompanyBase();
            query.AreaId      = AreaId;
            query.CityId      = 0;
            query.CompanyName = CompanyName;
            CurrencyPage      = Utils.GetInt(Request.QueryString["Page"], 1);
            //获取数据集
            IList <EyouSoft.Model.CompanyStructure.CompanyInfo> comList = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetListRouteAgency(query, intPageSize, CurrencyPage, ref RecordCount);

            if (comList != null && comList.Count > 0)
            {
                //绑定数据源
                this.CompanyList.DataSource = comList;
                this.CompanyList.DataBind();
                comList = null;
            }
            //释放资源
            comList = null;
        }