/// <summary> /// 返回资讯相关链接 /// </summary> /// <param name="AreaName">区域名</param> /// <param name="AreaId">区域ID</param> /// <param name="ScenicId">景区ID</param> /// <returns></returns> protected string getInfoAboutHref(object AreaName, object AreaId, object ScenicId, object CompanyId) { string str = string.Empty; EyouSoft.BLL.CompanyStructure.CompanyInfo companyBLL = new EyouSoft.BLL.CompanyStructure.CompanyInfo(); CompanyDetailInfo companyModel = companyBLL.GetModel(Convert.ToString(CompanyId)); if (null != companyModel) { if (companyModel.CompanyRole.HasRole(CompanyType.地接) || companyModel.CompanyRole.HasRole(CompanyType.专线)) { if (!string.IsNullOrEmpty(Convert.ToString(AreaName))) { //2012-02-10 14:10信息来源:楼 链接到组团菜单中的"旅游线路库" str = string.Format(@"<a href='javascript:void(0)' onclick=""topTab.open('{0}','资讯相关',{{}})"" class='font12_grean' title='{1}'>【{1}】</a>", EyouSoft.Common.Domain.UserBackCenter + "/teamservice/linelibrarylist.aspx?lineId=" + AreaId, Utils.GetText2(Eval("AreaName").ToString(), 6, true)); } } else if (companyModel.CompanyRole.HasRole(CompanyType.景区)) { EyouSoft.Model.ScenicStructure.MScenicArea Area = new EyouSoft.BLL.ScenicStructure.BScenicArea().GetModel(Convert.ToString(ScenicId)); if (null != Area) { str = string.Format(@"<a href=""{0}"" target=""_blank"" class='font12_grean' title='{1}'>【{1}】</a>", EyouSoft.Common.Domain.UserPublicCenter + "/ScenicManage/NewScenicDetails.aspx?ScenicId=" + Area.ScenicId, Utils.GetText2(Area.ScenicName, 6, true)); } } } return(str); }
/// <summary> /// 景区供应商 /// </summary> /// <returns></returns> protected string GetSeniceCom(object strSceniceId) { if (strSceniceId == null || string.IsNullOrEmpty(strSceniceId.ToString())) { return(string.Empty); } System.Text.StringBuilder sb = new System.Text.StringBuilder(); EyouSoft.Model.ScenicStructure.MScenicArea Area = new EyouSoft.BLL.ScenicStructure.BScenicArea().GetModel(strSceniceId.ToString()); if (Area != null) { EyouSoft.Model.CompanyStructure.CompanyDetailInfo CompanyDetail = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(Area.Company.ID); if (CompanyDetail != null) { sb.Append("<a href=\"" + Utils.GetShopUrl(CompanyDetail.ID, EyouSoft.Model.CompanyStructure.CompanyType.景区, -1) + "\" target=\"_blank\">" + CompanyDetail.CompanyName + "</a>"); if (CompanyDetail.ContactInfo != null && !string.IsNullOrEmpty(CompanyDetail.ContactInfo.MQ)) { sb.Append(Utils.GetMQ(CompanyDetail.ContactInfo.MQ)); } } } return(sb.ToString()); }
/// <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(); }
protected void initData(string id) { if (string.IsNullOrEmpty(id)) { return; } IPeerNews BLL = BPeerNews.CreateInstance(); MPeerNews Model = BLL.GetPeerNews(id); if (null == Model) { return; } this.lbTitle.Text = Model.Title;//标 题 //资讯相关 EyouSoft.BLL.CompanyStructure.CompanyInfo companyBLL = new EyouSoft.BLL.CompanyStructure.CompanyInfo(); CompanyDetailInfo companyModel = companyBLL.GetModel(Model.CompanyId); if (null != companyModel) { string strAboutInfo = string.Empty; if (companyModel.CompanyRole.HasRole(CompanyType.地接) || companyModel.CompanyRole.HasRole(CompanyType.专线)) { if (!string.IsNullOrEmpty(Model.AreaName)) { //2012-02-10 14:10信息来源:楼 链接到组团菜单中的"旅游线路库" strAboutInfo = string.Format(@"<a href='javascript:void(0)' onclick=""topTab.open('{0}','资讯相关',{{}})"" class='font12_grean' title='{1}'>{1}</a>", EyouSoft.Common.Domain.UserBackCenter + "/teamservice/linelibrarylist.aspx?lineId=" + Model.AreaId, Model.AreaName); } } else if (companyModel.CompanyRole.HasRole(CompanyType.景区)) { EyouSoft.Model.ScenicStructure.MScenicArea Area = new EyouSoft.BLL.ScenicStructure.BScenicArea().GetModel(Model.ScenicId); if (null != Area) { strAboutInfo = string.Format("<a href='{0}' target='_blank'>{1}</a>", EyouSoft.Common.Domain.UserPublicCenter + "/ScenicManage/NewScenicDetails.aspx?ScenicId=" + Area.ScenicId, Area.ScenicName); } } this.lbRoute.Text = strAboutInfo.Length > 0 ? strAboutInfo : "暂无"; } this.lbCompany.Text = Model.CompanyName; //发布企业 this.lbType.Text = Convert.ToString(Model.TypeId); //类别 this.lbTime.Text = string.Format("{0:yyyy-MM-dd}", Model.IssueTime); //发布时间 this.lbContent.Text = Model.Content; //内容 IList <MPeerNewsAttachInfo> lst = Model.AttachInfo; StringBuilder strPic = new StringBuilder(); StringBuilder strFile = new StringBuilder(); if (null != lst && lst.Count > 0) { for (int i = 0; i < lst.Count; i++) { switch (lst[i].Type) { case AttachInfoType.图片: strPic.AppendFormat("<a href='{0}' title='{1}' target='_blank'>查看</a>", Domain.FileSystem + lst[i].Path, lst[i].FileName); break; case AttachInfoType.文件: strFile.AppendFormat("<a href='{0}' title='{1}' target='blank'>{2}</a>", Domain.FileSystem + lst[i].Path, lst[i].FileName, lst[i].FileName); break; } } } this.lbPic.Text = strPic.Length > 0 ? strPic.ToString() : "暂无图片"; //图片 this.lbFile.Text = strFile.Length > 0 ? strFile.ToString() : "暂无附件"; //附件下载 //点击次数加1 BLL.UpdateClickNum(id); }
//绑定页面列表 protected void BingPageList() { intPageIndex = Utils.GetInt(Request.QueryString["Page"], 1); //景区门票查询实体 EyouSoft.Model.ScenicStructure.MSearchSceniceArea SearchTicket = new EyouSoft.Model.ScenicStructure.MSearchSceniceArea(); if (Utils.GetQueryStringValue("LevelID") != "") { SearchTicket.Level = (EyouSoft.Model.ScenicStructure.ScenicLevel)Enum.Parse(typeof(EyouSoft.Model.ScenicStructure.ScenicLevel), Utils.GetQueryStringValue("LevelID")); } //景区主题 SearchTicket.ThemeId = Utils.GetIntNull(Utils.GetQueryStringValue("themeId")); //省份 SearchTicket.ProvinceId = Utils.GetIntNull(Utils.GetQueryStringValue("ProvinceId")); if (Utils.GetIntNull(Utils.GetQueryStringValue("ProvinceId")) == 0) { SearchTicket.ProvinceId = null; } //城市 SearchTicket.CityId = Utils.GetIntNull(Utils.GetQueryStringValue("CityId")); if (Utils.GetIntNull(Utils.GetQueryStringValue("CityId")) == 0) { SearchTicket.CityId = null; } //县区 SearchTicket.CountyId = Utils.GetIntNull(Utils.GetQueryStringValue("CountyID")); if (Utils.GetIntNull(Utils.GetQueryStringValue("CountyID")) == 0) { SearchTicket.CountyId = null; } //排序方式 if (Utils.GetQueryStringValue("sortType") != "") { SearchTicket.Type = Convert.ToInt32(Utils.GetQueryStringValue("sortType")); } //景区名称 SearchTicket.ScenicName = Utils.GetQueryStringValue("SceniceName"); SearchTicket.Status = EyouSoft.Model.ScenicStructure.ExamineStatus.已审核; //绑定列表 //这个到时候底层会在加一个参数----易诺景区编号(char(36))的 到时候你从webconfig中取值后传给底层 SearchTicket.YiNuo = EyouSoft.Common.ConfigModel.ConfigClass.GetConfigString("appSettings", "TongYe114SightId"); System.Collections.Generic.IList <EyouSoft.Model.ScenicStructure.MScenicArea> Ticketslist = new EyouSoft.BLL.ScenicStructure.BScenicArea().GetListAndTickets(intPageSize, intPageIndex, ref RecordCount, SearchTicket); if (Ticketslist != null && Ticketslist.Count > 0) { this.CustomRepeater1.DataSource = Ticketslist; this.CustomRepeater1.DataBind(); InitPage(); } else { this.ExportPageInfo1.Visible = false; this.lit_msg.Text = "对不起,暂时没有景区门票信息!"; } }
protected void Page_Load(object sender, EventArgs e) { // 判断用户是否登录,如果没有登录跳转到登录页面,如果有登录,初始化用户对象UserInfoModel if (!IsLogin) { EyouSoft.Security.Membership.UserProvider.RedirectLogin(Domain.UserBackCenter + "/Default.aspx"); } if (!IsPostBack) { //景区编号 string Id = Utils.GetQueryStringValue("SceniceId"); if (Id != null) { EyouSoft.Model.ScenicStructure.MScenicArea Area = new EyouSoft.BLL.ScenicStructure.BScenicArea().GetModel(Id); if (Area != null) { //景区联系人 联系电话 MQ EyouSoft.Model.CompanyStructure.CompanyUser userinfo = new EyouSoft.BLL.CompanyStructure.CompanyUser().GetModel(Area.ContactOperator); if (userinfo != null) { if (userinfo.ContactInfo != null) { this.litContact.Text = userinfo.ContactInfo.ContactName; this.litContactTel.Text = userinfo.ContactInfo.Mobile; if (!string.IsNullOrEmpty(userinfo.ContactInfo.MQ)) { this.LitContactMQ.Text = Utils.GetMQ(userinfo.ContactInfo.MQ); } } } if (Area.Company != null) { //门票编号 string ticketId = Utils.GetQueryStringValue("TicketId"); if (ticketId != "" && ticketId != null) { EyouSoft.Model.ScenicStructure.MScenicTickets Tickets = new EyouSoft.BLL.ScenicStructure.BScenicTickets().GetModel(ticketId, Area.Company.ID); if (Tickets != null) { if (Utils.GetQueryStringValue("ScenicName") != "") { this.litSceniceName.Text = Utils.GetQueryStringValue("ScenicName"); } this.litSceniceType.Text = Tickets.TypeName; this.litMSPrice.Text = Utils.FilterEndOfTheZeroDecimal(Tickets.RetailPrice); this.litYHPrices.Text = Utils.FilterEndOfTheZeroDecimal(Tickets.WebsitePrices); this.litMinSCPrice.Text = Utils.FilterEndOfTheZeroDecimal(Tickets.MarketPrice); this.litTHPrice.Text = Utils.FilterEndOfTheZeroDecimal(Tickets.DistributionPrice); this.litMinlimit.Text = Tickets.Limit.ToString(); //票价有效时间段 timeHtml = DateTimeStr(Tickets.StartTime, Tickets.EndTime); this.litNotes.Text = Tickets.SaleDescription; this.litexplain.Text = Tickets.Description; } } } } } } }