public IList<Model.DJ_GovManageDepartment> GetMgrDptList(string dptName,string areaCode) { string ids = new BLLArea().GetChildAreaIds(areaCode); string sql = "select gcr from DJ_GovManageDepartment gcr where 1=1 "; if (ids != string.Empty) { sql+=" and gcr.Area.Id in (" + ids + ")"; } if (!string.IsNullOrEmpty(dptName)) { sql += " and gcr.Name like '%" + dptName + "%'"; } IQuery query = session.CreateQuery(sql); return query.Future<Model.DJ_GovManageDepartment>().ToList(); //throw new NotImplementedException(); }
private void bind(Scenic scenic) { maintitlett.InnerHtml = scenic.Name; hfposition.Value = scenic.Position; scbindname = scenic.Name; hfscname.Value = scenic.Name; scid = scenic.Id; Area parentarea = new BLLArea().GetAreaByCode(scenic.Area.Code.Substring(0, 4) + "00"); Area childarea = scenic.Area; areaname.HRef = "/Tickets/" + parentarea.SeoName; areaname.InnerHtml = parentarea.Name.Substring(3, parentarea.Name.Length - 3) + " >"; if (parentarea.Id != childarea.Id) { county.Visible = true; string childname = childarea.Name.Substring(3); if (childname.Length >= 6) childname = childname.Substring(3); county.InnerHtml = childname + " >"; county.HRef = "/Tickets/" + parentarea.SeoName + "_" + childarea.SeoName; } else { county.Visible = false; } //导航链接 隐藏套票的所属单位 string owerName = scenic.Name; IList<Ticket> tickets = s.Tickets; foreach (Ticket t in tickets) { if (t.As<Ticket>() is TicketUnion) { owerName = t.DisplayNameOfOwner; break; } } scenicname.HRef = "/Tickets/" + parentarea.SeoName + "_" + scenic.Area.SeoName + "/" + scenic.SeoName + ".html"; scenicname.InnerHtml = owerName; scaddress = scenic.Address; booknote = scenic.BookNote; sclevel = scenic.Level; scdesc = scenic.ScenicDetail; transguid = scenic.Trafficintro; if (!string.IsNullOrEmpty(scenic.Desec)) { if (scenic.Desec.Length > 30) scshortdesc = scenic.Desec.Substring(0, 30) + "..."; else scshortdesc = scenic.Desec + "..."; } IList<ScenicImg> listsi = bllscenicimg.GetSiByType(scenic, 1); if (listsi.Count > 0) ImgMainScenic.Src = "/ScenicImg/mainimg/" + listsi[0].Name; //判断是否是联票,如果是的话则使用新的样式' if (scenic.Tickets != null && scenic.Tickets.Count > 0) { var t = scenic.Tickets[0].As<Ticket>(); if (t is TicketUnion) { rptBookNote.DataSource = ((TicketUnion)t).TicketList; rptBookNote.DataBind(); rptscInfo.DataSource = ((TicketUnion)t).TicketList; rptscInfo.DataBind(); rptJt.DataSource = ((TicketUnion)t).TicketList; rptJt.DataBind(); } else { List<Ticket> listTicket = new List<Ticket>(); listTicket.Add(t); rptBookNote.DataSource = listTicket; rptBookNote.DataBind(); rptscInfo.DataSource = listTicket; rptscInfo.DataBind(); rptJt.DataSource = listTicket; rptJt.DataBind(); } } else { Ticket t = new TicketNormal(); t.Scenic = scenic; List<Ticket> listTicket = new List<Ticket>(); listTicket.Add(t); rptBookNote.DataSource = listTicket; rptBookNote.DataBind(); rptscInfo.DataSource = listTicket; rptscInfo.DataBind(); rptJt.DataSource = listTicket; rptJt.DataBind(); } IList<Scenic> list = bllscenic.GetScenic(); Dictionary<Scenic, double> places = new Dictionary<Scenic, double>(); List<double> listdistance = new List<double>(); if (!string.IsNullOrEmpty(scenic.Position)) { //bindimg(list, scenic); //foreach (ScenicImg item in scdiction.Keys) //{ bindimglist += scenic.Position + ":"; // } } //绑定主题 rpttopic.DataSource = blltopic.GetStByscid(scenic.Id); rpttopic.DataBind(); //绑定普通票 IList<Ticket> listticket = bllticket.GetTp(scenic.Id); //衢州新春门票,的主门票productCode if (listticket.Count > 0) { maintitlett.InnerHtml = listticket[0].DisplayNameOfOwner; IList<Ticket> listTicket = listticket.Where(x => x.IsMain).Where(x => x.TourActivity != null).ToList(); if (listTicket.Count() > 0) { hfProductCode.Value = listTicket[0].ProductCode; //判断门票是否已经过期 TourActivity act = listTicket[0].TourActivity; if (DateTime.Now.Date >= act.BeginDate && DateTime.Now.Date <= act.EndDate) { var ticketAsign = listTicket[0].TourActivity .GetActivityAssignForPartnerTicketDate(SiteConfig.PartnerCodeOfTourOL, listTicket[0].ProductCode, DateTime.Now.Date); hfSyCount.Value = (ticketAsign.AssignedAmount - ticketAsign.SoldAmount).ToString(); } } else { qzTicketCount.Visible = false; } } else { qzTicketCount.Visible = false; } rpttp.DataSource = listticket.Where(x => x.Enabled).ToList(); rpttp.DataBind(); //编辑 EditRole(); //sc_dp.scname = scenic.Name; //sc_dp.BaseData = booknote; //plate2.scname = scenic.Name; //plate2.BaseData = scenic.ScenicDetail; //sc_jtzn.scname = scenic.Name; //sc_jtzn.BaseData = scenic.Trafficintro; }
/// <summary> /// 辖区在奖励范围内的企� /// </summary> /// <param name="areacode"></param> /// <returns></returns> public IList<Model.DJ_TourEnterprise> GetRecEnt(string areacode) { DAL.DALDJEnterprise dalEnt = new DAL.DALDJEnterprise(); BLLArea bllArea = new BLLArea(); string ids = bllArea.GetChildAreaIds(areacode); return dalEnt.GetEnterpriseList(ids, true, false, true); }
/// <summary> /// 旅游管理部门辖区的旅游企� /// </summary> /// <param name="areaCode"></param> /// <returns></returns> public IList<Model.DJ_TourEnterprise> GetDJSForDpt(string areaCode) { string ids = new BLLArea().GetChildAreaIds(areaCode); return dalEnt.GetDJSInAreas(ids); }