示例#1
0
        private string GetSiteInfo(int ProvinceId)
        {
            string strSiteName = "";

            TourUnion.BLL.TourUnion_UnionSites Sitebll       = new TourUnion.BLL.TourUnion_UnionSites();
            TourUnion.Account.Model.Account    operatorModel = TourUnion.Account.Factory.UserFactory.GetUserManage(TourUnion.Account.Enum.ChildSystemLocation.TourAgency, TourUnion.Account.Enum.SystemMedia.MQ).AccountUser;
            int UnionId = 0;

            if (operatorModel != null)
            {
                UnionId = operatorModel.UnionId;
            }
            DataSet ds = Sitebll.GetSiteCityProvinceAll(UnionId, false, 0);

            operatorModel = null;
            //获得当前省份下的分站信息
            DataRow[] rows = ds.Tables[0].Select(string.Format("ProvinceId={0}", ProvinceId));
            if (rows != null && rows.Length > 0)
            {
                foreach (DataRow row in rows)
                {
                    strSiteName += string.Format("<a id='{0}' href='javascript:void(0)' onclick='ChangeSiteName(this,{0},{1})' {3}>{2}</a>&nbsp;|&nbsp;", row["SiteId"].ToString(), row["CityId"].ToString(), row["SiteName"].ToString(), row["SiteId"].ToString() == SiteId.ToString() ? "style='color:Red'" : "");
                }

                strSiteName = strSiteName.Length > 0 ? strSiteName.Substring(0, strSiteName.LastIndexOf("|")) : "";
            }
            else   //cookie中所保存的分站信息在数据库中已经不存在了
            {
                WEB.ProceFlow.SiteManage.DealCookieSiteNotData();
            }
            return(strSiteName);
        }
示例#2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            TourUnion.Account.Model.UserManage usermanage    = TourUnion.Account.Factory.UserFactory.GetUserManage(TourUnion.Account.Enum.ChildSystemLocation.RouteAgency, TourUnion.Account.Enum.SystemMedia.MQ);
            TourUnion.Account.Model.Account    operatorModel = usermanage.AccountUser;
            if (operatorModel != null)
            {
                UnionId   = operatorModel.UnionId;
                CompanyId = operatorModel.CompanyId;
            }


            if (usermanage.IsGrant("271"))  //查看所有
            {
                isLookAll = true;
            }
            if (usermanage.IsGrant("244"))  //修改
            {
                isUpdate = true;
            }
            if (usermanage.IsGrant("245"))  //删除
            {
                isDelete = true;
            }
            usermanage = null;
            AreaId     = WEB.ProceFlow.ValidatorValueManage.GetIntValue(Request.QueryString["AreaId"]);


            if (isLookAll)
            {
                OperatorId = WEB.ProceFlow.ValidatorValueManage.GetIntValue(Request.QueryString["OperatorId"]);
            }
            else
            {
                OperatorId = operatorModel.Id;
            }
            operatorModel = null;
            if (!IsPostBack)
            {
                InitData();
            }
        }
示例#3
0
        /// <summary>
        ///  显示Title
        /// </summary>
        protected string GetTitle(string ClassId, string ClassName, string Id, string Title, string ToProvinceName, int ReplyCount, int ViewCount)
        {
            StringBuilder strValue = new StringBuilder();

            int    MQId = 0;
            string Md5  = "";

            if (usermanage.AccountUser != null)
            {
                MQId = usermanage.AccountUser.ContactMQ;
                Md5  = usermanage.AccountUser.MD5Password;
            }

            TourUnion.Account.Model.Account  account  = TourUnion.Account.Factory.UserFactory.GetUserManage(TourUnion.Account.Enum.ChildSystemLocation.LocalAgency, TourUnion.Account.Enum.SystemMedia.MQ).AccountUser;
            TourUnion.Account.Model.MQUrlPar mqurlpar = TourUnion.Account.Model.UserManage.MQUrlParModel;
            string UserNameParName = mqurlpar.IDMyUrlName;
            string Md5ParName      = mqurlpar.PwMyUrlName;

            mqurlpar = null;

            string url        = "/IM/LoginWeb.aspx?" + UserNameParName + "=" + MQId + "&" + Md5ParName + "=" + Md5 + "&CsToBsRedirectUrl=";
            string strUrl     = string.Empty;
            string strTypeUrl = string.Empty;

            if (account.CompanyTypeId == 3)
            {
                strUrl     = url + Server.UrlEncode("/LocalAgency/TopicManger/TopicDetails.aspx?TopicId=" + Id + "&TopicClassID=" + ClassId);
                strTypeUrl = url + Server.UrlEncode("/LocalAgency/TopicManger/TopicList.aspx?TopicClassID=" + ClassId);
            }
            else
            {
                strUrl     = url + Server.UrlEncode("/TourAgency/ExchangeTopic/TopicDetails.aspx?TopicId=" + Id);
                strTypeUrl = url + Server.UrlEncode("/TourAgency/ExchangeTopic/Default.aspx?ClassId=" + ClassId);
            }
            string strClassName = "";

            if (TopicClassId > -1)  //无需显示话题类型
            {
                if (ClassId == "4") //显示城市
                {
                    strValue.AppendFormat("<a href=\"javascript:void(0);\"  class=\"hds-3\" >[{0}]</a> <a href=\"{1}\"  title='" + Title + "' target=\"_blank\">{2}</a>", ToProvinceName, strUrl, Title);
                }
                else
                {
                    strValue.AppendFormat("<a href=\"{0}\"  title='" + Title + "' target=\"_blank\">{1}</a>", strUrl, Title);
                }
            }
            else  //显示话题类型
            {
                TourUnion.Cache.Interaction cache = new TourUnion.Cache.Interaction();
                IList <TourUnion.Model.Interaction.CategoryInfo> modelList = cache.GetCategorys();
                foreach (TourUnion.Model.Interaction.CategoryInfo model in modelList)
                {
                    if (model.CategoryId.ToString() == ClassId)
                    {
                        strClassName = model.CategoryStyle;
                        break;
                    }
                }
                modelList = null;

                //显示话题类别
                strValue.AppendFormat("<a href=\"javascript:void(0);\"  class=" + strClassName + " onclick=\"ChangeCss({1});GetTopicList(0,{1},false);\">[{0}]</a>", ClassName, ClassId);
                //显示话题标题
                strValue.AppendFormat("<a href=\"{0}\"  title='" + Title + "' target=\"_blank\">{1}</a>", strUrl, Title);
            }
            strValue.AppendFormat("<span>{0}/{1}</span>", ReplyCount, ViewCount);
            strValue.AppendFormat(" <a href=\"{0}\"  target=\"_blank\">[回复]</a>", strUrl + Server.UrlEncode("&reply=1#replytopic"));
            account = null;
            return(strValue.ToString());
        }