Пример #1
0
        /// <summary>
        /// 根据城市编号返回城市名  如果是中国,则返回“省名-城市名”,否则返回国家名
        /// </summary>
        protected string getCityName(object o, object countryId)
        {
            string str      = string.Empty;
            int    nationId = 0;

            Int32.TryParse(Convert.ToString(countryId), out nationId);
            if (nationId != 0)
            {
                if (nationId == 224)
                {
                    if (!string.IsNullOrEmpty(Convert.ToString(o)))
                    {
                        //列表MODEL中没有城市名
                        EyouSoft.BLL.SystemStructure.SysCity   BLL   = new EyouSoft.BLL.SystemStructure.SysCity();
                        EyouSoft.Model.SystemStructure.SysCity Model = BLL.GetSysCityModel(Utils.GetInt(o.ToString()));
                        if (null != Model)
                        {
                            str = string.IsNullOrEmpty(Model.ProvinceName)?"":Model.ProvinceName + "-" + Model.CityName;
                        }
                    }
                }
                else
                {
                    //返回国家名
                    EyouSoft.BLL.SystemStructure.BSysCountry   nationBLL   = new EyouSoft.BLL.SystemStructure.BSysCountry();
                    EyouSoft.Model.SystemStructure.MSysCountry nationModel = nationBLL.GetCountry(nationId);
                    if (null != nationModel)
                    {
                        str = string.Format("{0}({1})", nationModel.CName, nationModel.EnName);
                    }
                }
            }
            return(str);
        }
Пример #2
0
        protected string ShowEditeInfo(string AreaId, string RouteType)
        {
            string returnVal = "";

            EyouSoft.Model.SystemStructure.SysCity cityModel = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance().GetSysCityModel(CityID);
            if (cityModel != null)
            {
                IList <EyouSoft.Model.SystemStructure.SysCityArea> cityAreaList = cityModel.CityAreaControls;
                if (cityAreaList != null && cityAreaList.Count > 0)
                {
                    foreach (EyouSoft.Model.SystemStructure.SysCityArea model in cityAreaList)
                    {
                        if (model.AreaId == int.Parse(AreaId) && model.RouteType.ToString() == RouteType)
                        {
                            if (model.IsDefaultShow == true)
                            {
                                return(returnVal = string.Format("<span class='fonth'>跳至<input name='textfield222' type='text' class='textfield' size='1' value='{0}' />位</span><input name='cbk_IsShowIndex' type='checkbox' id='cbk_IsShowIndex' checked/>首页</span>", model.SortId.ToString()));
                            }
                            else
                            {
                                return(returnVal = string.Format("<span class='fonth'>跳至<input name='textfield222' type='text' class='textfield' size='1' value='{0}' />位</span><input name='cbk_IsShowIndex' type='checkbox' id='cbk_IsShowIndex'/>首页</span>", model.SortId.ToString()));
                            }
                        }
                    }
                }
            }
            //释放资源
            cityModel = null;
            return(returnVal = "<span class='fonth'>跳至<input name='textfield222' type='text' class='textfield' size='1' value='' />位</span><input name='cbk_IsShowIndex' type='checkbox' id='cbk_IsShowIndex'/>首页</span>");
        }
Пример #3
0
        /// <summary>
        /// 获取公司地址根据相应id
        /// </summary>
        /// <param name="provinceid">省id</param>
        /// <param name="cityid">市id</param>
        /// <param name="countryid">县id</param>
        /// <returns></returns>
        public string GetCompanyAddress(string provinceid, string cityid, string countryid)
        {
            string result = string.Empty;
            int    proid  = Convert.ToInt32(provinceid);
            int    ctid   = Convert.ToInt32(cityid);
            int    cyid   = Convert.ToInt32(countryid);

            EyouSoft.Model.SystemStructure.SysProvince       proviceModel = EyouSoft.BLL.SystemStructure.SysProvince.CreateInstance().GetProvinceModel(proid);
            EyouSoft.Model.SystemStructure.SysCity           cityModel    = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance().GetSysCityModel(ctid);
            EyouSoft.Model.SystemStructure.SysDistrictCounty countyModel  = EyouSoft.BLL.SystemStructure.SysDistrictCounty.CreateInstance().GetModel(cyid);
            if (proviceModel != null)
            {
                result = proviceModel.ProvinceName + " ";
            }
            if (cityModel != null)
            {
                result += cityModel.CityName + " ";
            }
            if (countyModel != null)
            {
                result += countyModel.DistrictName;
            }

            return(result);
        }
Пример #4
0
        protected void LoadUserInfo(int userId)
        {
            EyouSoft.Model.SystemStructure.SystemUser userModel = userBll.GetSystemUserModel(userId);
            us_txtFax.Value       = userModel.ContactFax;
            us_txtMoible.Value    = userModel.ContactMobile;
            us_txtRealName.Value  = userModel.ContactName;
            us_txtTel.Value       = userModel.ContactTel;
            us_txtUserName1.Value = userModel.UserName;
            us_txtUserName1.Attributes.Add("readonly", "readonly");
            userPermitList = userModel.PermissionList;//账户权限
            userTypes      = userModel.CustomerTypeIds;
            //获取账户负责区域列表
            EyouSoft.IBLL.SystemStructure.ISysCity cityBll = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance();

            StringBuilder areaBuilder = new StringBuilder();

            if (userModel.AreaId != null)
            {
                foreach (int areaId in userModel.AreaId)
                {
                    EyouSoft.Model.SystemStructure.SysCity cityModel = cityBll.GetSysCityModel(areaId);
                    areaBuilder.Append(string.Format("<input type='checkbox' checked='checked' id='ckSale_{0}' name='ckSellCity' value='{0}' /><label for='ckSale_{0}'>{1}</label>", areaId.ToString(), cityModel != null ? cityModel.CityName : "暂无"));
                }
            }
            areaHTML = areaBuilder.ToString();
            //绑定类别
        }
Пример #5
0
        /// <summary>
        /// 取得某热点城市网站地图
        /// </summary>
        /// <param name="intCityId">城市ID</param>
        protected void GetURL(int intCityId)
        {
            EyouSoft.Model.SystemStructure.SysCity Model = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance().GetSysCityModel(intCityId);

            IList <EyouSoft.Model.SystemStructure.SysCityArea> AreaList1 = new List <EyouSoft.Model.SystemStructure.SysCityArea>();
            IList <EyouSoft.Model.SystemStructure.SysCityArea> AreaList2 = new List <EyouSoft.Model.SystemStructure.SysCityArea>();
            IList <EyouSoft.Model.SystemStructure.SysCityArea> AreaList3 = new List <EyouSoft.Model.SystemStructure.SysCityArea>();

            if (Model != null)
            {
                IList <EyouSoft.Model.SystemStructure.SysCityArea> Citylist = Model.CityAreaControls;
                if (Citylist != null && Citylist.Count > 0)
                {
                    foreach (EyouSoft.Model.SystemStructure.SysCityArea list in Citylist)
                    {
                        if (list.IsDefaultShow)
                        {
                            if (list.RouteType == EyouSoft.Model.SystemStructure.AreaType.国内长线)
                            {
                                AreaList1.Add(list);
                            }
                            if (list.RouteType == EyouSoft.Model.SystemStructure.AreaType.国际线)
                            {
                                AreaList2.Add(list);
                            }
                            if (list.RouteType == EyouSoft.Model.SystemStructure.AreaType.国内短线)
                            {
                                AreaList3.Add(list);
                            }
                        }
                    }
                }
                Citylist = null;
            }
            Model         = null;
            strRouteList1 = "";
            strRouteList2 = "";
            strRouteList3 = "";
            foreach (EyouSoft.Model.SystemStructure.SysCityArea item in AreaList1)
            {
                //根据规则生成新的线路的URL
                strRouteList1 += string.Format("<a href=\"" + EyouSoft.Common.URLREWRITE.Tour.GetTourAreaUrl(item.AreaId, intCityId) + "\">{0}</a> ", item.AreaName);
            }
            foreach (EyouSoft.Model.SystemStructure.SysCityArea item in AreaList2)
            {
                //根据规则生成新的线路的URL
                strRouteList2 += string.Format("<a href=\"" + EyouSoft.Common.URLREWRITE.Tour.GetTourAreaUrl(item.AreaId, intCityId) + "\">{0}</a> ", item.AreaName);
            }
            foreach (EyouSoft.Model.SystemStructure.SysCityArea item in AreaList3)
            {
                //根据规则生成新的线路的URL
                strRouteList3 += string.Format("<a href=\"" + EyouSoft.Common.URLREWRITE.Tour.GetTourAreaUrl(item.AreaId, intCityId) + "\">{0}</a> ", item.AreaName);
            }

            AreaList1 = null;
            AreaList2 = null;
            AreaList3 = null;
        }
Пример #6
0
        protected void rptList_ItemCreated(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemIndex != -1)
            {
                EyouSoft.Model.CompanyStructure.SupplierInfo model = e.Item.DataItem as EyouSoft.Model.CompanyStructure.SupplierInfo;
                if (model != null)
                {
                    //电话
                    Panel pnlTelPhone = e.Item.FindControl("pnlTelPhone") as Panel;
                    //传真
                    Panel pnlFax = e.Item.FindControl("pnlFax") as Panel;
                    //联系人名
                    Panel pnlContact = e.Item.FindControl("pnlContact") as Panel;

                    //添加城市
                    Label lblCity = e.Item.FindControl("lblCity") as Label;
                    //添加省份
                    Label lblProvince = e.Item.FindControl("lblProvince") as Label;

                    EyouSoft.Model.SystemStructure.SysCity     cityModel = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance().GetSysCityModel(model.CityId);
                    EyouSoft.Model.SystemStructure.SysProvince provModel = EyouSoft.BLL.SystemStructure.SysProvince.CreateInstance().GetProvinceModel(model.ProvinceId);

                    if (cityModel != null)
                    {
                        lblCity.Text = cityModel.CityName;
                    }
                    if (provModel != null)
                    {
                        lblProvince.Text = provModel.ProvinceName;
                    }

                    if (model.State.CompanyService.IsServiceAvailable(EyouSoft.Model.CompanyStructure.SysService.HighShop))
                    {
                        //添加联系信息
                        Label lblTelPhone = new Label();
                        lblTelPhone.Text = "电&nbsp;&nbsp;话:<span class=\"hong\">" + model.ContactInfo.Tel + "</span>";
                        pnlTelPhone.Controls.Add(lblTelPhone);
                        //添加传真
                        Label lblFax = new Label();
                        lblFax.Text = "传&nbsp;&nbsp;真:<span class=\"hong\">" + model.ContactInfo.Fax + "</span>";
                        pnlFax.Controls.Add(lblFax);

                        //添加联系人名
                        Label lblName = new Label();
                        lblName.Text = "联系人:" + model.ContactInfo.ContactName + "";
                        pnlContact.Controls.Add(lblName);
                    }
                    else
                    {
                        pnlTelPhone.Controls.Clear();
                        pnlFax.Controls.Clear();
                        pnlContact.Controls.Clear();
                    }
                }
            }
        }
Пример #7
0
        /// <summary>
        /// 绑定数据列表
        /// </summary>
        protected void BindListInfo()
        {
            int intRecordCount = 0;
            int ProvinceId     = Utils.GetInt(Request.QueryString["ProvinceID"], 0);
            int S_CityID       = Utils.GetInt(Request.QueryString["S_CityID"], 0);

            if (ProvinceId == 0)
            {
                //页面第一次加载的时候会根据销售城市绑定列表数据
                EyouSoft.Model.SystemStructure.SysCity cityModel = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance().GetSysCityModel(CityId);
                S_CityID = CityId;
                if (cityModel != null)
                {
                    ProvinceId = cityModel.ProvinceId;
                }
            }
            string CompanyName = Utils.InputText(Server.UrlDecode(Request.QueryString["CompanyName"])).Trim();

            #region 初始化查询条件
            this.ProvinceAndCityList1.SetProvinceId = Utils.GetInt(Request.QueryString["ProvinceID"], 0);
            this.ProvinceAndCityList1.SetCityId     = Utils.GetInt(Request.QueryString["S_CityID"], 0);;
            this.txt_CompanyName.Text = CompanyName;
            #endregion

            CurrencyPage = Utils.GetInt(Request.QueryString["Page"], 1);
            //实例化类的对象
            EyouSoft.IBLL.CompanyStructure.ISupplierInfo         Ibll      = EyouSoft.BLL.CompanyStructure.SupplierInfo.CreateInstance();
            IList <EyouSoft.Model.CompanyStructure.SupplierInfo> ModelList = Ibll.GetList(intPageSize, CurrencyPage, ref intRecordCount, CompanyName, ProvinceId, S_CityID, EyouSoft.Model.CompanyStructure.BusinessProperties.车队);
            if (ModelList != null && ModelList.Count > 0)
            {
                //绑定数据源
                this.rpt_CarListInfo.DataSource = ModelList;
                this.rpt_CarListInfo.DataBind();
                //绑定分页控件
                if (EyouSoft.Common.URLREWRITE.UrlReWriteUtils.IsReWriteUrl(Request))
                {
                    this.ExporPageInfoSelect1.Placeholder  = "#PageIndex#";
                    this.ExporPageInfoSelect1.IsUrlRewrite = true;
                    this.ExporPageInfoSelect1.PageLinkURL  = EyouSoft.Common.URLREWRITE.UrlReWriteUtils.GetUrlForPage(Request) + "_#PageIndex#";
                }
                else
                {
                    this.ExporPageInfoSelect1.PageLinkURL = Request.ServerVariables["SCRIPT_NAME"].ToString() + "?";
                    this.ExporPageInfoSelect1.UrlParams   = Request.QueryString;
                }
                this.ExporPageInfoSelect1.intPageSize          = intPageSize;//每页显示记录数
                this.ExporPageInfoSelect1.intRecordCount       = intRecordCount;
                this.ExporPageInfoSelect1.CurrencyPage         = CurrencyPage;
                this.ExporPageInfoSelect1.CurrencyPageCssClass = "RedFnt";

                this.ExporPageInfoSelect1.LinkType = 3;
            }
            //释放资源
            ModelList = null;
            Ibll      = null;
        }
Пример #8
0
        /// <summary>
        /// 获取城市名称
        /// </summary>
        /// <param name="ProvinceId"></param>
        /// <returns></returns>
        private string GetCityName(int CityId)
        {
            string Result = "";

            EyouSoft.Model.SystemStructure.SysCity model = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance().GetSysCityModel(CityId);
            if (model != null)
            {
                Result = model.CityName;
            }
            return(Result);
        }
Пример #9
0
        protected void LoadRouteOrder(string tourId)
        {
            tourModel = tourBll.GetTourInfo(tourId);

            if (tourModel != null)
            {
                //是否隐藏下订单按钮
                if (tourBll.IsDeleted(tourId))
                {
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), Guid.NewGuid().ToString(), "<script>;alert('该团队不存在!');if(window.parent.Boxy.getIframeDialog){window.parent.Boxy.getIframeDialog('" + Request.QueryString["iframeId"] + "').hide();}else{window.close();}</script>");
                    return;
                }
                if (tourModel.TourState == EyouSoft.Model.TourStructure.TourState.收客 && tourModel.RemnantNumber > 0)
                {
                    ro_SaveOrder.Visible = true;
                }
                else if (tourModel.TourState != EyouSoft.Model.TourStructure.TourState.收客)
                {
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), Guid.NewGuid().ToString(), "<script>;alert('该团队已停收!');</script>");
                }
                else if (tourModel.RemnantNumber == 0)
                {
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), Guid.NewGuid().ToString(), "<script>;alert('该团队人数已满!');</script>");
                }
                parentId = tourModel.ParentTourID;//获取模板团编号
            }
            else
            {
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), Guid.NewGuid().ToString(), "<script>;alert('该团队不存在!');if(window.parent.Boxy.getIframeDialog){window.parent.Boxy.getIframeDialog('" + Request.QueryString["iframeId"] + "').hide();}else{window.close();}</script>");
                return;
            }

            routeName = tourModel.RouteName;//线路名称
            startDate = tourModel.LeaveDate.ToString("yyyy-MM-dd");
            weekDay   = EyouSoft.Common.Utils.ConvertWeekDayToChinese(tourModel.LeaveDate);
            remain    = tourModel.RemnantNumber; //剩余人数

            company = tourModel.CompanyName;     //公司名称
            contant = tourModel.TourContact;     //团队负责人
            tel     = tourModel.TourContactTel;
            MQ      = tourModel.TourContacMQ;
            int cityId = tourModel.LeaveCity;//出港城市ID

            ro_traffic.Value = tourModel.LeaveTraffic;
            EyouSoft.Model.SystemStructure.SysCity cityModel = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance().GetSysCityModel(cityId);
            if (cityModel != null)
            {
                leaveCity = cityModel.CityName;//获取出港城市名
            }
            //绑定报价类型   leaveCity
            EyouSoft.IBLL.SystemStructure.ISysCity cityBll = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance();
            ro_rpt_priceList.DataSource = tourModel.TourPriceDetail;
            ro_rpt_priceList.DataBind();
        }
Пример #10
0
        protected void Apply_MQ()
        {
            if (!IsCompanyCheck)
            {
                Utils.ResponseMeg(false, "对不起,你尚未审核通过!");
                return;
            }
            string companyId    = SiteUserInfo.CompanyID;
            string applyContact = Utils.GetFormValue("contact");
            string tel          = Utils.GetFormValue("tel");
            string mobile       = Utils.GetFormValue("mobile");
            string address      = Utils.GetFormValue("address");

            EyouSoft.Model.SystemStructure.SysApplyServiceInfo serviceInfo = new EyouSoft.Model.SystemStructure.SysApplyServiceInfo();
            serviceInfo.ApplyServiceType = EyouSoft.Model.CompanyStructure.SysService.MQ;
            serviceInfo.ApplyTime        = DateTime.Now;
            serviceInfo.CityId           = SiteUserInfo.CityId;
            EyouSoft.Model.SystemStructure.SysCity cityModel = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance().GetSysCityModel(SiteUserInfo.CityId);
            if (cityModel != null)
            {
                serviceInfo.CityName = cityModel.CityName;
            }
            serviceInfo.CompanyId      = SiteUserInfo.CompanyID;
            serviceInfo.CompanyName    = SiteUserInfo.CompanyName;
            serviceInfo.ContactAddress = address;
            serviceInfo.ContactMobile  = mobile;
            serviceInfo.ContactMQ      = SiteUserInfo.ContactInfo.MQ;
            serviceInfo.ContactName    = applyContact;
            serviceInfo.ContactQQ      = SiteUserInfo.ContactInfo.QQ;
            serviceInfo.ContactTel     = tel;
            serviceInfo.UserId         = SiteUserInfo.ID;
            EyouSoft.Model.SystemStructure.SysProvince provinceModel = EyouSoft.BLL.SystemStructure.SysProvince.CreateInstance().GetProvinceModel(SiteUserInfo.ProvinceId);
            if (provinceModel != null)
            {
                serviceInfo.ProvinceName = provinceModel.ProvinceName;
            }
            serviceInfo.ProvinceId = SiteUserInfo.ProvinceId;
            if (!applyBll.IsApply(SiteUserInfo.CompanyID, EyouSoft.Model.CompanyStructure.SysService.MQ))
            {
                if (applyBll.Apply(serviceInfo))
                {
                    Utils.ResponseMegSuccess();
                }
                else
                {
                    Utils.ResponseMeg(false, "申请失败!");
                }
            }
            else
            {
                Utils.ResponseMeg(false, "你已经提交过申请!");
            }
        }
Пример #11
0
        /// <summary>
        ///  获取省份城市名称
        /// </summary>
        /// <param name="CityId"></param>
        /// <returns></returns>
        protected string GetProCityName(int CityId)
        {
            string returnVal = "";

            //实例化类的对象
            EyouSoft.IBLL.SystemStructure.ISysCity cbll   = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance();
            EyouSoft.Model.SystemStructure.SysCity cModel = cbll.GetSysCityModel(CityId);
            if (cModel != null)
            {
                returnVal = cModel.ProvinceName + " " + cModel.CityName;
            }
            //释放资源
            cModel = null;
            cbll   = null;
            return(returnVal);
        }
Пример #12
0
        /// <summary>
        /// 绑定数据列表
        /// </summary>
        protected void BindListInfo()
        {
            int intRecordCount = 0;
            int ProvinceId     = Utils.GetInt(Request.QueryString["ProvinceID"], 0);
            int S_CityID       = Utils.GetInt(Request.QueryString["S_CityID"], 0);

            if (ProvinceId == 0)
            {
                //页面第一次加载的时候会根据销售城市绑定列表数据
                EyouSoft.Model.SystemStructure.SysCity cityModel = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance().GetSysCityModel(CityId);
                S_CityID = CityId;
                if (cityModel != null)
                {
                    ProvinceId = cityModel.ProvinceId;
                }
            }
            string CompanyName = Utils.InputText(Server.UrlDecode(Request.QueryString["CompanyName"])).Trim();

            #region 初始化查询条件
            this.ProvinceAndCityList1.SetProvinceId = Utils.GetInt(Request.QueryString["ProvinceID"], 0);
            this.ProvinceAndCityList1.SetCityId     = Utils.GetInt(Request.QueryString["S_CityID"], 0);
            this.txt_CompanyName.Text = CompanyName;
            #endregion

            CurrencyPage = Utils.GetInt(Request.QueryString["Page"], 1);
            //实例化类的对象
            EyouSoft.IBLL.CompanyStructure.ISupplierInfo         Ibll      = EyouSoft.BLL.CompanyStructure.SupplierInfo.CreateInstance();
            IList <EyouSoft.Model.CompanyStructure.SupplierInfo> ModelList = Ibll.GetList(intPageSize, CurrencyPage, ref intRecordCount, CompanyName, ProvinceId, S_CityID, EyouSoft.Model.CompanyStructure.BusinessProperties.购物店);
            if (ModelList != null && ModelList.Count > 0)
            {
                //绑定数据源
                this.rpt_CarListInfo.DataSource = ModelList;
                this.rpt_CarListInfo.DataBind();
                //绑定分页控件
                this.ExporPageInfoSelect1.intPageSize          = intPageSize;//每页显示记录数
                this.ExporPageInfoSelect1.intRecordCount       = intRecordCount;
                this.ExporPageInfoSelect1.CurrencyPage         = CurrencyPage;
                this.ExporPageInfoSelect1.CurrencyPageCssClass = "RedFnt";
                this.ExporPageInfoSelect1.UrlParams            = Request.QueryString;
                this.ExporPageInfoSelect1.PageLinkURL          = "ShoppingListPage.aspx?";
                this.ExporPageInfoSelect1.LinkType             = 3;
            }
            //释放资源
            ModelList = null;
            Ibll      = null;
        }
Пример #13
0
        protected string GetProAndCity(int pId, int cId)
        {
            string strCity = "";
            string strPro  = "";

            EyouSoft.Model.SystemStructure.SysCity     city     = cityBll.GetSysCityModel(cId);
            EyouSoft.Model.SystemStructure.SysProvince province = provinceBll.GetProvinceModel(pId);
            if (city != null)
            {
                strCity = city.CityName;
            }
            if (province != null)
            {
                strPro = province.ProvinceName;
            }
            return(strPro + "-" + strCity);
        }
Пример #14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            MQPage page = this.Page as MQPage;

            ImageServerUrl = page.ImageServerUrl;
            if (!IsPostBack)
            {
                EyouSoft.Model.SystemStructure.SysCity model = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance().GetSysCityModel(CityId);
                if (model != null)
                {
                    ProvinceName = model.ProvinceName;
                    SiteName     = model.CityName;
                    ProvinceId   = model.ProvinceId;
                }
                model = null;
            }
            InitData();
        }
Пример #15
0
        /// <summary>
        /// 初始化线路区域
        /// </summary>
        private void InitAreas()
        {
            string output = "var cityAreas={0};";

            EyouSoft.Model.SystemStructure.SysCity cityInfo = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance().GetSysCityModel(SiteUserInfo.CityId);

            if (cityInfo != null && cityInfo.CityAreaControls != null)
            {
                var cityAreas = cityInfo.CityAreaControls.Select((tmp, index) => new { AreaId = tmp.AreaId, AreaName = tmp.AreaName, AreaType = (int)tmp.RouteType });

                if (cityAreas != null)
                {
                    output = string.Format(output, Newtonsoft.Json.JsonConvert.SerializeObject(cityAreas));
                }
            }

            this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), Guid.NewGuid().ToString(), output, true);
        }
Пример #16
0
 protected void InitArea(string AreaID)
 {
     EyouSoft.Model.SystemStructure.SysArea AreaModel = new EyouSoft.BLL.SystemStructure.SysArea().GetSysAreaModel(Convert.ToInt32(Utils.GetQueryStringValue("AreaID")));
     if (AreaModel != null)
     {
         this.txtAreaName.Text = AreaModel.AreaName;
         if (AreaModel.VisitCity != null && AreaModel.VisitCity.Count > 0)
         {
             for (int i = 0; i < AreaModel.VisitCity.Count; i++)
             {
                 if (AreaModel.VisitCity[i].CountryId == 0)    //国内
                 {
                     if (AreaModel.VisitCity[i].CountyId == 0) //选择城市没有选择县区
                     {
                         EyouSoft.Model.SystemStructure.SysCity CityModel = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance().GetSysCityModel(AreaModel.VisitCity[i].CityId);
                         if (CityModel != null)
                         {
                             strAreaCityHtml += "<input type=\"checkbox\" value=\"" + AreaModel.VisitCity[i].ProvinceId + "," + AreaModel.VisitCity[i].CityId + "\"  checked=\"checked\" name=\"cbxCity\"/>" + CityModel.CityName + "&nbsp";
                         }
                         this.hidProACityID.Value += AreaModel.VisitCity[i].CityId + ",";
                     }
                     else //选择县区
                     {
                         EyouSoft.Model.SystemStructure.SysDistrictCounty County = EyouSoft.BLL.SystemStructure.SysDistrictCounty.CreateInstance().GetModel(AreaModel.VisitCity[i].CountyId);
                         if (County != null)
                         {
                             strAreaCityHtml += "<input type=\"checkbox\"  checked=\"checked\" value=\"" + AreaModel.VisitCity[i].ProvinceId + "," + AreaModel.VisitCity[i].CityId + "," + AreaModel.VisitCity[i].CountyId + "\" name=\"cbxCounty\"/>" + County.DistrictName + "&nbsp";
                         }
                         this.hidProACityACounID.Value += AreaModel.VisitCity[i].CountyId + ",";
                     }
                 }
                 else //国际
                 {
                     EyouSoft.Model.SystemStructure.MSysCountry CountryModel = EyouSoft.BLL.SystemStructure.BSysCountry.CreateInstance().GetCountry(AreaModel.VisitCity[i].CountryId);
                     if (CountryModel != null)
                     {
                         strAreaCityHtml += "<input type=\"checkbox\" value=\"" + (int)CountryModel.Continent + "," + AreaModel.VisitCity[i].CountryId + "\"  checked=\"checked\" name=\"cbxCity\"/>" + CountryModel.CName + "&nbsp";
                     }
                     this.hidProACityID.Value += AreaModel.VisitCity[i].CountryId + ",";
                 }
             }
         }
     }
 }
Пример #17
0
        /// <summary>
        /// 分站URL改写
        /// </summary>
        public static string CityUrlRewrite(int cityId)
        {
            if (cityId == 362)
            {
                return(Domain.UserPublicCenter + "/hangzhou");
            }
            EyouSoft.IBLL.SystemStructure.ISysCity Citybll = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance();

            EyouSoft.Model.SystemStructure.SysCity model = Citybll.GetSysCityModel(cityId);

            if (model != null)
            {
                return(Domain.UserPublicCenter + "/" + model.RewriteCode);
            }
            else
            {
                return(Domain.UserPublicCenter + "/");
            }
        }
Пример #18
0
        private void InitAreas()
        {
            EyouSoft.Model.SystemStructure.SysCity cityInfo = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance().GetSysCityModel(362);
            string output = string.Empty;

            if (cityInfo != null && cityInfo.CityAreaControls != null)
            {
                var cityAreas = cityInfo.CityAreaControls.Select((tmp, index) => new { AreaId = tmp.AreaId, AreaName = tmp.AreaName, AreaType = (int)tmp.RouteType });

                if (cityAreas != null)
                {
                    output = EyouSoft.Common.SerializationHelper.ConvertJSON <List <EyouSoft.Model.SystemStructure.SysCityArea> >(cityInfo.CityAreaControls.ToList());
                }

                //JavaScriptSerializer a = new JavaScriptSerializer();
                //output = a.Serialize(cityAreas);
            }

            Response.Write(output);
        }
Пример #19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            RequestCityID = Utils.GetInt(Request.QueryString["RequestCityID"], 0); //目的地地接社所在城市
            SaleCityID    = CityId;
            ProvinceID    = Utils.GetInt(Request.QueryString["ProvinceID"], 0);    //目的地接社所在省份
            strURL        = Utils.GeneratePublicCenterUrl("/RouteManage/LocalAgencyList.aspx?ProvinceID=" + ProvinceID + "&RequestCityID=" + RequestCityID, CityId);
            if (!Page.IsPostBack)
            {
                InitCityList();

                InitLocalAgencyList();
            }

            //如果 地接社所在城市 条件 不为空,则显示 城市名称
            //如果 地接社所在城市条件 为空,则显示 所在省份名称
            string placeName = string.Empty;//地名

            if (RequestCityID != 0)
            {
                EyouSoft.Model.SystemStructure.SysCity tmpCityModel = null;
                EyouSoft.IBLL.SystemStructure.ISysCity bll          = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance();
                tmpCityModel = bll.GetSysCityModel(RequestCityID);
                if (tmpCityModel != null)
                {
                    placeName = tmpCityModel.CityName;
                }
            }
            else if (ProvinceID != 0)
            {
                EyouSoft.Model.SystemStructure.SysProvince tmpProModel = null;
                EyouSoft.IBLL.SystemStructure.ISysProvince proBll      = EyouSoft.BLL.SystemStructure.SysProvince.CreateInstance();
                tmpProModel = proBll.GetProvinceModel(ProvinceID);
                if (tmpProModel != null)
                {
                    placeName = tmpProModel.ProvinceName;
                }
            }

            //根据 地名 格式化 页面标题
            this.Page.Title = string.Format("{0}地接社_{0}地接电话_{0}旅行社大全", placeName);
        }
Пример #20
0
        public static string CityUrlRewrite(EyouSoft.Model.SystemStructure.SysCity cityModel)
        {
            string url = string.Empty;

            if (cityModel.CityId == 362)
            {
                url = Domain.UserPublicCenter + "/hangzhou";
                return(url);
            }

            if (cityModel != null)
            {
                return(Domain.UserPublicCenter + "/" + cityModel.RewriteCode);
            }
            else
            {
                return(Domain.UserPublicCenter + "/");
            }

            return(url);
        }
Пример #21
0
        //短线
        protected string GetShortAgencyCount(string AreaID)
        {
            int    num       = 0;
            string returnVal = "";

            EyouSoft.Model.SystemStructure.SysCity cityModel = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance().GetSysCityModel(CityID);
            if (cityModel != null)
            {
                Dictionary <int, IList <string> > dicData = cityModel.AreaAdvNum;
                if (dicData != null && dicData.ContainsKey(int.Parse(AreaID)) && dicData[int.Parse(AreaID)] != null)
                {
                    num = dicData[int.Parse(AreaID)].Count;
                }
            }
            //释放资源
            cityModel = null;
            string linkUrl = "RouteAgencyList.aspx?CityID=" + CityID.ToString() + "&RouteAreaId=" + AreaID;

            returnVal = string.Format("<a href='javascript:void(0);' style='cursor: pointer' onclick='openDialog(\"{0}\");return false;'>{1}</a>", linkUrl, num.ToString());
            return(returnVal);
        }
Пример #22
0
        private string[] AreaIdList = null;    //该城市下所拥有的线路区域
        #endregion

        #region 页面加载
        protected void Page_Load(object sender, EventArgs e)
        {
            //权限验证
            YuYingPermission[] parms = { YuYingPermission.平台管理_管理该栏目, YuYingPermission.平台管理_城市管理 };
            if (!CheckMasterGrant(parms))
            {
                Utils.ResponseNoPermit(YuYingPermission.平台管理_城市管理, true);
                return;
            }
            // 通过城市ID获得已经拥有的线路区域的id
            CityID     = Utils.GetInt(Request.QueryString["CityID"]);
            ProvinceID = Utils.GetInt(Request.QueryString["ProvinceID"]);
            EyouSoft.Model.SystemStructure.SysCity cityModel = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance().GetSysCityModel(CityID);
            string tmpAreaIdList = "";

            if (cityModel != null)
            {
                if (cityModel.CityAreaControls != null)
                {
                    IList <EyouSoft.Model.SystemStructure.SysCityArea> areList = cityModel.CityAreaControls;
                    if (areList != null && areList.Count > 0)
                    {
                        foreach (EyouSoft.Model.SystemStructure.SysCityArea model in areList)
                        {
                            tmpAreaIdList += model.AreaId + ",";
                        }
                    }
                    areList = null;
                }
                if (tmpAreaIdList != "")
                {
                    tmpAreaIdList = tmpAreaIdList.Substring(0, tmpAreaIdList.Length - 1);
                    AreaIdList    = tmpAreaIdList.Split(",".ToCharArray());
                }
            }
            //释放资源
            cityModel = null;
            //初始化信息绑定
            BindTourAreaList(CityID, ProvinceID);
        }
Пример #23
0
        /// <summary>
        /// 绑定线路区域
        /// </summary>
        /// <returns></returns>
        protected void BindRouteArea()
        {
            EyouSoft.Model.SystemStructure.SysCity model  = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance().GetSysCityModel(CityId);
            EyouSoft.IBLL.AdvStructure.IAdv        advBll = EyouSoft.BLL.AdvStructure.Adv.CreateInstance();
            #region 国内长线
            IList <EyouSoft.Model.AdvStructure.AdvInfo> inAdvList = advBll.GetNotFillAdvs(CityId, EyouSoft.Model.AdvStructure.AdvPosition.国内长线5张logo图片);
            IEnumerable <EyouSoft.Model.SystemStructure.SysCityArea> inAreaList = model.CityAreaControls.Where(i => i.RouteType == EyouSoft.Model.SystemStructure.AreaType.国内长线 && i.IsDefaultShow == true).OrderBy(p => p.SortId);
            inAreaHtml = GetAreaHtml(inAdvList, inAreaList, 0);
            #endregion

            #region 国际长线
            IList <EyouSoft.Model.AdvStructure.AdvInfo> outAdvList = advBll.GetNotFillAdvs(CityId, EyouSoft.Model.AdvStructure.AdvPosition.国际长线5张logo图片);
            IEnumerable <EyouSoft.Model.SystemStructure.SysCityArea> outAreaList = model.CityAreaControls.Where(i => i.RouteType == EyouSoft.Model.SystemStructure.AreaType.国际线 && i.IsDefaultShow == true).OrderBy(p => p.SortId);
            outAreaHtml = GetAreaHtml(outAdvList, outAreaList, 1);
            #endregion

            #region 周边线路
            IList <EyouSoft.Model.AdvStructure.AdvInfo> sideAdvList = advBll.GetNotFillAdvs(CityId, EyouSoft.Model.AdvStructure.AdvPosition.周边长线5张logo图片);
            IEnumerable <EyouSoft.Model.SystemStructure.SysCityArea> sideAreaList = model.CityAreaControls.Where(i => i.RouteType == EyouSoft.Model.SystemStructure.AreaType.国内短线 && i.IsDefaultShow == true).OrderBy(p => p.SortId);
            sideAreaHtml = GetAreaHtml(sideAdvList, sideAreaList, 2);
            #endregion
        }
Пример #24
0
        /// <summary>
        /// 获得指定城市ID的城市信息集合
        /// </summary>
        /// <param name="items">城市ID集合</param>
        public IList <EyouSoft.Model.SystemStructure.CityBase> GetCityList(IList <EyouSoft.Model.SystemStructure.CityBase> items)
        {
            //从缓存中获取省份ID,省份名称,城市名称
            if (items != null && items.Count > 0)
            {
                int count = items.Count;
                EyouSoft.Model.SystemStructure.SysCity cityModel = null;
                for (int index = 0; index < count; index++)
                {
                    cityModel = GetSysCityModel(items[index].CityId);
                    if (cityModel != null)
                    {
                        items[index].CityName     = cityModel.CityName;
                        items[index].ProvinceId   = cityModel.ProvinceId;
                        items[index].ProvinceName = cityModel.ProvinceName;
                    }
                }
                cityModel = null;
            }

            return(items);
        }
Пример #25
0
        /// <summary>
        /// 初始化在线服务
        /// </summary>
        public void InitOlServer()
        {
            SeniorOnlineShop.master.SeniorShop cMaster = (SeniorOnlineShop.master.SeniorShop) this.Master;
            if (cMaster != null)
            {
                lbCompanyName.Text = cMaster.DetailCompanyInfo.CompanyName;
            }
            cMaster = null;

            string Remote_IP = StringValidate.GetRemoteIP();

            EyouSoft.Model.SystemStructure.CityBase cityModel = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance().GetClientCityByIp(Remote_IP);
            if (cityModel != null)
            {
                EyouSoft.Model.SystemStructure.SysCity thisCityModel = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance().GetSysCityModel(cityModel.CityId);
                if (thisCityModel != null)
                {
                    lbGuestInfo.Text = string.Format("欢迎您来自{0}省{1}市的朋友有什么可以帮助您的吗?", thisCityModel.ProvinceName, thisCityModel.CityName);
                }
                thisCityModel = null;
            }
            cityModel = null;
        }
Пример #26
0
        /// <summary>
        /// 获的当前销售城市
        /// </summary>
        protected void GetCity()
        {
            FrontPage page = this.Page as FrontPage;

            CityId       = page.CityId;
            strReturnUrl = Domain.UserPublicCenter + "/ToCutCity.aspx?" + Domain.UserPublicCenter + "/Default.aspx" + Request.ServerVariables["SCRIPT_NAME"];
            if (CityId > 0)
            {
                DefaultUrl += "?CityId=" + CityId;
                Parms       = "?CityId=" + CityId;
            }

            EyouSoft.Model.SystemStructure.SysCity Model = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance().GetSysCityModel(CityId);
            if (Model != null)
            {
                labCityName.Text = Model.CityName;
            }
            else
            {
                labCityName.Text = "全国";
            }
            Model = null;
        }
Пример #27
0
        protected void rptLocalAgencyList_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                EyouSoft.Model.CompanyStructure.CompanyInfo model   = (EyouSoft.Model.CompanyStructure.CompanyInfo)e.Item.DataItem;
                System.Web.UI.HtmlControls.HtmlImage        imgLogo = (System.Web.UI.HtmlControls.HtmlImage)e.Item.FindControl("imgLogo");

                if (AttachList != null && AttachList.Count > 0)
                {
                    foreach (EyouSoft.Model.CompanyStructure.CompanyAttachInfo AttachModel in AttachList)
                    {
                        if (AttachModel.CompanyId == model.ID)
                        {
                            imgLogo.Src = Utils.GetNewImgUrl(AttachModel.CompanyLogo.ImagePath, 3);
                            break;
                        }
                    }
                }
                System.Web.UI.WebControls.Label        lblCityName = (System.Web.UI.WebControls.Label)e.Item.FindControl("lblCityName");
                EyouSoft.Model.SystemStructure.SysCity cityModel   = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance().GetSysCityModel(model.CityId);
                if (cityModel != null)
                {
                    lblCityName.Text = cityModel.CityName;
                }
                cityModel = null;

                System.Web.UI.WebControls.Literal ltrContactInfo = (System.Web.UI.WebControls.Literal)e.Item.FindControl("ltrContactInfo");
                StringBuilder str = new StringBuilder();
                if (model.ContactInfo != null)
                {
                    str.AppendFormat("<td>联系人:<strong>{0}</strong></td>", model.ContactInfo.ContactName);
                    str.AppendFormat("<td><strong>电&nbsp;&nbsp;话:</strong><span class=\"hong\">{0}</span></td>", model.ContactInfo.Tel);
                    str.AppendFormat("<td>传&nbsp;&nbsp;真:<span class=\"hong\">{0}</span></td>", model.ContactInfo.Fax);
                }
                ltrContactInfo.Text = str.ToString();
            }
        }
Пример #28
0
        protected void BindRouteCheckList()
        {
            FrontPage page = this.Page as FrontPage;

            ImageServerPath = page.ImageServerUrl;
            int CityId = page.CityId;

            EyouSoft.Model.SystemStructure.SysCity Model = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance().GetSysCityModel(CityId);
            if (Model != null)
            {
                IList <EyouSoft.Model.SystemStructure.SysCityArea> Citylist = Model.CityAreaControls;
                strRouteList1 += "<ul style='clear:both;'>";
                strRouteList2 += "<ul style='clear:both;'>";
                strRouteList3 += "<ul style='clear:both;'>";
                foreach (EyouSoft.Model.SystemStructure.SysCityArea item in Citylist)
                {
                    if (item.RouteType == EyouSoft.Model.SystemStructure.AreaType.国内长线)
                    {
                        strRouteList1 += string.Format("<li style='float:left;width:25%; line-height:20px;color:#074387'><input name=\"checkRouteGC\" type=\"checkbox\" value=\"{1}\" />{0}", Utils.GetText2(item.AreaName, 5, false), item.AreaId);
                    }
                    else if (item.RouteType == EyouSoft.Model.SystemStructure.AreaType.国际线)
                    {
                        strRouteList2 += string.Format("<li style='float:left;width:25%; color:#074387 line-height:20px%;'><input name=\"checkRouteGJ\" type=\"checkbox\" value=\"{1}\" />{0}", Utils.GetText2(item.AreaName, 5, false), item.AreaId);
                    }
                    else if (item.RouteType == EyouSoft.Model.SystemStructure.AreaType.国内短线)
                    {
                        strRouteList3 += string.Format("<li style='float:left;width:25%; color:#074387 line-height:20px%;'><input name=\"checkRouteGD\" type=\"checkbox\" value=\"{1}\" />{0}", Utils.GetText2(item.AreaName, 5, false), item.AreaId);
                    }
                }
                strRouteList1 += "</li></ul>";
                strRouteList2 += "</li></ul>";
                strRouteList3 += "</li></ul>";
                Citylist       = null;
            }
            Model = null;
        }
Пример #29
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //获取页面参数
            CityID = Utils.GetInt(Request.QueryString["CityID"]);

            #region 初始化绑定数据
            EyouSoft.Model.SystemStructure.SysCity cityModel = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance().GetSysCityModel(CityID);
            if (cityModel != null)
            {
                IList <EyouSoft.Model.SystemStructure.SysCityArea> cityAreaList = cityModel.CityAreaControls;
                if (cityAreaList != null && cityAreaList.Count > 0)
                {
                    this.dl_GNLongRouteList.DataSource = cityAreaList.Where(Item => (Item.RouteType == EyouSoft.Model.SystemStructure.AreaType.国内长线)).ToList();
                    this.dl_GNLongRouteList.DataBind();
                    this.dl_GNShortRouteList.DataSource = cityAreaList.Where(Item => (Item.RouteType == EyouSoft.Model.SystemStructure.AreaType.国内短线)).ToList();
                    this.dl_GNShortRouteList.DataBind();
                    this.dl_OutRouteList.DataSource = cityAreaList.Where(Item => (Item.RouteType == EyouSoft.Model.SystemStructure.AreaType.国际线)).ToList();;
                    this.dl_OutRouteList.DataBind();
                }
            }
            //释放资源
            cityModel = null;
            #endregion
        }
Пример #30
0
        /// <summary>
        /// 景区搜索结果列表页
        /// 功能:显示查询以后获得景区的列表
        /// 创建人:戴银柱
        /// 创建时间: 2010-07-23
        /// </summary>

        /// <summary>
        /// 景区搜索结果列表页
        /// 功能:显示查询以后获得景区的列表
        /// 修改人:方琪
        /// 修改时间: 2011-11-21
        /// </summary>
        protected void Page_Load(object sender, EventArgs e)
        {
            //获取查询的关键字的值
            string searchVal = Server.UrlDecode(EyouSoft.Common.Utils.GetString(Request.QueryString["searchVal"], ""));

            if (searchVal == "")
            {
                this.textfield.Value = "输入景点关键字";
            }
            else
            {
                this.textfield.Value = searchVal;
            }
            //获取查询的城市ID
            int cid = EyouSoft.Common.Utils.GetInt(Request.QueryString["cid"], 0);

            this.hidCityList.Value = cid.ToString();
            //获得查询的省份ID
            int pid = EyouSoft.Common.Utils.GetInt(Request.QueryString["pid"], 0);

            this.hidProvinceList.Value = pid.ToString();
            //获得查询的主题ID
            int tid = EyouSoft.Common.Utils.GetInt(Request.QueryString["tid"], 0);

            this.hidThemeList.Value = tid.ToString();
            if (!IsPostBack)
            {
                ScenicAdvBannerSecond();
                //设置导航栏
                this.CityAndMenu1.HeadMenuIndex = 5;
                //获取当前页
                pageIndex = Utils.GetInt(Request.QueryString["Page"], 1);
                //设置景区右侧用户控件的值
                this.ViewRightControl1.Cid = this.CityId;
                //本周最热景点
                this.NewAttrControl1.TopNum     = 9;
                this.NewAttrControl1.ProvinceId = pid < 1 ? null : (int?)pid;
                //特价景区门票

                this.TicketsControl1.TopNum     = 10;
                this.TicketsControl1.ProvinceId = pid < 1 ? null : (int?)pid;
                //绑定主题
                if (pid != 0)
                {
                    BindProvince(pid);
                    BindCity(pid, cid);
                }
                if (cid != 0 && pid == 0)
                {
                    EyouSoft.Model.SystemStructure.SysCity cityModel = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance().GetSysCityModel(cid);
                    pid = cityModel.ProvinceId;
                    BindProvince(pid);
                    BindCity(pid, cid);
                }
                if (cid == 0 && pid == 0)
                {
                    BindProvince(pid);
                }
                BindTheme(tid);

                DataInitBySearch(searchVal, pid, cid, tid);

                this.Title = GetPageTietle();
                if (!string.IsNullOrEmpty(SceniceNameList) && SceniceNameList.Length > 0)
                {
                    AddMetaTag("description", "同业114景区频道,包含" + ProvinceName + CityName + "旅游景点信息,旅游景点联系方式.包括热门旅游目的地,热门旅游景点,旅游风景区推荐, 景点门票" + SceniceNameList.Substring(0, SceniceNameList.Length - 1));
                }
                AddMetaTag("keywords", "景点大全,景点门票,旅游景点,景点门票价格,旅游风景区,特价门票,旅游景点门票预定,门票预定");
            }
        }