Esempio n. 1
0
        /// <summary>
        /// 绑定专线下拉
        /// </summary>
        private void BindZX()
        {
            ICompanyUser companyUserBLL = EyouSoft.BLL.CompanyStructure.CompanyUser.CreateInstance();

            EyouSoft.Model.CompanyStructure.CompanyUser companyUserModel = companyUserBLL.GetModel(SiteUserInfo.ID);
            if (companyUserModel != null && companyUserModel.Area != null && companyUserModel.Area.Count > 0)
            {
                ddl_ZX.AppendDataBoundItems = true;
                ddl_ZX.DataTextField        = "AreaName";
                ddl_ZX.DataValueField       = "AreaId";
                ddl_ZX.DataSource           = companyUserModel.Area;
                ddl_ZX.DataBind();
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 显示相关专线、地接、景区
        /// </summary>
        /// <param name="selValue">初始选中项的值</param>
        /// <returns></returns>
        protected void getSelectInfo(string selValue)
        {
            if (this.SiteUserInfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.酒店))
            {
                return;
            }
            string        s          = @"<tr><td bgcolor=""#CCE8F8"" align=""right"">{0}:</td><td align=""left""><select id=""selectInfo"" name=""selectInfo""><option value=""-1"">--请选择--</option>{1}</select><input type=""hidden"" name=""selectInfoName""/></td></tr>";
            StringBuilder str        = new StringBuilder();
            StringBuilder strOptions = new StringBuilder();

            //相关专线
            if (this.SiteUserInfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.专线) || this.SiteUserInfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.地接))
            {
                //用户Id
                string UserID = string.Empty;;
                if (SiteUserInfo != null)
                {
                    EyouSoft.SSOComponent.Entity.UserInfo UserInfoModel = SiteUserInfo;

                    UserID = UserInfoModel.ID ?? "0";
                }
                ICompanyUser companyUserBLL = EyouSoft.BLL.CompanyStructure.CompanyUser.CreateInstance();
                EyouSoft.Model.CompanyStructure.CompanyUser companyUserModel = companyUserBLL.GetModel(UserID);
                List <AreaBase> lstArea = companyUserModel.Area;
                if (null != lstArea && lstArea.Count > 0)
                {
                    for (int i = 0; i < lstArea.Count; i++)
                    {
                        strOptions.AppendFormat("<option value=\"{0}|{3}\"{2}>{1}</option>", lstArea[i].AreaId, lstArea[i].AreaName, selValue == lstArea[i].AreaId.ToString() ? " selected=\"selected\"" : "", (int)lstArea[i].RouteType);//资讯的model中相关信息存的是名字
                    }
                }
                str.AppendFormat(s, "相关专线", strOptions);
            }
            //相关景区
            else if (this.SiteUserInfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.景区))
            {
                EyouSoft.BLL.ScenicStructure.BScenicArea viewBLL = new EyouSoft.BLL.ScenicStructure.BScenicArea();
                IList <MScenicArea> viewLst = viewBLL.GetList(this.SiteUserInfo.CompanyID);
                if (null != viewLst && viewLst.Count > 0)
                {
                    for (int i = 0; i < viewLst.Count; i++)
                    {
                        strOptions.AppendFormat("<option value=\"{0}\"{2}>{1}</option>", viewLst[i].ScenicId, viewLst[i].ScenicName, selValue == viewLst[i].ScenicId ? " selected=\"selected\"" : "");//资讯的model中相关信息存的是名字
                    }
                }
                str.AppendFormat(s, "相关景区", strOptions);
            }
            this.ltSelectTypeInfo.Text = str.ToString();
        }
Esempio n. 3
0
        /// <summary>
        /// 绑定线路区域
        /// </summary>
        private void BindLineArea()
        {
            //用户Id
            string UserID = string.Empty;;

            if (SiteUserInfo != null)
            {
                EyouSoft.SSOComponent.Entity.UserInfo UserInfoModel = SiteUserInfo;

                UserID = UserInfoModel.ID ?? "0";
            }
            ICompanyUser companyUserBLL = EyouSoft.BLL.CompanyStructure.CompanyUser.CreateInstance();

            EyouSoft.Model.CompanyStructure.CompanyUser companyUserModel = companyUserBLL.GetModel(UserID);
            if (companyUserModel != null && companyUserModel.Area != null && companyUserModel.Area.Count > 0)
            {
                //国内
                List <AreaBase> gn = companyUserModel.Area.Where(ty => ty.RouteType == AreaType.国内长线).ToList();
                //国际
                List <AreaBase> gj = companyUserModel.Area.Where(ty => ty.RouteType == AreaType.国际线).ToList();
                //周边
                List <AreaBase> zb = companyUserModel.Area.Where(ty => ty.RouteType == AreaType.地接线路 || ty.RouteType == AreaType.国内短线).ToList();

                if (gn != null && gn.Count > 0)
                {
                    showGN            = true;
                    rpt_gn.DataSource = gn;
                    rpt_gn.DataBind();
                }
                if (gj != null && gj.Count > 0)
                {
                    showGJ            = true;
                    rpt_gj.DataSource = gj;
                    rpt_gj.DataBind();
                }
                if (zb != null && zb.Count > 0)
                {
                    showZB            = true;
                    rpt_zb.DataSource = zb;
                    rpt_zb.DataBind();
                }
                routeSource = (RouteSource)Utils.GetInt(Utils.GetQueryStringValue("RouteSource"), 1);
            }
        }
Esempio n. 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (_setareatype == null)
                {
                    ICompanyUser companyUserBLL = EyouSoft.BLL.CompanyStructure.CompanyUser.CreateInstance();
                    EyouSoft.Model.CompanyStructure.CompanyUser companyUserModel = companyUserBLL.GetModel(UserId);
                    if (companyUserModel != null && companyUserModel.Area != null && companyUserModel.Area.Count > 0)
                    {
                        rpt_line1.DataSource = companyUserModel.Area;
                    }
                }
                else
                {
                    switch (_setareatype)
                    {
                    case AreaType.国际线:
                        rpt_line1.DataSource = EyouSoft.BLL.SystemStructure.SysArea.CreateInstance().GetSysAreaList(EyouSoft.Model.SystemStructure.AreaType.国际线);
                        break;

                    case AreaType.国内长线:
                        rpt_line1.DataSource = EyouSoft.BLL.SystemStructure.SysArea.CreateInstance().GetLongAreaSiteControl(ProvinceID);
                        break;

                    case AreaType.地接线路:
                    case AreaType.国内短线:
                    {
                        rpt_line1.DataSource = EyouSoft.BLL.SystemStructure.SysArea.CreateInstance().GetShortAreaSiteControl(SiteUserInfo_CityId);
                    }
                    break;
                    }
                }
                rpt_line1.DataBind();
                rpt_line2.DataSource = rpt_line1.DataSource;
                rpt_line2.DataBind();
                int recordCount = 0;
                //绑定同业资讯
                if (IsTongYe)
                {
                    MQueryPeerNews queryModel = new MQueryPeerNews();
                    switch (_setareatype)
                    {
                    case AreaType.国际线:
                        queryModel.AreaType = AreaType.国际线;
                        break;

                    case AreaType.国内长线:
                        queryModel.AreaType = AreaType.国内长线;
                        break;

                    case AreaType.地接线路:
                    case AreaType.国内短线:
                        queryModel.AreaType = AreaType.国内短线;
                        break;
                    }
                    IList <MPeerNews> lst = BPeerNews.CreateInstance().GetGetPeerNewsList(10, queryModel);
                    if (null != lst && lst.Count > 0)
                    {
                        this.RepList.DataSource = lst;
                        this.RepList.DataBind();
                    }
                    else
                    {
                        IsTongYe = false;
                    }
                }
            }
        }