Ejemplo n.º 1
0
        public static string BindCity(string proId, string companyId)
        {
            StringBuilder strBul = new StringBuilder();

            if (proId != "0")
            {
                //城市BLL
                EyouSoft.BLL.CompanyStructure.City cityBll = new EyouSoft.BLL.CompanyStructure.City();
                //根据选择的省份ID,公司ID取得的结果集list
                IList <EyouSoft.Model.CompanyStructure.City> list = cityBll.GetList(Convert.ToInt32(companyId), (int?)Convert.ToInt32(proId), null);
                if (list != null && list.Count > 0)
                {
                    //遍历list将值添加到strBul
                    foreach (EyouSoft.Model.CompanyStructure.City city in list)
                    {
                        //最终要返回的值,下拉框的HTML
                        strBul.Append("<option value=\"");
                        strBul.Append(city.Id);
                        strBul.Append("\">");
                        strBul.Append(city.CityName);
                        strBul.Append("</option>");
                    }
                }
            }


            return(strBul.ToString());
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            StringBuilder strBuilder = new StringBuilder();

            strBuilder.AppendFormat("<option value=\"0\">请选择</option>");
            if (ProvinceId != 0)
            {
                EyouSoft.BLL.CompanyStructure.City           cBll = new EyouSoft.BLL.CompanyStructure.City();
                IList <EyouSoft.Model.CompanyStructure.City> list = cBll.GetList(CompanyId, ProvinceId, IsFav);

                if (list != null && list.Count > 0)
                {
                    foreach (EyouSoft.Model.CompanyStructure.City c in list)
                    {
                        if (c.Id == CityId)
                        {
                            strBuilder.AppendFormat("<option value=\"{0}\" selected=\"selected\">{1}</option>", c.Id, c.CityName);
                            continue;
                        }
                        strBuilder.AppendFormat("<option value=\"{0}\">{1}</option>", c.Id, c.CityName);
                    }
                }
            }
            cityHtml = strBuilder.ToString();
        }
Ejemplo n.º 3
0
        protected void SearchBind(EyouSoft.Model.SupplierStructure.SupplierQuery SearchModel, int Companyid)
        {
            if (SearchModel != null)
            {
                //省份下拉框
                this.ddlPro.SelectedValue = Convert.ToString(SearchModel.ProvinceId);
                EyouSoft.BLL.CompanyStructure.City cityBll = new EyouSoft.BLL.CompanyStructure.City();
                if (ddlPro.SelectedValue != "0")
                {
                    IList <EyouSoft.Model.CompanyStructure.City> list = cityBll.GetList(companyId, (int?)Convert.ToInt32(SearchModel.ProvinceId), null);
                    if (list != null && list.Count > 0)
                    {
                        for (int i = 0; i < list.Count; i++)
                        {
                            ListItem item = new ListItem();
                            item.Text  = list[i].CityName;
                            item.Value = Convert.ToString(list[i].Id);
                            this.ddlCity.Items.Add(item);
                        }
                    }
                }

                //城市下拉框
                this.ddlCity.SelectedValue = Convert.ToString(SearchModel.CityId);
                //景点名称
                this.SpotName.Text = SearchModel.UnitName;
            }
        }
Ejemplo n.º 4
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            EyouSoft.SSOComponent.Entity.UserInfo userInfo = null;
            bool _IsLogin = EyouSoft.Security.Membership.UserProvider.IsUserLogin(out userInfo);

            if (!_IsLogin)
            {
                context.Response.Write("{Islogin:false}");
                return;
            }
            StringBuilder strBuilder = new StringBuilder();

            strBuilder.AppendFormat("<option value=\"0\">请选择</option>");
            int  ProvinceId = Utils.GetInt(Utils.GetQueryStringValue("provinceId"));
            int  CompanyId  = Utils.GetInt(Utils.GetQueryStringValue("companyId"));
            int  isFav      = Utils.GetInt(Utils.GetQueryStringValue("isFav"));
            bool?IsFav      = new Nullable <bool>();

            switch (isFav)
            {
            case 1:
                IsFav = true;
                break;

            case 0:
                IsFav = false;
                break;
            }
            if (ProvinceId != 0)
            {
                EyouSoft.BLL.CompanyStructure.City           cBll = new EyouSoft.BLL.CompanyStructure.City();
                IList <EyouSoft.Model.CompanyStructure.City> list = cBll.GetList(CompanyId, ProvinceId, IsFav);

                if (list != null && list.Count > 0)
                {
                    foreach (EyouSoft.Model.CompanyStructure.City c in list)
                    {
                        strBuilder.AppendFormat("<option value=\"{0}\">{1}</option>", c.Id, c.CityName);
                    }
                }
            }
            context.Response.Write(strBuilder.ToString());
        }
Ejemplo n.º 5
0
        protected void CityDataInit(string selectIndex)
        {
            EyouSoft.BLL.CompanyStructure.City           cityBll = new EyouSoft.BLL.CompanyStructure.City();
            IList <EyouSoft.Model.CompanyStructure.City> list    = cityBll.GetList(companyId, null, true);

            if (list != null && list.Count > 0)
            {
                this.ddlOutCity.Items.Clear();
                this.ddlOutCity.Items.Add(new ListItem("-选择出港城市-", "0"));
                for (int i = 0; i < list.Count; i++)
                {
                    ListItem item = new ListItem();
                    item.Value = list[i].Id.ToString();
                    item.Text  = list[i].CityName;
                    if (selectIndex.Trim() != "" && selectIndex == list[i].Id.ToString())
                    {
                        item.Selected = true;
                    }
                    this.ddlOutCity.Items.Add(item);
                }
            }
        }
Ejemplo n.º 6
0
        protected void BindSearch(EyouSoft.Model.SupplierStructure.SupplierHotelSearchInfo searchInfo, int companyId)
        {
            if (searchInfo != null)
            {
                //省份下拉框
                this.ddlPro.SelectedValue = Convert.ToString(searchInfo.ProvinceId);
                EyouSoft.BLL.CompanyStructure.City cityBll = new EyouSoft.BLL.CompanyStructure.City();
                if (ddlPro.SelectedValue != "0")
                {
                    IList <EyouSoft.Model.CompanyStructure.City> list = cityBll.GetList(companyId, (int?)Convert.ToInt32(searchInfo.ProvinceId), null);
                    if (list != null && list.Count > 0)
                    {
                        for (int i = 0; i < list.Count; i++)
                        {
                            ListItem item = new ListItem();
                            item.Text  = list[i].CityName;
                            item.Value = Convert.ToString(list[i].Id);
                            this.ddlCity.Items.Add(item);
                        }
                    }
                }


                //城市下拉框
                this.ddlCity.SelectedValue = Convert.ToString(searchInfo.CityId);
                //星级下拉框
                if (searchInfo.Star == null)
                {
                    BindStatrs(0);
                }
                else
                {
                    BindStatrs((int)searchInfo.Star);
                }
                //酒店名称
                this.hotelName.Value = searchInfo.Name;
            }
        }
Ejemplo n.º 7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            InitTourDisplayType();

            if (!this.Page.IsPostBack)
            {
                InitBindLineType();

                //分页
                PageIndex = Utils.GetInt(Utils.GetQueryStringValue("Page"), 1);

                #region 定义变量接受参数
                //线路区域编号
                int?AreaID = Utils.GetIntNull(Utils.GetQueryStringValue("AreaID"));
                //线路名称
                string AreaName = Utils.GetQueryStringValue("AreaName");
                //开始发布时间
                DateTime?StartTime = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("StarTime"));
                //结束发布时间
                DateTime?EndTime = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("EndTime"));
                #endregion

                #region 初始化变量参数
                if (AreaID > 0)
                {
                    if (this.DDl_LineType.Items.FindByValue(AreaID.ToString()) != null)
                    {
                        this.DDl_LineType.Items.FindByValue(AreaID.ToString()).Selected = true;
                    }
                }
                if (AreaName != "")
                {
                    this.xl_XianlName.Value = AreaName.ToString();
                }
                if (StartTime != null)
                {
                    this.BeginTime.Value = Convert.ToDateTime(StartTime).ToString("yyyy-MM-dd");
                }
                if (EndTime != null)
                {
                    this.EndTime.Value = Convert.ToDateTime(EndTime).ToString("yyyy-MM-dd");
                }
                #endregion
                BindInitLineProducts(AreaID, AreaName, StartTime, EndTime);
                #region 初始化省份城市

                int cityId = 0;
                int proId  = 0;
                if (Utils.GetQueryStringValue("provinceId") == "")
                {
                    //默认为浙江省
                    proId = 67;
                    //取得浙江省下第一个城市
                    EyouSoft.BLL.CompanyStructure.City           pBll     = new EyouSoft.BLL.CompanyStructure.City();
                    IList <EyouSoft.Model.CompanyStructure.City> listCity = pBll.GetList(SiteUserInfo.CompanyID, proId, true);
                    if (listCity != null && listCity.Count > 0)
                    {
                        cityId = listCity[0].Id;
                    }
                }
                else
                {
                    cityId = Utils.GetInt(Utils.GetQueryStringValue("CityID"));
                    proId  = Utils.GetInt(Utils.GetQueryStringValue("provinceId"));
                }
                //城市ID

                CityDataInit(proId, cityId);
                #endregion
            }
        }
Ejemplo n.º 8
0
        /// <summary>
        /// 页面加载
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            pageIndex = Utils.GetInt(Utils.GetQueryStringValue("Page"), 1);

            if (!IsPostBack)
            {
                #region ajax获取省份城市
                if (Utils.GetQueryStringValue("act") == "getprovince")
                {
                    Response.Clear();
                    EyouSoft.BLL.CompanyStructure.Province           pBll         = new EyouSoft.BLL.CompanyStructure.Province();
                    IList <EyouSoft.Model.CompanyStructure.Province> listProvince = pBll.GetHasFavCityProvince(SiteUserInfo.CompanyID);
                    Response.Write(JsonConvert.SerializeObject(listProvince));
                    Response.End();
                }
                if (Utils.GetQueryStringValue("act") == "getcity")
                {
                    Response.Clear();
                    EyouSoft.BLL.CompanyStructure.City           pBll     = new EyouSoft.BLL.CompanyStructure.City();
                    IList <EyouSoft.Model.CompanyStructure.City> listCity = pBll.GetList(SiteUserInfo.CompanyID, Utils.GetInt(Utils.GetQueryStringValue("provinceId")), true);
                    Response.Write(JsonConvert.SerializeObject(listCity));
                    Response.End();
                }
                #endregion
                #region ajax修改状态 by txb 2011.8.4

                if (Request.QueryString["act"] == "changeStatus")
                {
                    EyouSoft.BLL.TourStructure.Tour bll = new Tour(SiteUserInfo);
                    int result = bll.SetTourRouteStatus((TourStructure.TourRouteStatus)Utils.GetInt(Utils.GetFormValue("status")), Utils.GetFormValue("tourid").Split(','));
                    if (result > 0)
                    {
                        Response.Write("yes");
                    }
                    else
                    {
                        Response.Write("no");
                    }
                    Response.End();
                }
                #endregion
                #region 绑定信息、列表
                if (Request.QueryString["act"] == "updatenum")
                {
                    EyouSoft.BLL.TourStructure.Tour bll = new Tour();
                    if (bll.SetTourVirtualPeopleNumber(Request["tourid"], Utils.GetInt(Request["num"])) > 0)
                    {
                        Response.Clear();
                        Response.Write("yes");
                    }
                    else
                    {
                        Response.Clear();
                        Response.Write("no");
                    }
                    Response.End();
                    return;
                }
                if (CheckGrant(TravelPermission.散拼计划_散拼计划_栏目))
                {
                    //Utils.ResponseNoPermit(TravelPermission.散拼计划_散拼计划_栏目, false);
                }
                else
                {
                    Utils.ResponseNoPermit(TravelPermission.散拼计划_散拼计划_栏目, false);
                }
                selectXianlu1.userId     = SiteUserInfo.ID;
                selectXianlu1.curCompany = CurrentUserCompanyID;
                selectXianlu1.Url        = Request.Url.ToString();
                BindList();
                #endregion
                //城市ID状态
                cityState = Utils.GetQueryStringValue("CityID");
                int cityId = 0;
                int proId  = 0;
                if (Utils.GetQueryStringValue("provinceId") == "")
                {
                    //默认为浙江省
                    proId = 67;
                    //取得浙江省下第一个城市
                    EyouSoft.BLL.CompanyStructure.City           pBll     = new EyouSoft.BLL.CompanyStructure.City();
                    IList <EyouSoft.Model.CompanyStructure.City> listCity = pBll.GetList(SiteUserInfo.CompanyID, proId, true);
                    if (listCity != null && listCity.Count > 0)
                    {
                        cityId = listCity[0].Id;
                    }
                }
                else
                {
                    cityId = Utils.GetInt(Utils.GetQueryStringValue("CityID"));
                    proId  = Utils.GetInt(Utils.GetQueryStringValue("provinceId"));
                }
                //城市ID

                CityDataInit(proId, cityId);
                string act = Utils.GetQueryStringValue("act");
                if (act.Length > 0)
                {
                    switch (act)
                    {
                    case "HandStatus":
                        string hs = Utils.GetQueryStringValue("hs");
                        if (hs.Length > 0)
                        {
                            switch (hs)
                            {
                            case "mk":
                                HandStatusUp(TourStructure.HandStatus.手动客满);
                                break;

                            case "ts":
                                HandStatusUp(TourStructure.HandStatus.手动停收);
                                break;

                            default:
                                HandStatusUp(TourStructure.HandStatus.无);
                                break;
                            }
                        }
                        break;
                    }
                }
            }
        }