protected void Page_Load(object sender, EventArgs e) { if (!CheckGrant(TravelPermission.系统设置_权限管理)) { Utils.ResponseNoPermit(); return; } if (!CheckGrant(TravelPermission.系统设置_权限管理, TravelPermission.系统设置_子账户管理)) { haveUpdate = false; } EyouSoft.Model.CompanyStructure.CompanyDetailInfo companyModel = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(SiteUserInfo.CompanyID); //是否开通收费MQ //if (!companyModel.StateMore.CompanyService.IsServiceAvailable(EyouSoft.Model.CompanyStructure.SysService.MQ)) //{ // Server.Transfer("/SystemSet/ApplyMQ.aspx"); // return; //} EyouSoft.Model.CompanyStructure.CompanySetting comSeting = EyouSoft.BLL.CompanyStructure.CompanySetting.CreateInstance().GetModel(SiteUserInfo.CompanyID); if (comSeting != null) { SonUserNumLimit = comSeting.OperatorLimit; } //是否开通专线,如果开通则显示专线区域列 if (SiteUserInfo.CompanyRole.RoleItems.Contains(EyouSoft.Model.CompanyStructure.CompanyType.专线)) { isArea = true; } sonUserBll = EyouSoft.BLL.CompanyStructure.CompanyUser.CreateInstance(); pageIndex = Utils.GetInt(Request.QueryString["Page"], 1); itemIndex = (pageIndex - 1) * pageSize + 1; string method = Utils.GetFormValue("method"); if (method == "del")//删除子账户 { if (!haveUpdate) { Utils.ResponseMeg(false, "对不起,你没有该权限!"); return; } DelSonUser(); return; } if (method == "setforbid")//设置用户状态 { if (!haveUpdate) { Utils.ResponseMeg(false, "对不起,你没有该权限!"); return; } SetForbid(); return; } userName = SiteUserInfo.UserName; LoadSonUserList();//绑定子账户列表 }
/// <summary> /// 获得单位设置实体 /// </summary> /// <param name="companyid">公司ID</param> /// <returns></returns> public virtual EyouSoft.Model.CompanyStructure.CompanySetting GetModel(string companyid) { //若数据库中无记录,则返回默认值 EyouSoft.Model.CompanyStructure.CompanySetting model = new EyouSoft.Model.CompanyStructure.CompanySetting(); model.CompanyId = companyid; DbCommand dc = this._database.GetSqlStringCommand(SQL_CompanySetting_SELECT_Model); this._database.AddInParameter(dc, "CompanyId", DbType.AnsiStringFixedLength, companyid); using (IDataReader rdr = DbHelper.ExecuteReader(dc, this._database)) { while (rdr.Read()) { string key = rdr.IsDBNull(rdr.GetOrdinal("FieldName")) == true ? "" : rdr.GetString(rdr.GetOrdinal("FieldName")); string value = rdr.IsDBNull(rdr.GetOrdinal("FieldValue")) == true ? "0" : rdr.GetString(rdr.GetOrdinal("FieldValue")); switch (key) { case "FirstMenu": model.FirstMenu = (EyouSoft.Model.CompanyStructure.MenuSection)Convert.ToInt32(value); break; case "OrderRefresh": model.OrderRefresh = Convert.ToInt32(value); break; case "TourStopTime": model.TourStopTime = Convert.ToInt32(value); break; case "OperatorLimit": model.OperatorLimit = Convert.ToInt32(value); break; case "PositionInfo": model.PositionInfo = new EyouSoft.Model.ShopStructure.PositionInfo(); string[] strArr = value.Split(','); if (strArr == null || strArr.Length < 2) { break; } model.PositionInfo.Longitude = double.Parse(strArr[0]); model.PositionInfo.Latitude = double.Parse(strArr[1]); if (strArr.Length == 3) { model.PositionInfo.ZoomLevel = int.Parse(strArr[2]); } break; } } } return(model); }
/// <summary> /// 修改单位设置 /// </summary> /// <param name="model">单位设置实体</param> /// <returns></returns> public virtual bool Update(EyouSoft.Model.CompanyStructure.CompanySetting model) { DbCommand dc = this._database.GetStoredProcCommand("proc_CompanySetting_Update"); this._database.AddInParameter(dc, "CompanyId", DbType.AnsiStringFixedLength, model.CompanyId); this._database.AddInParameter(dc, "FirstMenu", DbType.Int32, Convert.ToInt32(model.FirstMenu)); this._database.AddInParameter(dc, "OrderRefresh", DbType.Int32, model.OrderRefresh); this._database.AddInParameter(dc, "TourStopTime", DbType.Int32, model.TourStopTime); int rows = DbHelper.RunProcedureWithResult(dc, this._database); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 修改单位设置[暂不开放该方法] /// </summary> /// <param name="model">单位设置实体</param> /// <returns></returns> private bool Update(EyouSoft.Model.CompanyStructure.CompanySetting model) { return(idal.Update(model)); }
protected void Page_Load(object sender, EventArgs e) { //是否登录 if (!IsLogin) { EyouSoft.Security.Membership.UserProvider.RedirectLoginOpenTopPage("/Default.aspx", "对不起,你尚未登录!"); return; } if (!CheckGrant(TravelPermission.系统设置_子账户管理, TravelPermission.系统设置_权限管理)) { Utils.ResponseNoPermit(); return; } sonUserBll = EyouSoft.BLL.CompanyStructure.CompanyUser.CreateInstance(); string method = Utils.GetQueryStringValue("method"); if (method == "checkAccount") { IsIn(); return; } string id = Utils.GetQueryStringValue("sonuserid"); if (id != "") { sonUserModel = sonUserBll.GetModel(id); } if (!Page.IsPostBack) { haveArea = SiteUserInfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.专线); if (id == "" || method == "copy") { sus_txtNewPassword1.Attributes.Add("valid", "required|limit"); sus_txtNewPassword1.Attributes.Add("errmsg", "请填写密码|密码长度为6-16个字符"); sus_txtNewPassword1.Attributes.Add("custom", "SonUserSet.checkPass"); sus_txtNewPassword1.Attributes.Add("min", "6"); sus_txtNewPassword1.Attributes.Add("max", "16"); } else { sus_txtNewPassword1.Attributes.Add("valid", "limit"); sus_txtNewPassword1.Attributes.Add("errmsg", "密码长度为6-16个字符"); sus_txtNewPassword1.Attributes.Add("custom", "SonUserSet.checkPass"); sus_txtNewPassword1.Attributes.Add("min", "6"); sus_txtNewPassword1.Attributes.Add("max", "16"); } BindDepartAndRole(); //绑定部门和角色 BindManageArea(); //绑定经营区域 if (method == "update" || method == "copy") //如果是修改或复制则加载初始数据 { LoadSonUser(method); } } if (Page.IsPostBack) { //获取子账户经营区域 List <EyouSoft.Model.SystemStructure.AreaBase> areaList = new List <EyouSoft.Model.SystemStructure.AreaBase>(); var keyList = Request.Form.AllKeys.Where(key => key.Contains("checkbox_Area_")); foreach (string k in keyList) { EyouSoft.Model.SystemStructure.AreaBase area = new EyouSoft.Model.SystemStructure.AreaBase(); area.AreaId = int.Parse(Utils.GetFormValue(k)); areaList.Add(area); } if (method == "update")//修改子账户 { UpdateSonUser(areaList); } if (method == "add" || method == "copy")//添加子账户 { int SonUserNumLimit = 0; IList <EyouSoft.Model.CompanyStructure.CompanyUser> sonUserList = sonUserBll.GetList(SiteUserInfo.CompanyID, 1, 1, ref recordCount); EyouSoft.Model.CompanyStructure.CompanySetting comSeting = EyouSoft.BLL.CompanyStructure.CompanySetting.CreateInstance().GetModel(SiteUserInfo.CompanyID); if (comSeting != null) { SonUserNumLimit = comSeting.OperatorLimit; } //if (recordCount == SonUserNumLimit) //{ // Page.ClientScript.RegisterClientScriptBlock(this.GetType(), Guid.NewGuid().ToString(), "<script>;alert('对不起,你只能建"+SonUserNumLimit+"个账户!');if(window.parent.Boxy){window.parent.Boxy.getIframeDialog('" + Request.QueryString["iframeId"] + "').hide();}else{window.close();}</script>"); // return; //} AddSonUser(areaList); } } }
/// <summary> /// 初始化基础信息 /// </summary> private void InitBasicInfo() { if (UserInfoModel != null) { EyouSoft.Model.CompanyStructure.CompanyInfo comModel = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(UserInfoModel.CompanyID); if (comModel != null) { this.lblLoginUser.Text = "您好," + UserInfoModel.UserName + Utils.GetCompanyLevImg(comModel.CompanyLev) + " 欢迎登录同业114。信息完整度:<a class=\"ff0000\" href='javascript:void(0);' onclick='topTab.open(\"/systemset/companyinfoset.aspx\",\"单位信息\");return false;' >" + (comModel.InfoFull * 100).ToString("00") + "%</a>"; } else { this.lblLoginUser.Text = "您好," + UserInfoModel.UserName + " 欢迎登录同业114。"; } } EyouSoft.IBLL.CompanyStructure.ICompanySetting CSetBll = EyouSoft.BLL.CompanyStructure.CompanySetting.CreateInstance(); EyouSoft.Model.CompanyStructure.CompanySetting CSetModel = CSetBll.GetModel(UserInfoModel.CompanyID); if (CSetModel != null) { switch (CSetModel.FirstMenu) { case EyouSoft.Model.CompanyStructure.MenuSection.专线服务: FirstMenu = "0"; break; case EyouSoft.Model.CompanyStructure.MenuSection.组团服务: FirstMenu = "1"; break; case EyouSoft.Model.CompanyStructure.MenuSection.地接服务: FirstMenu = "2"; break; case EyouSoft.Model.CompanyStructure.MenuSection.景区服务: FirstMenu = "3"; break; default: FirstMenu = "1"; break; } } #region 公告区 EyouSoft.IBLL.SystemStructure.ISummaryCount SummaryBll = EyouSoft.BLL.SystemStructure.SummaryCount.CreateInstance(); EyouSoft.Model.SystemStructure.SummaryCount SummaryModel = SummaryBll.GetSummary(); if (SummaryModel != null) { this.lblRouteAgencyCount.Text = (SummaryModel.TravelAgency + SummaryModel.TravelAgencyVirtual).ToString(); this.lblHotelCount.Text = (SummaryModel.Hotel + SummaryModel.HotelVirtual).ToString(); this.lblSightCount.Text = (SummaryModel.Sight + SummaryModel.SightVirtual).ToString(); this.lblCarCount.Text = (SummaryModel.Car + SummaryModel.CarVirtual).ToString(); this.lblShoppingCount.Text = (SummaryModel.Shop + SummaryModel.ShopVirtual).ToString(); } SummaryModel = null; SummaryBll = null; #endregion #region 业114提醒 EyouSoft.Model.CompanyStructure.CompanyRole RoleModel = UserInfoModel.CompanyRole; EyouSoft.Model.CompanyStructure.CompanyType[] enumType = RoleModel.RoleItems; #region 专线和组团显示控制 if (enumType != null && enumType.Length > 0) { foreach (EyouSoft.Model.CompanyStructure.CompanyType type in enumType) { if (type == EyouSoft.Model.CompanyStructure.CompanyType.专线) { IsRouteAgency = true; } else if (type == EyouSoft.Model.CompanyStructure.CompanyType.组团 || type == EyouSoft.Model.CompanyStructure.CompanyType.其他采购商) { IsTourAgency = true; } else if (type == EyouSoft.Model.CompanyStructure.CompanyType.地接) { IsLocalAgency = true; } else if (type == EyouSoft.Model.CompanyStructure.CompanyType.景区) { IsSightAgency = true; } else { IsOther = true; } } if (IsRouteAgency) // 仅为专线 { this.span_RouteAgency.Visible = true; this.ul_RouteAgency.Visible = true; } if (IsTourAgency) // 仅为组团 { this.span_TourAgency.Visible = true; this.ul_TourAgency.Visible = true; } if (IsLocalAgency) //仅为地接 { this.span_ErAgency.Visible = true; this.ul_ErAgency.Visible = true; } if (IsSightAgency) //景区 { this.span_Scenic.Visible = true; this.ul_Scenic.Visible = true; } //if (IsOther) //{ // Utils.ShowError("对不起,您不是旅行社账户!", ""); // this.span_RouteAgency.Visible = false; // this.ul_RouteAgency.Visible = false; // this.span_TourAgency.Visible = false; // this.ul_TourAgency.Visible = false; // this.span_ErAgency.Visible = false; // this.ul_ErAgency.Visible = false; // this.span_Scenic.Visible = true; // this.ul_Scenic.Visible = true; // divNoLocalAgency.Visible = false; //} } #endregion EyouSoft.IBLL.TourStructure.ITour TourBll = EyouSoft.BLL.TourStructure.Tour.CreateInstance(); EyouSoft.IBLL.NewTourStructure.ITourList iorderBll = EyouSoft.BLL.NewTourStructure.BTourList.CreateInstance(); EyouSoft.IBLL.NewTourStructure.IPowderList powderBll = EyouSoft.BLL.NewTourStructure.BPowderList.CreateInstance(); EyouSoft.IBLL.NewTourStructure.IRoute routeBll = EyouSoft.BLL.NewTourStructure.BRoute.CreateInstance(); Dictionary <string, int> dic = null; #region 组团提醒 if (IsTourAgency) // 组团提醒 { //获得线路数和团队数 EyouSoft.IBLL.SystemStructure.ISysCity CityBll = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance(); EyouSoft.Model.SystemStructure.SysCity CityModel = CityBll.GetSysCityModel(UserInfoModel.CityId); if (CityModel != null) { this.lblCity.Text = CityModel.CityName; this.lblTemplateTourCount.Text = CityModel.ParentTourCount.ToString(); this.lblChildTourCount.Text = CityModel.TourCount.ToString(); } CityModel = null; CityBll = null; //获得组团订单信息 dic = iorderBll.GetOrderTravelCount(UserInfoModel.CompanyID); if (dic != null) { if (dic.ContainsKey("未发团散客预订单") && dic.ContainsKey("散客订单未处理") && dic.ContainsKey("散客订单预留待付款") && dic.ContainsKey("散客订单已确认")) { this.lblTourOrderFrist.Text = string.Format( " 未发团散客预订单:<a class=\"ff0000\" href=\"/teamservice/fitorders.aspx?goTimeS={0}\" onclick=\"topTab.open($(this).attr('href'),'我的散拼订单');return false;\"><b>", DateTime.Now.ToShortDateString()) + dic["未发团散客预订单"].ToString() + "单</b></a>,"; this.lblTourOrderFrist.Text += string.Format( "其中未处理<a class=\"ff0000\" href=\"/teamservice/fitorders.aspx?goTimeS={3}&status={0},{1},{2}\" onclick=\"topTab.open($(this).attr('href'),'我的散拼订单');return false;\"><b>", (int)EyouSoft.Model.NewTourStructure.PowderOrderStatus.组团社待处理, (int)EyouSoft.Model.NewTourStructure.PowderOrderStatus.组团社已阅, (int)EyouSoft.Model.NewTourStructure.PowderOrderStatus.专线商待处理, DateTime.Now.ToShortDateString()) + dic["散客订单未处理"].ToString() + "单</b></a>,"; this.lblTourOrderFrist.Text += string.Format( "预留待付款<a class=\"ff0000\" href=\"/teamservice/fitorders.aspx?goTimeS={0}&status={1}\" onclick=\"topTab.open($(this).attr('href'),'我的散拼订单');return false;\"><b>", DateTime.Now.ToShortDateString(), (int)EyouSoft.Model.NewTourStructure.PowderOrderStatus.专线商预留) + dic["散客订单预留待付款"].ToString() + "单</b></a>,"; this.lblTourOrderFrist.Text += string.Format( "已确认<a href=\"/teamservice/fitorders.aspx?goTimeS={0}&status={1},{2}\" onclick=\"topTab.open($(this).attr('href'),'我的散拼订单');return false;\"><b>", DateTime.Now.ToShortDateString(), (int)EyouSoft.Model.NewTourStructure.PowderOrderStatus.专线商已确定, (int)EyouSoft.Model.NewTourStructure.PowderOrderStatus.结单) + dic["散客订单已确认"].ToString() + "单</b></a>"; } if (dic.ContainsKey("未发团团队预订单") && dic.ContainsKey("团队未确认") && dic.ContainsKey("团队已确认")) { this.lblTourOrderSecond.Text = string.Format( "未发团团队预订单:<a class=\"ff0000\" href=\"/teamservice/teamorders.aspx?ref=0&goTimeS={0}\" onclick=\"topTab.open($(this).attr('href'),'我的散拼订单');return false;\"><b>", DateTime.Now.ToShortDateString()) + dic["未发团团队预订单"].ToString() + "单</b></a>,"; this.lblTourOrderSecond.Text += string.Format( "未确认订单<a class=\"ff0000\" href=\"/teamservice/teamorders.aspx?ref=0&goTimeS={1}&status={0}\" onclick=\"topTab.open($(this).attr('href'),'我的散拼订单');return false;\"><b>", (int)EyouSoft.Model.NewTourStructure.TourOrderStatus.未确认, DateTime.Now.ToShortDateString()) + dic["团队未确认"].ToString() + "单</b></a>,"; this.lblTourOrderSecond.Text += string.Format( "已确认<a href=\"/teamservice/teamorders.aspx?ref=0&goTimeS={2}&status={0},{1}\" onclick=\"topTab.open($(this).attr('href'),'我的散拼订单');return false;\"><b>", (int)EyouSoft.Model.NewTourStructure.TourOrderStatus.已确认, (int)EyouSoft.Model.NewTourStructure.TourOrderStatus.结单, DateTime.Now.ToShortDateString()) + dic["团队已确认"].ToString() + "单</b></a>"; } } } #endregion #region 专线提醒 if (IsRouteAgency) { int ComingLeaveTourNumber = TourBll.GetComingExpireTourNumber(); if (ComingLeaveTourNumber > 0) { this.lblComingExpireToursCount.Text = "<img src='" + ImageServerPath + "/images/gantanhao.gif' />您当前共有<a href='/routeagency/notstartingteams.aspx' onclick=\"topTab.open($(this).attr('href'),'未出发团队');return false;\">" + ComingLeaveTourNumber + "个团</a>将于1周后到期,请及时更新计划,以方便组团社查询"; } //获得专线下线路区域和团的数量 IList <EyouSoft.Model.TourStructure.AreaStatInfo> TourByAreaCount = powderBll.GetCurrentUserTourByAreaStats(); if (TourByAreaCount != null && TourByAreaCount.Count > 0) { StringBuilder strTour = new StringBuilder(); foreach (EyouSoft.Model.TourStructure.AreaStatInfo AreaStaModel in TourByAreaCount) { strTour.Append("<a class=\"lan14\" href=\"/routeagency/scatteredfightplan.aspx?lineId=" + AreaStaModel.AreaId.ToString() + "\" onclick=\"topTab.open($(this).attr('href'),'我的散拼计划');return false;\">" + AreaStaModel.AreaName + "(" + AreaStaModel.Number.ToString() + ")</a>"); } this.lblRoutePlanCount.Text = strTour.ToString(); } dic = iorderBll.GetOrderBusinessCount(UserInfoModel.CompanyID); if (dic != null) { //获得专线订单信息 if (dic.ContainsKey("有效散客订单") && dic.ContainsKey("散客订单未处理") && dic.ContainsKey("散客预留待付款") && dic.ContainsKey("散客订单已确认")) { this.lblRouteOrderFrist.Text = "有效散客订单:<a href=\"/routeagency/allfitorders.aspx\" class=\"ff0000\" onclick=\"topTab.open($(this).attr('href'),'所有散拼订单');return false;\"><b>" + dic["有效散客订单"].ToString() + "单</b></a>,"; this.lblRouteOrderFrist.Text += "其中未处理<a href=\"/routeagency/allfitorders.aspx?statue=2\" class=\"ff0000\" onclick=\"topTab.open($(this).attr('href'),'所有散拼订单');return false;\"><b>" + dic["散客订单未处理"].ToString() + "单</b></a>,"; this.lblRouteOrderFrist.Text += "预留待付款<a href=\"/routeagency/allfitorders.aspx?statue=3\" class=\"ff0000\" onclick=\"topTab.open($(this).attr('href'),'所有散拼订单');return false;\"><b>" + dic["散客预留待付款"].ToString() + "单</b></a>,"; this.lblRouteOrderFrist.Text += "已确认:<a href=\"/routeagency/allfitorders.aspx?statue=6\" onclick=\"topTab.open($(this).attr('href'),'所有散拼订单');return false;\"><b>" + dic["散客订单已确认"].ToString() + "单</b></a>"; } if (dic.ContainsKey("团队订单") && dic.ContainsKey("团队订单未处理") && dic.ContainsKey("团队订单已确认")) { this.lblRouteOrderSecond.Text = "有效团队订单:共有<a href=\"/teamservice/teamorders.aspx?routeSource=1\" class=\"ff0000\" onclick=\"topTab.open($(this).attr('href'),'团队订单管理');return false;\"><b>" + dic["团队订单"].ToString() + "单</b></a>,"; this.lblRouteOrderSecond.Text += "其中未处理<a href=\"/teamservice/teamorders.aspx?routeSource=1&status=0\" class=\"ff0000\" onclick=\"topTab.open($(this).attr('href'),'团队订单管理');return false;\"><b>" + dic["团队订单未处理"].ToString() + "单</b></a>,"; this.lblRouteOrderSecond.Text += " 已确认:<a href=\"/teamservice/teamorders.aspx?routeSource=1&status=1\" onclick=\"topTab.open($(this).attr('href'),'团队订单管理');return false;\"><b>" + dic["团队订单已确认"] + "单</b></a>"; } if (dic.ContainsKey("历史订单") && dic.ContainsKey("成人数") && dic.ContainsKey("儿童数")) { this.lblRouteOrderThird.Text = "历史订单:共计<a class=\"ff0000\"><b>" + dic["历史订单"].ToString() + "单</b></a>,人数" + dic["成人数"].ToString() + "大" + dic["儿童数"].ToString() + "小"; } } //获得专线商的访问数量 this.lblBrowseUserCount.Text = TourBll.GetVisitedNumberByCompany(UserInfoModel.CompanyID).ToString(); } #endregion #region 地接提醒 if (IsLocalAgency) { //获得地接线路区域信息 IList <EyouSoft.Model.TourStructure.AreaStatInfo> routeByAreaCount = routeBll.GetCurrentUserRouteByAreaStats(); if (routeByAreaCount != null && routeByAreaCount.Count > 0) { StringBuilder strTour = new StringBuilder(); foreach (EyouSoft.Model.TourStructure.AreaStatInfo AreaStaModel in routeByAreaCount) { strTour.Append("<a href='/routeagency/routemanage/routeview.aspx?routeSource=2' onclick=\"topTab.open($(this).attr('href'),'我的线路库',{isRefresh:false,data:{AreaId:" + AreaStaModel.AreaId + "}});return false;\" class='lan14'>" + AreaStaModel.AreaName + "(" + AreaStaModel.Number + ")</a><br />"); } this.lblLocalRoute.Text = strTour.ToString(); } dic = iorderBll.GetOrderGroundCount(UserInfoModel.CompanyID); if (dic != null) { //获得地接团队订单信息 if (dic.ContainsKey("有效团队订单") && dic.ContainsKey("团队订单未处理") && dic.ContainsKey("团队订单已处理")) { this.lblLocalOrderCount.Text = "有效团队订单:共有<a href=\"/teamservice/teamorders.aspx?routeSource=2\" class=\"ff0000\" onclick=\"topTab.open($(this).attr('href'),'团队订单管理');return false;\"><b>" + dic["有效团队订单"].ToString() + "单</b></a>,"; this.lblLocalOrderCount.Text += "其中未处理<a href=\"/teamservice/teamorders.aspx?routeSource=2&status=0\" class=\"ff0000\" onclick=\"topTab.open($(this).attr('href'),'团队订单管理');return false;\"><b>" + dic["团队订单未处理"].ToString() + "单</b></a>,"; this.lblLocalOrderCount.Text += "已确认:<a href=\"/teamservice/teamorders.aspx?routeSource=2&status=1\" onclick=\"topTab.open($(this).attr('href'),'团队订单管理');return false;\"><b>" + dic["团队订单已处理"].ToString() + "单</b></a>"; } } } #endregion #region 景区提醒 if (IsSightAgency) { //获得将过期景点门票 this.lblScenicCountOver.Text = "您当前共有<a href=\"/ScenicManage/MyScenice.aspx\" onclick=\"topTab.open($(this).attr('href'),'我的景区');return false;\">" + EyouSoft.BLL.ScenicStructure.BScenicTickets.CreateInstance().GetExpireTickets(UserInfoModel.CompanyID).ToString() + "个景区门票</a>将于1周后到期,请及时更新计划,以方便旅行社查询"; int recordCount = 0; IList <EyouSoft.Model.ScenicStructure.MScenicArea> scenicList = EyouSoft.BLL.ScenicStructure.BScenicArea.CreateInstance().GetListAndTickets(3, 1, ref recordCount, null); if (scenicList != null && scenicList.Count > 0) { string sbScenic = ""; for (int i = 0; i < scenicList.Count; i++) { sbScenic += "<a class=\"lan14\" href=\"/ScenicManage/MyScenice.aspx\" onclick=\"topTab.open($(this).attr('href'),'我的景区');return false;\">" + scenicList[i].ScenicName + "</a> "; } this.lblScenicCount.Text = sbScenic; } } #endregion #endregion }
/// <summary> /// 初始化基础信息 /// </summary> private void InitBasicInfo() { if (UserInfoModel != null) { this.ltrCompanyName.Text = UserInfoModel.CompanyName; } EyouSoft.IBLL.CompanyStructure.ICompanyInfo CompanyInfo = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance(); EyouSoft.Model.CompanyStructure.CompanyDetailInfo CompanyInfoModel = CompanyInfo.GetModel(UserInfoModel.CompanyID); if (CompanyInfoModel != null) { if (!String.IsNullOrEmpty(CompanyInfoModel.AttachInfo.CompanyLogo.ImagePath)) { this.imgLogo.Src = Domain.FileSystem + CompanyInfoModel.AttachInfo.CompanyLogo.ImagePath; } else { this.imgLogo.Src = ImageServerPath + "/images/logo.gif"; } } EyouSoft.IBLL.CompanyStructure.ICompanySetting CSetBll = EyouSoft.BLL.CompanyStructure.CompanySetting.CreateInstance(); EyouSoft.Model.CompanyStructure.CompanySetting CSetModel = CSetBll.GetModel(UserInfoModel.CompanyID); if (CSetModel != null) { switch (CSetModel.FirstMenu) { case EyouSoft.Model.CompanyStructure.MenuSection.专线服务: FirstMenu = "0"; break; case EyouSoft.Model.CompanyStructure.MenuSection.组团服务: FirstMenu = "1"; break; case EyouSoft.Model.CompanyStructure.MenuSection.地接服务: FirstMenu = "2"; break; case EyouSoft.Model.CompanyStructure.MenuSection.景区服务: FirstMenu = "3"; break; default: FirstMenu = "1"; break; } } #region 专线和组团显示控制 EyouSoft.Model.CompanyStructure.CompanyRole RoleModel = UserInfoModel.CompanyRole; EyouSoft.Model.CompanyStructure.CompanyType[] enumType = RoleModel.RoleItems; if (enumType.Length > 0) { foreach (EyouSoft.Model.CompanyStructure.CompanyType type in enumType) { if (type == EyouSoft.Model.CompanyStructure.CompanyType.专线) { IsRouteAgency = true; } else if (type == EyouSoft.Model.CompanyStructure.CompanyType.组团 || type == EyouSoft.Model.CompanyStructure.CompanyType.其他采购商) { IsTourAgency = true; } else if (type == EyouSoft.Model.CompanyStructure.CompanyType.地接) { IsLocalAgency = true; } else if (type == EyouSoft.Model.CompanyStructure.CompanyType.景区) { IsSightAgency = true; } else { IsOther = true; } } if (IsRouteAgency) // 仅为专线 { this.div_RouteAgency.Visible = true; //景区门票后台搜索页 divSceniceList.Visible = true; } if (IsTourAgency) // 仅为组团 { this.div_TourAgency.Visible = true; //景区门票后台搜索页 divSceniceList.Visible = true; } if (IsLocalAgency) { // 地接 this.div_LocalAgency.Visible = true; //景区门票后台搜索页 divSceniceList.Visible = true; } if (!IsRouteAgency && !IsTourAgency && IsLocalAgency) { //景区门票后台搜索页 divSceniceList.Visible = true; } if (IsSightAgency) { div_SightAgency.Visible = true; divHotelCenter.Visible = false; //景区门票后台搜索页 divSceniceList.Visible = true; //我的网店链接地址 hrefSightShop.HRef = IsOpenHighShop ? "/EShop/SightShop/SightShopDefault.aspx" : "/GeneralShop/SightShop/Default.aspx"; } #region ZhouWenChao 2011-03-07 注释,原因是酒店用户进入不了后台 //if (IsOther) //{ // Utils.ShowError("对不起,您不是旅行社账户!", ""); // return; //} #endregion } #endregion }