Example #1
0
 /// <summary>
 /// 创建IBLL实例对象
 /// </summary>
 /// <returns></returns>
 public static EyouSoft.IBLL.CompanyStructure.ICompanyArea CreateInstance()
 {
     EyouSoft.IBLL.CompanyStructure.ICompanyArea op = null;
     if (op == null)
     {
         op = EyouSoft.Component.Factory.ComponentFactory.Create <EyouSoft.IBLL.CompanyStructure.ICompanyArea>();
     }
     return(op);
 }
Example #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string method = Utils.GetQueryStringValue("method");

            if (!CheckGrant(TravelPermission.营销工具_同业名录))
            {
                Utils.ResponseNoPermit();
                return;
            }
            EyouSoft.Model.CompanyStructure.CompanyDetailInfo companyModel = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(SiteUserInfo.CompanyID);
            if (companyModel != null)
            {
                SiteUserComLev = companyModel.CompanyLev;
            }

            //是否开通收费MQ
            //if (!companyModel.StateMore.CompanyService.IsServiceAvailable(EyouSoft.Model.CompanyStructure.SysService.MQ))
            //{
            //    Server.Transfer("/SystemSet/ApplyMQ.aspx?iscustomer=yes&" + StringValidate.BuildUrlString(Request.QueryString, new string[] { }), false);
            //    return;
            //}
            if (method == "setMyCustomer")//设置为我的客户
            {
                if (!haveUpdate)
                {
                    Utils.ResponseMeg(false, "对不起,你没有改权限!");
                    return;
                }
                myCustomerBll = EyouSoft.BLL.CompanyStructure.MyCustomer.CreateInstance();
                SetMyCustomer();
                myCustomerBll = null;
                return;
            }

            //获取查询条件
            int    province    = Utils.GetInt(Utils.InputText(Server.UrlDecode(Request.QueryString["province"] ?? ""))); //省份ID
            int    city        = Utils.GetInt(Utils.InputText(Server.UrlDecode(Request.QueryString["city"] ?? "")));     //城市ID
            string companyName = Utils.InputText(Server.UrlDecode(Request.QueryString["companyname"] ?? ""));            //公司名
            string admin       = Utils.InputText(Server.UrlDecode(Request.QueryString["admin"] ?? ""));                  //负责人
            string brand       = Utils.InputText(Server.UrlDecode(Request.QueryString["brand"] ?? ""));                  //品牌

            EyouSoft.Model.CompanyStructure.QueryParamsCompany query = new EyouSoft.Model.CompanyStructure.QueryParamsCompany();
            query.CityId       = city;
            query.PorvinceId   = province;
            query.CompanyBrand = brand;
            query.CompanyName  = companyName;
            query.ContactName  = admin;
            //当前页码
            pageIndex = Utils.GetInt(Request.QueryString["Page"], 1);
            //获取我的客户
            cityBll        = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance();
            provinceBll    = EyouSoft.BLL.SystemStructure.SysProvince.CreateInstance();
            companyAreaBll = EyouSoft.BLL.CompanyStructure.CompanyArea.CreateInstance();
            IList <EyouSoft.Model.CompanyStructure.CompanyInfo> allCustomerList = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetListTravelAgency(query, pageSize, pageIndex, ref recordCount);

            if (allCustomerList != null && allCustomerList.Count > 0)
            {
                alc_rpt_customers.DataSource = allCustomerList;
                alc_rpt_customers.DataBind();
                BindPage(province, city, companyName, admin, brand);//设置分页
            }
            else
            {
                alc_rpt_customers.EmptyText  = "<tr><td style='text-align:center'>暂无客户信息</td></tr>";
                this.ExportPageInfo1.Visible = false;
            }
            //清理对象
            allCustomerList = null;
            cityBll         = null;
            provinceBll     = null;

            //恢复查询条件
            ac_pc.SetProvinceId     = province;
            ac_pc.SetCityId         = city;
            ac_txtAdmin.Value       = admin;
            ac_txtBrand.Value       = brand;
            ac_txtCompanyName.Value = companyName;
        }