public static List <IES.JW.Model.OCTheme> OCTheme_ListBycolor(string Subject, string Color, int DateSpan, int CourseID, int PageIndex, int PageSize) { ISiteBLL ocbll = new SiteBLL(); List <IES.JW.Model.OCTheme> octheme = ocbll.OCTheme_ListBycolor(Subject, Color, DateSpan, CourseID, PageIndex, PageSize); return(octheme); }
public ActionResult Edit(Site obj) { if (string.IsNullOrEmpty(obj.Name) || string.IsNullOrEmpty(obj.Url) || obj.CategoryId == Guid.Empty) { return(Json(false, JsonRequestBehavior.AllowGet)); } else { Site model = SiteBLL.GetById(obj.Id); if (model == null) { return(Json(false, JsonRequestBehavior.AllowGet)); } else { model.Name = obj.Name; model.Url = obj.Url; model.Description = obj.Description; model.KeyWord = obj.KeyWord; if (Request.Files.Count > 0 && Request.Files[0].ContentLength > 0) { model.Logo = SaveFileReturnPath(Request.Files[0]); } model.MenuId = CategoryList.FirstOrDefault(o => o.Id == obj.CategoryId).MenuId; model.CategoryId = obj.CategoryId; model.Is_Home = obj.Is_Home; model.Is_Bar = obj.Is_Bar; model.ShowOrder = obj.ShowOrder; SiteBLL.Update(model); CacheManager.Remove(Consts.SiteCacheKey); return(Json(true, JsonRequestBehavior.AllowGet)); } } }
public static int OCMoocRecruitClass_Join(int RecruitID) { int UserID = -1; try { UserID = UserService.CurrentUser.UserID; } catch (Exception e) { UserID = -1; } if (UserID <= 0) { return(-1); } ISiteBLL ocbll = new SiteBLL(); if (ocbll.OCMoocRecruitClassJoin(RecruitID, UserID)) { return(1); } else { return(0); } }
protected void Page_Load(object sender, EventArgs e) { string action = Web9long.Web.Util.Form("action"); switch (action) { case "checklogin": string username = Web9long.Web.Util.Form("username"); string pwd = Web9long.Web.Util.Form("password"); string code = Web9long.Web.Util.Form("verifycode").Trim(); string ExpiresDate = Web9long.Web.Util.Form("ExpiresDate"); string rs=string.Empty; if (code.ToLower() != Session["VerCode"].ToString().ToLower().Trim()) { rs = "验证码错误"; } else { bool rember = ExpiresDate.Trim() == "1"; SYS_ManageInfo ety = ManageDAL.ManageTryLogin(username, pwd, rember, out rs); EmptyTable et = new EmptyTable(); et.TableCondition().TableName = "Sys_Managelog"; et.Set("user_name", username); et.Set("login_ip", Web9long.Web.Util.AgentIp()); et.Set("note",rs==string.Empty?"成功登录":rs); using (SiteBLL bll = new SiteBLL()) { bll.Insert(et); } } Response.Write(rs); Response.End(); break; } }
public ActionResult Delete(Guid id) { Site obj = SiteBLL.GetById(id); SiteBLL.Delete(obj); CacheManager.Remove(Consts.SiteCacheKey); return(Json(true, JsonRequestBehavior.AllowGet)); }
public static List <OCSiteColumn> OCSiteColumn_Nav_Tree(int ColumnID, int OCID) { ISiteBLL ocbll = new SiteBLL(); List <OCSiteColumn> ocsitecolumn = ocbll.OCSiteColumn_Nav_Tree(ColumnID, OCID); ocsitecolumn.Reverse(); return(ocsitecolumn); }
protected void Page_Load(object sender, EventArgs e) { using (SiteBLL bll = new SiteBLL()) { //友情链接 this.rpt_list_link.DataSource = bll.GetList<EmptyTable>("select * from Com_FrendLink where YN_State=0 order by YN_FlSortNumber desc,YN_id desc"); this.rpt_list_link.DataBind(); } }
public static List <OCNotice> OCNotice_List(int OCID, int PageIndex, int PageSize) { ISiteBLL ocbll = new SiteBLL(); string userid = IESCookie.GetCookieValue("ies"); IES.JW.Model.User user = new IES.JW.Model.User { UserID = Int32.Parse(userid) }; user = UserService.User_Get(user); return(ocbll.OCNotice_List(OCID, user.UserID, PageIndex, PageSize)); }
public static void OCSite_IsPublish_Upd(int OCID, int IsPublish) { ISiteBLL ocbll = new SiteBLL(); string userid = IESCookie.GetCookieValue("ies"); IES.JW.Model.User user = new IES.JW.Model.User { UserID = Int32.Parse(userid) }; user = UserService.User_Get(user); ocbll.OCSite_IsPublish_Upd(OCID, user.UserID, IsPublish); }
public static int OCNotice_ADD(int NoticeID, int OCID, string Title, string Conten, bool IsTop, bool IsSms, bool IsEMail, bool IsAll) { ISiteBLL ocbll = new SiteBLL(); string userid = IESCookie.GetCookieValue("ies"); IES.JW.Model.User user = new IES.JW.Model.User { UserID = Int32.Parse(userid) }; user = UserService.User_Get(user); return(ocbll.OCNotice_ADD(NoticeID, OCID, user.UserID, user.UserName, Title, Conten, IsTop, IsSms, IsEMail, IsAll)); }
protected void ExportData() { string sql = @"select title as [标题], 'http://www.jinghuakongqi.com/'+CateCallIndex+'/'+ convert(varchar(15),ArticleID)+'.html' as [地址], [ClickHits] as [点击数],[Addtime] as [发布日期] from SYS_Article as a inner join SYS_Category as b on a.CategoryID=b.CateID inner join SYS_channel as c on a.ChannelID=c.CL_ID where Islock<>1"; int id = 0; string tmpstr = Web9long.Web.Util.Query("chancate"); if (!string.IsNullOrEmpty(tmpstr)) { string[] a = tmpstr.Split('|'); if (a.Length == 2) { if (int.TryParse(a[1], out id)) sql = sql + " and CategoryID=" + id; } else if (a.Length == 1) { if (int.TryParse(a[0], out id)) sql = sql + " and CL_ID=" + id; } } DateTime dt; tmpstr = Web9long.Web.Util.Query("stime"); if (!string.IsNullOrEmpty(tmpstr) && DateTime.TryParse(tmpstr + " 00:00:00", out dt)) { sql = sql + " and Addtime>='" + dt + "'"; } tmpstr = Web9long.Web.Util.Query("etime"); if (!string.IsNullOrEmpty(tmpstr) && DateTime.TryParse(tmpstr + " 23:59:59", out dt)) { sql = sql + " and Addtime<='" + dt + "'"; } //Response.Write(sql); //Response.End(); using (SiteBLL bll = new SiteBLL()) { DataSet ds = bll.GetDataSet(sql); if (ds != null && ds.Tables.Count > 0) { Loneu.Web.UI.Excel.DataTableToExcel(this.Page, "exel" + System.DateTime.Now.ToString("yyyyMMddHHmmss"), ds.Tables[0], "GB2312"); } } }
public static void OCNotice_Del(int NoticeID, int OCID) { string userid = IESCookie.GetCookieValue("ies"); IES.JW.Model.User user = new IES.JW.Model.User { UserID = Int32.Parse(userid) }; user = UserService.User_Get(user); ISiteBLL ocbll = new SiteBLL(); ocbll.OCNotice_Del(NoticeID, OCID, user.UserID); }
public static List<IES.Resource.Model.Attachment> Attachment_List(string Source, int SourceID) { ISiteBLL ocbll = new SiteBLL(); return ocbll.Attachment_List(Source, SourceID); //List<IES.Resource.Model.Attachment> attachment = ocbll.Attachment_List(Source, SourceID); //if (attachment.Count == 1) { // if (System.IO.Path.GetExtension(attachment[0].FileName).ToLower() == ".mp4") { // attachment.Insert(0, new IES.Resource.Model.Attachment()); // } //} //return attachment.GroupBy(x => x.FileExtType).Select(x => x.OrderBy(y => y.Updatetime).Last()).ToList(); }
public static List <IES.CC.OC.Model.OC> OC_List() { string userid = IESCookie.GetCookieValue("ies"); IES.JW.Model.User user = new IES.JW.Model.User { UserID = Int32.Parse(userid) }; user = UserService.User_Get(user); ISiteBLL ocbll = new SiteBLL(); return(ocbll.OC_List(user.UserID, user.UserType)); }
public static List <OCSiteColumn> OCSiteColumn_List(int ColumnID) { string userid = IESCookie.GetCookieValue("ies"); IES.JW.Model.User user = new IES.JW.Model.User { UserID = Int32.Parse(userid) }; user = UserService.User_Get(user); ISiteBLL ocbll = new SiteBLL(); return(ocbll.OCSiteColumn_List(ColumnID, user.UserID)); }
public static List <IES.Resource.Model.Attachment> Attachment_List(string Source, int SourceID) { ISiteBLL ocbll = new SiteBLL(); return(ocbll.Attachment_List(Source, SourceID)); //List<IES.Resource.Model.Attachment> attachment = ocbll.Attachment_List(Source, SourceID); //if (attachment.Count == 1) { // if (System.IO.Path.GetExtension(attachment[0].FileName).ToLower() == ".mp4") { // attachment.Insert(0, new IES.Resource.Model.Attachment()); // } //} //return attachment.GroupBy(x => x.FileExtType).Select(x => x.OrderBy(y => y.Updatetime).Last()).ToList(); }
internal static SessionBLL CreateNewSession(SiteBLL site, UserBLL user) { using (var context = new AuctionSiteContext(site.ConnectionString)) { var session = new Session { Id = CreateSessionId(site, user), ValidUntil = site.AlarmClock.Now.AddSeconds(site.SessionExpirationInSeconds), }; context.Sessions.Add(session); context.SaveChanges(); return(new SessionBLL(session, user)); } }
public void Initialize() { //CREATING USERCUSTOMER _CustomerUser = new UserBLL().Find(EMAIL); if (_CustomerUser == null) _CustomerUser = new UserBLL().Create("Oz in Test", EMAIL, "123456"); //CREATING A WEBSITE var _C = new List<CultureBinding>(); _C.Add(new CultureBinding { Name = "es" }); _C.Add(new CultureBinding { Name = "en" }); var _W = new data.binding.SiteAllBinding { SiteName = PREFIX + DateTime.Now.ToShortTimeString(), Cultures = _C, DefaultLang="es" }; _SiteID = new SiteBLL().Save(_W); new SiteBLL().AddUserToAllRoles(new AddUserInSiteBinding { Email = EMAIL, SiteID = _SiteID }); _Cultures = new CultureBLL().Get(_SiteID); new CultureBLL().Save(new CultureBinding { CultureID = _Cultures[0].CultureID, SiteID = _SiteID, Facebook = "f" + _Cultures[0].Name, GPlus = "g" + _Cultures[0].Name, Instagram = "i" + _Cultures[0].Name, Tumblr = "t" + _Cultures[0].Name }, _CustomerUser.Id); new CultureBLL().Save(new CultureBinding { CultureID = _Cultures[1].CultureID, Facebook = "f" + _Cultures[1].Name, GPlus = "g" + _Cultures[1].Name, Instagram = "i" + _Cultures[1].Name, Tumblr = "t" + _Cultures[1].Name, SiteID = _SiteID, }, _CustomerUser.Id); }
public static int IsCanCourseInteraction(int OCID) { ISiteBLL ocbll = new SiteBLL(); string userid = IESCookie.GetCookieValue("ies"); if (userid != "-1") { IES.JW.Model.User user = new IES.JW.Model.User { UserID = Int32.Parse(userid) }; user = UserService.User_Get(user); return ocbll.IsCanCourseInteraction(user.UserID, OCID, 0); } else { return 0; } }
protected void Page_Load(object sender, EventArgs e) { using (SiteBLL bll = new SiteBLL()) { string sql = @" select top {0} CategoryID,title, ArticleID,CateCallIndex,CL_Name from SYS_Article,SYS_Category,SYS_channel where SYS_Article.CategoryID=SYS_Category.CateID and sys_article.ChannelID=SYS_channel.CL_ID and CategoryID={1} and Islock<>1 order by Istop desc,Sortid desc,ArticleID desc "; sql = string.Format(sql, TopCount, ClassID); this.rpt_List.DataSource = bll.GetList<EmptyTable>(sql); this.rpt_List.DataBind(); } }
public ActionResult Add(Site obj) { if (string.IsNullOrEmpty(obj.Name) || string.IsNullOrEmpty(obj.Url) || (Request.Files.Count <= 0 || Request.Files[0].ContentLength <= 0) || obj.CategoryId == Guid.Empty) { return(Json(false, JsonRequestBehavior.AllowGet)); } else { obj.Id = Guid.NewGuid(); obj.Logo = SaveFileReturnPath(Request.Files[0]); obj.MenuId = CategoryList.FirstOrDefault(o => o.Id == obj.CategoryId).MenuId; SiteBLL.Create(obj); CacheManager.Remove(Consts.SiteCacheKey); return(Json(true, JsonRequestBehavior.AllowGet)); } }
protected void Page_Load(object sender, EventArgs e) { using (SiteBLL bll = new SiteBLL()) { string sql = @" select Catetitle, CateCallIndex,CL_Name from SYS_Category,SYS_channel where SYS_Category.ChannelID=SYS_channel.CL_ID and ChannelID={0} and CateClassLayer=1 order by CateSortID desc,CateID desc "; sql = string.Format(sql, ChannelID); this.rpt_List.DataSource = bll.GetList<EmptyTable>(sql); this.rpt_List.DataBind(); } }
public void ProcessRequest(HttpContext context) { try { LoginUser loginUser = new LoginUser(context, "UKeyGrant"); SiteBLL siteBll = new SiteBLL(context, loginUser); if (!loginUser.Pass)//权限验证 { return; } //加载DataGrid if (context.Request["action"] == "gridLoad") { int page = int.Parse(context.Request["page"]); int rows = int.Parse(context.Request["rows"]); string siteId = context.Request["siteId"]; string siteName = context.Request["siteName"]; siteBll.LoadGrid(page, rows, siteId, siteName, ((int)AuditStauts.AuditSucces).ToString()); return; } //加载信息 if (context.Request["action"] == "load") { //加载信息 siteBll.Load(context.Request["siteId"]); } //发放 if (context.Request["action"] == "grant") { UKeyBLL bll = new UKeyBLL(context, loginUser); string siteId = context.Request["siteId"]; //执法文书名称编号 string startUKeyId = context.Request["startUKeyId"]; //起始号 string endUKeyId = context.Request["endUKeyId"]; //结束号 int uKeyNum = int.Parse(context.Request["uKeyNum"]); //终端数量 bll.Grant(siteId, startUKeyId, endUKeyId, uKeyNum); return; } } catch (Exception e) { Message.error(context, e.Message); } }
public static List <OCSite> OCSite_Get(int OCID) { ISiteBLL ocbll = new SiteBLL(); string userid = IESCookie.GetCookieValue("ies"); if (userid != "-1") { IES.JW.Model.User user = new IES.JW.Model.User { UserID = Int32.Parse(userid) }; user = UserService.User_Get(user); return(ocbll.OCSite_Get(OCID, user.UserID)); } else { return(ocbll.OCSite_Get(OCID, -1)); } }
public static int IsCanCourseInteraction(int OCID) { ISiteBLL ocbll = new SiteBLL(); string userid = IESCookie.GetCookieValue("ies"); if (userid != "-1") { IES.JW.Model.User user = new IES.JW.Model.User { UserID = Int32.Parse(userid) }; user = UserService.User_Get(user); return(ocbll.IsCanCourseInteraction(user.UserID, OCID, 0)); } else { return(0); } }
public void ProcessRequest(HttpContext context) { try { LoginUser loginUser = new LoginUser(context, "CardGrant"); CardBLL bll = new CardBLL(context, loginUser); SiteBLL siteBll = new SiteBLL(context, loginUser); if (!loginUser.Pass)//权限验证 { return; } //加载DataGrid if (context.Request["action"] == "gridLoad") { int page = int.Parse(context.Request["page"]); int rows = int.Parse(context.Request["rows"]); string siteId = context.Request["siteId"]; string siteName = context.Request["siteName"]; siteBll.LoadGrid(page, rows, siteId, siteName, ((int)AuditStauts.AuditSucces).ToString()); return; } if (context.Request["action"] == "load") { //加载信息 siteBll.Load(context.Request["siteId"]); } //发放 if (context.Request["action"] == "add") { string siteId = context.Request["siteId"]; //快开厅编号 string startCardId = context.Request["startCardId"]; //起始卡号 string endCardId = context.Request["endCardId"]; //结束卡号 int cardNum = int.Parse(context.Request["cardNum"]); //卡片数量 bll.Grant(startCardId, endCardId, cardNum, siteId); return; } } catch (Exception e) { Message.error(context, e.Message); } }
public static List <IES.CC.OC.Model.OCMoocRecruit> MoocRecruit_List(int OCID) { int UserID = -1; try { UserID = UserService.CurrentUser.UserID; } catch (Exception e) { UserID = -1; } ISiteBLL ocbll = new SiteBLL(); List <IES.CC.OC.Model.OCMoocRecruit> ocMoocList = ocbll.OCMoocRecruitClassDesc_List(OCID, UserID); return(ocMoocList); // return new List<OCMoocRecruit>(); }
protected void Page_Load(object sender, EventArgs e) { ChannelList = GetChanelList(); if (!IsPostBack) { base.ChkAdminLevel("export_userarticle", "view"); using (SiteBLL bll = new SiteBLL()) { ddUserList.DataSource = bll.GetList<EmptyTable>("select MI_ID, MI_UserName from SYS_ManageInfo"); ddUserList.DataTextField = "MI_UserName"; ddUserList.DataValueField = "MI_ID"; ddUserList.DataBind(); ddUserList.Items.Insert(0, new ListItem("请选择", "")); ddUserList.Items.FindByText("请选择").Selected = true; } if(Web9long.Web.Util.Query("exp")=="1") ExportData(); } }
public void SiteImportTest() { var _URL = new SiteBLL().Export(_SiteID); string _Content = new WebClient().DownloadString(_URL); byte[] toEncodeAsBytes = System.Text.ASCIIEncoding.ASCII.GetBytes(_Content); _Content = "64base," + System.Convert.ToBase64String(toEncodeAsBytes); var _NewSiteID = new SiteBLL().Import(new data.binding.FileRead { FileContent = _Content, FileName = "Site.json" }); Assert.IsNotNull(_NewSiteID); Assert.IsTrue(_NewSiteID != 0); var _Cultures = new CultureBLL().Get(_NewSiteID); Assert.IsNotNull(_Cultures); Assert.IsTrue(_Cultures.Count != 0); Assert.IsTrue(_Cultures[0].Facebook == "f" + _Cultures[0].Name); Assert.IsTrue(_Cultures[1].Facebook == "f" + _Cultures[1].Name); }
public static int OCSiteColumn_Edit(string columnsname, int type, int OCID, int ColumnID, int ParentID) { string userid = IESCookie.GetCookieValue("ies"); IES.JW.Model.User user = new IES.JW.Model.User { UserID = Int32.Parse(userid) }; user = UserService.User_Get(user); OCSiteColumn column = new OCSiteColumn(); column.ColumnID = ColumnID; column.OCID = OCID; column.Title = columnsname; column.UserID = user.UserID; column.ParentID = ParentID; column.ContentType = type; ISiteBLL ocbll = new SiteBLL(); return(ocbll.OCSiteColumn_Edit(column)); }
public void SiteImportFromFileTest() { string _Content = System.IO.File.ReadAllText("Site.json"); byte[] toEncodeAsBytes = System.Text.ASCIIEncoding.ASCII.GetBytes(_Content); _Content = "64base," + System.Convert.ToBase64String(toEncodeAsBytes); var _NewSiteID = new SiteBLL().Import(new data.binding.FileRead { FileContent = _Content, FileName = "Site.json" }); Assert.IsNotNull(_NewSiteID); Assert.IsTrue(_NewSiteID != 0); //VERIFY ROOTS var _Tree = new ContentBLL().GetContent(_NewSiteID, null, "home", "es"); var _TreeRoots = new ContentBLL().GetByRoot(_NewSiteID, null, "home", "es"); Assert.IsNotNull(_Tree); Assert.IsNotNull(_TreeRoots); Assert.IsTrue(_Tree.Items.Count == _TreeRoots.Items.Count); new SiteBLL().Delete(_NewSiteID); }
protected void Page_Load(object sender, EventArgs e) { string sql = @" select top 3 CategoryID,title, ArticleID,CateCallIndex,CL_Name,Imgurl from SYS_Article,SYS_Category,SYS_channel where SYS_Article.CategoryID=SYS_Category.CateID and sys_article.ChannelID=SYS_channel.CL_ID and CategoryID={0} and Imgurl<>'' and Islock<>1 order by Istop desc,Sortid desc,ArticleID desc "; sql = string.Format(sql, ClassID); using (SiteBLL bll = new SiteBLL()) { List<EmptyTable> ls = bll.GetList<EmptyTable>(sql); string ids = string.Empty; if (ls != null && ls.Count > 0) { foreach (EmptyTable et in ls) { ids += et.Get<string>("ArticleID") + ","; } } this.rpt_List_Photo.DataSource = ls; sql = @" select top 2 CategoryID,title, ArticleID,CateCallIndex,CL_Name from SYS_Article,SYS_Category,SYS_channel where SYS_Article.CategoryID=SYS_Category.CateID and sys_article.ChannelID=SYS_channel.CL_ID and CategoryID={0} {1} and Islock<>1 order by Istop desc,Sortid desc,ArticleID desc "; if (!string.IsNullOrEmpty(ids)) { ids = ids.TrimEnd(','); ids = " and ArticleID not in("+ids+")"; } sql = string.Format(sql, ClassID,ids); this.rpt_List_News.DataSource = bll.GetList<EmptyTable>(sql); this.Page.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { base.ChkAdminLevel("sys_CreatePage", "view"); SiteBLL bll = new SiteBLL(); StringBuilder sb = new StringBuilder(); string f = "<option value=\"{0}\">{1}</option>"; //获取频道信息 List<EmptyTable> ls = bll.GetList<EmptyTable>("select CL_ID, CL_Name,CL_Title from SYS_channel where CL_TypeID=1 order by CL_Sort desc"); List<EmptyTable> inLs = null; List<EmptyTable> sls = null; if (ls != null && ls.Count > 0) { foreach (EmptyTable ety in ls) { sb.AppendLine(string.Format(f, ety.Get<string>("CL_Name") + "|" + ety.Get<int>("CL_ID"), ety.Get<string>("CL_Title"))); //获取频道下的类别 inLs = bll.GetList<EmptyTable>("select CateID,CateCallIndex,Catetitle from SYS_Category where ChannelID=" + ety.Get<int>("CL_ID") + " and CateParentID=0 order by CateSortID desc,CateID desc"); if (inLs != null && inLs.Count > 0) { foreach (EmptyTable inety in inLs) { sb.AppendLine(string.Format(f, inety.Get<string>("CateCallIndex") + "|" + ety.Get<int>("CL_ID") + "|" + inety.Get<int>("CateID"), "├" + inety.Get<string>("Catetitle"))); sls = bll.GetList<EmptyTable>("select CateID,CateCallIndex,Catetitle from SYS_Category where CateParentID=" + inety.Get<int>("CateID") + " and CateParentID=0 order by CateSortID desc,CateID desc"); if (sls != null && sls.Count > 0) { foreach (EmptyTable et in sls) { sb.AppendLine(string.Format(f, et.Get<string>("CateCallIndex") + "|" + ety.Get<int>("CL_ID") + "|" + et.Get<int>("CateID"), " ├" + et.Get<string>("Catetitle"))); } } } } } } this.ChannelList = sb.ToString(); }
public static List <OCSiteColumn> OCSiteColumn_Tree(int OCID) { ISiteBLL ocbll = new SiteBLL(); string userid = IESCookie.GetCookieValue("ies"); if (userid != "-1") { IES.JW.Model.User user = new IES.JW.Model.User { UserID = Int32.Parse(userid) }; user = UserService.User_Get(user); List <OCSite> ocsitelist = ocbll.OCSite_Get(OCID, user.UserID); OCSite ocsite = null; if (ocsitelist != null && ocsitelist.Count > 0) { ocsite = ocsitelist[0]; } OCSiteColumn ocsitecolumn = new OCSiteColumn(); List <OCSiteColumn> listcolumn = ocbll.OCSiteColumn_Tree(OCID, user.UserID); ForeachPropertyNode(listcolumn, ocsitecolumn, 0, ocsite); return(ocsitecolumn.Children); } else { List <OCSite> ocsitelist = ocbll.OCSite_Get(OCID, -1); OCSite ocsite = null; if (ocsitelist != null && ocsitelist.Count > 0) { ocsite = ocsitelist[0]; } OCSiteColumn ocsitecolumn = new OCSiteColumn(); List <OCSiteColumn> listcolumn = ocbll.OCSiteColumn_Tree(OCID, -1); ForeachPropertyNode(listcolumn, ocsitecolumn, 0, ocsite); return(ocsitecolumn.Children); } }
public void CreateSiteHtml() { string strFileName = Loneu.Common.File.CommFile.ReadFile(Server.MapPath("newbar.html")); Response.Write(strFileName); string pagePath = string.Empty; string webUrl = string.Empty; string newPageName = string.Empty; bool rs; //文件夹 string contentpath = string.Empty; List<EmptyTable> lsety = null; int allcount, pagesize=15,allpages=1, pagecount=5; //生成内容页 string sql = "select ArticleID,CateCallIndex from SYS_Article as a inner join SYS_Category as b on a.CategoryID=b.CateID where a.Islock=0 {0} order by Addtime desc "; string spandate = ContentSpan(); sql = string.Format(sql,spandate); using (SiteBLL bll = new SiteBLL()) { lsety = bll.GetList<EmptyTable>(sql); if (lsety != null && lsety.Count > 0) { int count = lsety.Count; for (int i = 1; i <= lsety.Count; i++) { if (i == 1) { Response.Write("<script>SetTitle('开始生成内容页');</script>"); } Response.Write("<script>loadBar(" + i + "," + lsety.Count + ");</script>"); contentpath = Server.MapPath("../../" + lsety[i - 1].Get<string>("CateCallIndex") + "/"); if (!System.IO.Directory.Exists(contentpath)) System.IO.Directory.CreateDirectory(contentpath); webUrl = websiteurl + "NewsShow.aspx?id=" + lsety[i - 1].Get<int>("ArticleID"); Loneu.Web.UI.ComPage.CreatePage.CreateOnePage(webUrl, contentpath, lsety[i - 1].Get<int>("ArticleID") + ".html"); Thread.Sleep(100); } } else { Response.Write("<b>恭喜,一键生成完成!</b>"); Response.End(); } } string weburls = string.Empty; string pagename = "List_{0}_{1}.html"; string pagenames = string.Empty; //生成列表页 // sql = "select a.CateCallIndex,a.CateID,b.CL_ID,b.CL_Name from SYS_Category as a inner join SYS_Channel as b on a.ChannelID=b.CL_ID"; #region 生成频道列表页 sql = "select CL_ID,CL_Name from SYS_Channel order by CL_ID desc"; using (SiteBLL bll = new SiteBLL()) { lsety = bll.GetList<EmptyTable>(sql); if (lsety != null && lsety.Count > 0) { //生成列表 foreach (EmptyTable et in lsety) { contentpath = Server.MapPath("../../" + et.Get<string>("CL_Name") + "/"); if (!System.IO.Directory.Exists(contentpath)) System.IO.Directory.CreateDirectory(contentpath); //生成频道列表 allcount = bll.GetCount("select count(1) from SYS_Article where Islock=0 and ChannelID=" + et.Get<int>("CL_ID")); webUrl = websiteurl + "NewsList.aspx?channelid=" + et.Get<int>("CL_ID") + "&AsPage={0}&AsCount=" + allcount; if (allcount % pagesize == 0) { allpages = allcount / pagesize; } else { allpages = (allcount / pagesize) + 1; } //添加最大页数限制 if (pagecount != 0 && pagecount < allpages) allpages = pagecount; for (int i = 1; i <= allpages; i++) { weburls = string.Format(webUrl, i); pagenames = string.Format(pagename, et.Get<int>("CL_ID"),i); if (i == 1) { //Response.Write(System.DateTime.Now.ToString("g") + ":开始生成频道列表页..."); //Response.Write(strFileName); Response.Write("<script>SetTitle('开始生成频道列表页');</script>"); Loneu.Web.UI.ComPage.CreatePage.CreateOnePage(weburls, contentpath, pagenames); Loneu.Web.UI.ComPage.CreatePage.CreateOnePage(weburls, contentpath, "index.html"); } else { Loneu.Web.UI.ComPage.CreatePage.CreateOnePage(weburls, contentpath, pagenames); } Response.Write("<script>loadBar(" + i + "," + allpages + ");</script>"); Thread.Sleep(100); } } } //生成首页 pagePath = Server.MapPath("../../"); webUrl = websiteurl + "Index.aspx"; newPageName = "index.html"; rs = Loneu.Web.UI.ComPage.CreatePage.CreateOnePage(webUrl, pagePath, newPageName); Response.Write("<script>SetTitle('开始生成首页');</script>"); Response.Write("<script>loadBar(1,1);</script>"); } #endregion #region 生成类别列表 sql = "select a.CateCallIndex,a.CateID,b.CL_ID,b.CL_Name from SYS_Category as a inner join SYS_Channel as b on a.ChannelID=b.CL_ID"; using (SiteBLL bll = new SiteBLL()) { lsety = bll.GetList<EmptyTable>(sql); if (lsety != null && lsety.Count > 0) { //生成列表 foreach (EmptyTable et in lsety) { contentpath = Server.MapPath("../../" + et.Get<string>("CateCallIndex") + "/"); if (!System.IO.Directory.Exists(contentpath)) System.IO.Directory.CreateDirectory(contentpath); //生类别列表 allcount = bll.GetCount("select count(1) from SYS_Article where Islock=0 and CategoryID=" + et.Get<int>("CateID")); webUrl = websiteurl + "NewsList.aspx?channelid=" + et.Get<int>("CL_ID") + "&classid=" + et.Get<int>("CateID") + "&AsPage={0}&AsCount=" + allcount; if (allcount % pagesize == 0) { allpages = allcount / pagesize; } else { allpages = (allcount / pagesize) + 1; } //添加最大页数限制 if (pagecount != 0 && pagecount < allpages) allpages = pagecount; for (int i = 1; i <= allpages; i++) { weburls = string.Format(webUrl, i); pagenames = string.Format(pagename, et.Get<int>("CL_ID"), i); if (i == 1) { //Response.Write(System.DateTime.Now.ToString("g") + ":开始生成栏目列表页..."); //Response.Write(strFileName); Response.Write("<script>SetTitle('开始生成栏目列表页');</script>"); Loneu.Web.UI.ComPage.CreatePage.CreateOnePage(weburls, contentpath, pagenames); Loneu.Web.UI.ComPage.CreatePage.CreateOnePage(weburls, contentpath, "index.html"); } else { Loneu.Web.UI.ComPage.CreatePage.CreateOnePage(weburls, contentpath, pagenames); } Response.Write("<script>loadBar(" + i + "," + allpages + ");</script>"); Thread.Sleep(100); } } } } #endregion Response.Write("<b>恭喜,一键生成完成!</b>"); }
void CreateClassHtml() { //文件夹名称 string dir = string.Empty; string listid = string.Empty; bool ischanel = false; string pagename = string.Empty; int allpages = 1; int pagesize = 15; string chid = string.Empty; string strFileName = Loneu.Common.File.CommFile.ReadFile(Server.MapPath("bar.htm")); int pagecount = 0; if (!int.TryParse(Web9long.Web.Util.Query("page"), out pagecount)) pagecount = 0; //获取生成参数 string strclass = Web9long.Web.Util.Query("newslist"); string[] a = strclass.Split('|'); if (a.Length == 2) { dir = a[0]; listid = a[1]; ischanel = true; } else { dir = a[0]; chid = a[1]; listid = a[2]; } //生成文件夹 string contentpath = Server.MapPath("../../" + dir + "/"); if (!System.IO.Directory.Exists(contentpath)) System.IO.Directory.CreateDirectory(contentpath); string weburls = ""; string pagenames = ""; int allcount; pagename = "List_" + listid + "_{0}.html"; string weburl = string.Empty; if (ischanel) { using (SiteBLL bll = new SiteBLL()) { //生成频道列表 allcount = bll.GetCount("select count(1) from SYS_Article where Islock=0 and ChannelID=" + listid); weburl = websiteurl + "NewsList.aspx?channelid=" + listid + "&AsPage={0}&AsCount=" + allcount; if (allcount % pagesize == 0) { allpages = allcount / pagesize; } else { allpages = (allcount / pagesize) + 1; } Response.Write(strFileName); //添加最大页数限制 if (pagecount != 0 && pagecount < allpages) allpages = pagecount; for (int i = 1; i <= allpages; i++) { Response.Write("<script>loadBar(" + i + "," + allpages + ");</script>"); weburls = string.Format(weburl, i); pagenames = string.Format(pagename, i); if (i == 1) { Loneu.Web.UI.ComPage.CreatePage.CreateOnePage(weburls, contentpath, pagenames); Loneu.Web.UI.ComPage.CreatePage.CreateOnePage(weburls, contentpath, "index.html"); } else { Loneu.Web.UI.ComPage.CreatePage.CreateOnePage(weburls, contentpath, pagenames); } Thread.Sleep(100); } } } else { using (SiteBLL bll = new SiteBLL()) { //生成类别列表 allcount = bll.GetCount("select count(1) from SYS_Article where Islock=0 and CategoryID=" + listid); if (allcount % pagesize == 0) allpages = allcount / pagesize; else allpages = (allcount / pagesize) + 1; //添加最大页数限制 if (pagecount != 0 && pagecount < allpages) allpages = pagecount; weburl = websiteurl + "NewsList.aspx?channelid=" + chid + "&classid=" + listid + "&AsPage={0}&AsCount=" + allcount; Response.Write(strFileName); for (int i = 1; i <= allpages; i++) { Response.Write("<script>loadBar(" + i + "," + allpages + ");</script>"); weburls = string.Format(weburl, i); pagenames = string.Format(pagename, i); if (i == 1) { Loneu.Web.UI.ComPage.CreatePage.CreateOnePage(weburls, contentpath, pagenames); Loneu.Web.UI.ComPage.CreatePage.CreateOnePage(weburls, contentpath, "index.html"); } else { Loneu.Web.UI.ComPage.CreatePage.CreateOnePage(weburls, contentpath, pagenames); } Thread.Sleep(100); } } } }
/// <summary> /// 获取频道类别名称 /// </summary> /// <param name="chid"></param> /// <returns></returns> public string getClassLink(int chid, int count) { StringBuilder strbuilder = new StringBuilder(); string sql = "select top " + count + " CateCallIndex,Catetitle from SYS_Category where ChannelID=" + chid + " and CateParentID=0 order by CateSortID desc,CateID desc"; using (SiteBLL bll = new SiteBLL()) { List<EmptyTable> ls = bll.GetList<EmptyTable>(sql); if (ls != null && ls.Count > 0) { foreach (EmptyTable et in ls) { strbuilder.AppendFormat("<a href=\"http://" + Web9long.Web.Util.GetHttpUrl() + "{0}/\" target=\"_blank\">{1}</a>", et.Get<string>("CateCallIndex"), et.Get<string>("Catetitle")); } } } return strbuilder.ToString(); }
public void SiteExportTest() { var _URL = new SiteBLL().Export(_SiteID); Assert.IsNotNull(_URL); }
protected void Page_Load(object sender, EventArgs e) { using (SiteBLL bll = new SiteBLL()) { int newid; if (!int.TryParse(Web9long.Web.Util.Query("id"), out newid)) Web9long.Web.Clew.AlertBack("参数错误"); etyInfo = bll.GetOnlyRow<EmptyTable>("select * from SYS_Article where ArticleID=" + newid); etyInfo.Set("content",GetInnerlink(etyInfo.Get<string>("content"))); if (etyInfo == null) Web9long.Web.Clew.AlertBack("查找的信息不存在"); etyChannel = bll.GetOnlyRow<EmptyTable>("select * from SYS_channel where CL_ID=" + etyInfo.Get<string>("ChannelID")); etyClass = bll.GetOnlyRow<EmptyTable>("select * from SYS_Category where CateID=" + etyInfo.Get<string>("CategoryID")); string sql = @" select top 11 CategoryID,title, ArticleID,CateCallIndex,CL_Name,Addtime,Zhaiyao,Catetitle from SYS_Article,SYS_Category,SYS_channel where SYS_Article.CategoryID=SYS_Category.CateID and sys_article.ChannelID=SYS_channel.CL_ID and Islock<>1 and Isred=1 order by Addtime desc,Sortid desc,ArticleID desc "; List<EmptyTable> ls = bll.GetList<EmptyTable>(sql); if (ls != null && ls.Count > 0) { topety = ls[0]; ls.Remove(topety); } this.rpt_list_tuijian.DataSource = ls; //频道精华 sql = @" select top 11 CategoryID,title, ArticleID,CateCallIndex,CL_Name,Addtime,Zhaiyao from SYS_Article,SYS_Category,SYS_channel where SYS_Article.CategoryID=SYS_Category.CateID and sys_article.ChannelID=SYS_channel.CL_ID and Islock<>1 and Isred=1 {0} order by Sortid desc,Addtime desc,ArticleID desc "; sql = string.Format(sql, " and sys_article.ChannelID=" + etyInfo.Get<string>("ChannelID")); this.rpt_topNew.DataSource = bll.GetList<EmptyTable>(sql); //相关文章 sql = @" select top 6 CategoryID,title, ArticleID,CateCallIndex,CL_Name,Addtime,Zhaiyao,Imgurl,Seokeywords from SYS_Article,SYS_Category,SYS_channel where SYS_Article.CategoryID=SYS_Category.CateID and sys_article.ChannelID=SYS_channel.CL_ID and Islock<>1 and Imgurl<>'' {0} order by Sortid desc,Addtime desc,ArticleID desc "; StringBuilder sb = new StringBuilder(); string keywwords=etyInfo.Get<string>("Seokeywords"); if(string.IsNullOrEmpty(keywwords)) { string[] a = keywwords.Split(','); if (a.Length > 0) { sb.Append(" and ("); int i = 0; foreach (string s in a) { if(i==0) sb.Append(" Seokeywords like '%" + s + ",'"); else sb.Append(" or Seokeywords like '%" + s + ",'"); } sb.Append(")"); } } sql = string.Format(sql,sb.ToString()); ls = bll.GetList<EmptyTable>(sql); rpt_list_6More.DataSource = ls; this.Page.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { using (SiteBLL bll = new SiteBLL()) { if (!int.TryParse(Web9long.Web.Util.Query("channelid"), out channelid)) Web9long.Web.Clew.AlertBack("参数错误"); if (!int.TryParse(Web9long.Web.Util.Query("classid"), out categoryid)) categoryid = 0; //绑定频道下的类别 List<EmptyTable> ls = bll.GetList<EmptyTable>("select CateID,CateCallIndex,Catetitle,Cateseotitle,Cateseokeywords,Cateseodescription from SYS_Category where ChannelID=" + this.channelid + " order by CateSortID desc,CateID desc"); if (ls != null && ls.Count > 0) { foreach (EmptyTable et in ls) { if (et.Get<int>("CateID") == categoryid) etyClass = et; break; } } etyChannel = bll.GetOnlyRow<EmptyTable>("select * from SYS_channel where CL_ID=" + channelid); seotitle = etyChannel.Get<string>("CL_SeoTitle"); seokeywords = etyChannel.Get<string>("CL_Keywords"); seodes = etyChannel.Get<string>("CL_Description"); if (categoryid > 0) { etyClass = bll.GetOnlyRow<EmptyTable>("select * from SYS_Category where CateID=" + categoryid); seotitle = etyClass.Get<string>("Cateseotitle"); seokeywords = etyClass.Get<string>("Cateseokeywords"); seodes = etyClass.Get<string>("Cateseodescription"); } Com_Config webconfig = Loneu.BLL.Config.WebSiteConfig.Info(); this.rpt_class.DataSource = ls; this.rpt_class.DataBind(); //内容列表 HtmlPageUrl1.Pagesize = 15; HtmlPageUrl1.Nowpage = int.Parse(Web9long.Web.Util.Query("AsPage")); HtmlPageUrl1.Allcount = int.Parse(Web9long.Web.Util.Query("AsCount")); if (categoryid > 0) { HtmlPageUrl1.Pagename = "List_" + categoryid.ToString(); } else { HtmlPageUrl1.Pagename = "List_" + channelid.ToString(); } Web9long.DB.SqlCreate strsql = new Web9long.DB.MSSQL().GetSqlCreate(); strsql.Table = "(select ArticleID,SYS_Article.ChannelID,CategoryID,title,Sortid,Addtime,Ismsg,Istop,Isred,Ishot,Isslide,Catetitle,CateCallIndex,Zhaiyao from SYS_Article,SYS_Category where CategoryID=CateID ) t"; strsql.Fild = "ArticleID,ChannelID,CategoryID,title,Sortid,Addtime,Ismsg,Istop,Isred,Ishot,Isslide,Catetitle,CateCallIndex,Zhaiyao"; strsql.Order = "order by Istop desc,Sortid desc,ArticleID desc"; strsql.AddAndWhere(" ChannelID=" + this.channelid); if (this.categoryid > 0) strsql.AddAndWhere("CategoryID=" + this.categoryid); if (AsGet2.Count == 0) AsGet2.Count = bll.GetCount(AsGet2.MakeCountSql(strsql.Table, strsql.Where)); AsGet2.Compute(); this.rpt_ContentList.DataSource = bll.GetList<EmptyTable>(AsGet2.MakeSql(strsql.Fild, strsql.Table, strsql.Where, "ArticleID", strsql.Order)); this.rpt_ContentList.DataBind(); string sql = @" select top 10 CategoryID,Catetitle, title, ArticleID,CateCallIndex,CL_Name,Addtime,Zhaiyao from SYS_Article,SYS_Category,SYS_channel where SYS_Article.CategoryID=SYS_Category.CateID and sys_article.ChannelID=SYS_channel.CL_ID and Islock<>1 {0} order by ClickHits desc,Sortid desc,ArticleID desc "; if (this.categoryid > 0) { sql = string.Format(sql, " and sys_article.ChannelID=" + this.channelid + " and SYS_Article.CategoryID=" + this.categoryid); } else { sql = string.Format(sql, " and sys_article.ChannelID=" + this.channelid); } this.rpt_list_hot.DataSource = bll.GetList<EmptyTable>(sql); sql = @" select top 11 CategoryID,title, ArticleID,CateCallIndex,CL_Name,Addtime,Zhaiyao,Catetitle from SYS_Article,SYS_Category,SYS_channel where SYS_Article.CategoryID=SYS_Category.CateID and sys_article.ChannelID=SYS_channel.CL_ID and Islock<>1 and Isred=1 order by Addtime desc,Sortid desc,ArticleID desc "; ls = bll.GetList<EmptyTable>(sql); if (ls != null && ls.Count > 0) { topety = ls[0]; ls.Remove(topety); } this.rpt_list_tuijian.DataSource = ls; this.Page.DataBind(); } }
public static void OC_Brief_Upd(int OCID, string Brief) { ISiteBLL ocbll = new SiteBLL(); ocbll.OC_Brief_Upd(OCID, Brief); }
public static List <IES.Resource.Model.File> File_OCPreviewMP4_List(int OCID) { ISiteBLL ocbll = new SiteBLL(); return(ocbll.File_OCPreviewMP4_List(OCID)); }
public static List <IES.CC.OC.Model.OC> OC_Get(int OCID) { ISiteBLL ocbll = new SiteBLL(); return(ocbll.OC_Get(OCID)); }
void CreateContentHtml() { string dir = string.Empty; string cateid = string.Empty; string chid = string.Empty; bool ischanel = false; List<EmptyTable> lsety = null; string sql = string.Empty; string strFileName = Loneu.Common.File.CommFile.ReadFile(Server.MapPath("bar.htm")); string weburl = string.Empty; //获取生成参数 string strclass = Web9long.Web.Util.Query("newslist"); string[] a = strclass.Split('|'); if (a.Length == 2) { dir = a[0]; chid = a[1]; ischanel = true; } else { dir = a[0]; chid = a[1]; cateid = a[2]; } //生成文件夹 string contentpath = Server.MapPath("../../" + dir + "/"); if (!System.IO.Directory.Exists(contentpath)) System.IO.Directory.CreateDirectory(contentpath); //频道内容生成 if (ischanel) { sql = "select ArticleID,CateCallIndex from SYS_Article,SYS_Category where SYS_Article.CategoryID=SYS_Category.CateID and Islock<>1 " + ContentSpan() + " {0} order by Addtime desc "; sql = string.Format(sql, " and SYS_Article.ChannelID=" + chid); using (SiteBLL bll = new SiteBLL()) { lsety = bll.GetList<EmptyTable>(sql); if (lsety != null && lsety.Count > 0) { int count = lsety.Count; for (int i = 1; i <= lsety.Count; i++) { contentpath = Server.MapPath("../../" + lsety[i - 1].Get<string>("CateCallIndex") + "/"); if (!System.IO.Directory.Exists(contentpath)) System.IO.Directory.CreateDirectory(contentpath); if (i == 1) { Response.Write(strFileName); } Response.Write("<script>loadBar(" + i + "," + count + ");</script>"); weburl = websiteurl + "NewsShow.aspx?id=" + lsety[i - 1].Get<int>("ArticleID"); Loneu.Web.UI.ComPage.CreatePage.CreateOnePage(weburl, contentpath, lsety[i - 1].Get<int>("ArticleID") + ".html"); Thread.Sleep(100); } } } } else { sql = "select ArticleID ,CateCallIndex from SYS_Article,SYS_Category where SYS_Article.CategoryID=SYS_Category.CateID and Islock<>1 " + ContentSpan() + " and CategoryID=" + cateid + " and SYS_Article.ChannelID=" + chid + " order by Addtime desc "; using (SiteBLL bll = new SiteBLL()) { //类别内容生成 lsety = bll.GetList<EmptyTable>(sql); if (lsety != null && lsety.Count > 0) { int count = lsety.Count; for (int i = 1; i <= lsety.Count; i++) { contentpath = Server.MapPath("../../" + lsety[i - 1].Get<string>("CateCallIndex") + "/"); if (!System.IO.Directory.Exists(contentpath)) System.IO.Directory.CreateDirectory(contentpath); if (i == 1) { Response.Write(strFileName); } Response.Write("<script>loadBar(" + i + "," + count + ");</script>"); weburl = websiteurl + "NewsShow.aspx?id=" + lsety[i - 1].Get<int>("ArticleID"); Loneu.Web.UI.ComPage.CreatePage.CreateOnePage(weburl, contentpath, lsety[i - 1].Get<int>("ArticleID") + ".html"); Thread.Sleep(100); } } } } }
public static List<IES.CC.OC.Model.OCMoocRecruit> MoocRecruit_List(int OCID) { int UserID = -1; try { UserID = UserService.CurrentUser.UserID; } catch (Exception e) { UserID = -1; } ISiteBLL ocbll = new SiteBLL(); List<IES.CC.OC.Model.OCMoocRecruit> ocMoocList = ocbll.OCMoocRecruitClassDesc_List(OCID, UserID); return ocMoocList; // return new List<OCMoocRecruit>(); }
protected void Page_Load(object sender, EventArgs e) { webconfig = Loneu.BLL.Config.WebSiteConfig.Info(); bll = new SiteBLL(); if (!Loneu.BLL.User.UserDal.CheckUserIsLogin()) Web9long.Web.Clew.Alert("您还没有登录,请登录", "Userlogin.aspx"); }
/// <summary> /// 添加站内链接 /// </summary> /// <param name="strcontent"></param> /// <returns></returns> public string GetInnerlink(string strcontent) { string rs = strcontent; using (SiteBLL bll = new SiteBLL()) { List<EmptyTable> ls = bll.GetList<EmptyTable>("select * from Com_InnerLink where YN_State=0"); string inlink = string.Empty; foreach (EmptyTable et in ls) { inlink = et.Get<string>("YN_LinkTitle"); if (strcontent.IndexOf(inlink)!=-1) { inlink = " <a style=\"color:Blue\" href=\"" + et.Get<string>("YN_FLSiteURL") + "\" title=\"" + et.Get<string>("YN_LinkDesc") + "\" target=\"_blank\">" + et.Get<string>("YN_LinkTitle") + "</a> "; rs = rs.Replace(et.Get<string>("YN_LinkTitle"),inlink); } } } return rs; }
/// <summary> /// 获取频道中的栏目列表 /// </summary> /// <returns></returns> public string GetChanelList() { StringBuilder sb = new StringBuilder(); string f = "<option value=\"{0}\">{1}</option>"; sb.AppendLine("<option value=\"\" selected=\"selected\">请选择</option>"); using (SiteBLL bll = new SiteBLL()) { //获取频道信息 List<EmptyTable> ls = bll.GetList<EmptyTable>("select CL_ID, CL_Name,CL_Title from SYS_channel where CL_TypeID=1 order by CL_Sort desc"); List<EmptyTable> inLs = null; List<EmptyTable> sls = null; if (ls != null && ls.Count > 0) { foreach (EmptyTable ety in ls) { sb.AppendLine(string.Format(f, ety.Get<int>("CL_ID"), ety.Get<string>("CL_Title"))); //获取频道下的类别 inLs = bll.GetList<EmptyTable>("select CateID,CateCallIndex,Catetitle from SYS_Category where ChannelID=" + ety.Get<int>("CL_ID") + " and CateParentID=0 order by CateSortID desc,CateID desc"); if (inLs != null && inLs.Count > 0) { foreach (EmptyTable inety in inLs) { sb.AppendLine(string.Format(f, ety.Get<int>("CL_ID") + "|" + inety.Get<int>("CateID"), "├" + inety.Get<string>("Catetitle"))); sls = bll.GetList<EmptyTable>("select CateID,CateCallIndex,Catetitle from SYS_Category where CateParentID=" + inety.Get<int>("CateID") + " and CateParentID=0 order by CateSortID desc,CateID desc"); if (sls != null && sls.Count > 0) { foreach (EmptyTable et in sls) { sb.AppendLine(string.Format(f, ety.Get<int>("CL_ID") + "|" + et.Get<int>("CateID"), " ├" + et.Get<string>("Catetitle"))); } } } } } } } return sb.ToString(); }
/// <summary> /// 内容分页 /// </summary> /// <param name="chid"></param> /// <param name="nowid"></param> /// <returns></returns> public string ContentPageList(int catid, int nowid) { StringBuilder sb = new StringBuilder(); EmptyTable ety = null; sb.AppendLine(" <div class=\"pianshu\">"); string sql = @" select top 1 CategoryID,title, ArticleID,CateCallIndex,Addtime from SYS_Article,SYS_Category where SYS_Article.CategoryID=SYS_Category.CateID and Islock<>1 and ArticleID <{0} and CategoryID={1} order by ArticleID desc "; //上一页 using (SiteBLL bll = new SiteBLL()) { ety = bll.GetOnlyRow<EmptyTable>(string.Format(sql, nowid, catid)); if (ety != null) sb.AppendLine("上一篇:<a href=\"http://" + Web9long.Web.Util.GetHttpUrl() + ety.Get<string>("CateCallIndex") + "/" + ety.Get<string>("ArticleID") + ".html\">" + ety.Get<string>("title") + "</a>"); //下一页 sql = @" select top 1 CategoryID,title, ArticleID,CateCallIndex,Addtime from SYS_Article,SYS_Category where SYS_Article.CategoryID=SYS_Category.CateID and Islock<>1 and ArticleID >{0} and CategoryID={1} order by ArticleID desc "; ety = bll.GetOnlyRow<EmptyTable>(string.Format(sql, nowid, catid)); if (ety != null) sb.AppendLine("下一篇:<a href=\"http://" + Web9long.Web.Util.GetHttpUrl() + ety.Get<string>("CateCallIndex") + "/" + ety.Get<string>("ArticleID") + ".html\">" + ety.Get<string>("title") + "</a>"); sb.AppendLine("</div> "); return sb.ToString(); } }
protected void Page_Load(object sender, EventArgs e) { bll = new SiteBLL(); EmptyTable ety = new EmptyTable(); string action = Web9long.Web.Util.Form("actype"); string sql = string.Empty; switch (action) { #region 注册个人会员 case"1": //验证用户是否存在 string username = Web9long.Web.Util.Form("txtUserName"); username = Web9long.DB.SQLUtility.Replace(username).Trim(); sql = "select * from US_UserInfo where UI_UserName='******'"; DataTable dt=bll.GetDataTable(sql); if (dt!=null&&dt.Rows.Count>0) Web9long.Web.Clew.AlertBack("注册名已经存在"); ety.TableCondition().TableName = "US_UserInfo"; ety.Set("UI_UserName", username); ety.Set("UI_Mobile", Web9long.DB.SQLUtility.Replace(Web9long.Web.Util.Form("txtMobile"))); ety.Set("UI_UserPwd", Web9long.Encrypt.MD5(Web9long.Web.Util.Form("txtPassword").Trim())); bll.Insert(ety); Response.Redirect("../user/userregok.aspx?username="******"2": username = Web9long.Web.Util.Form("txtUserName"); username = Web9long.DB.SQLUtility.Replace(username).Trim(); string pwd = Web9long.Web.Util.Form("txtPassword").Trim(); bool rember = Web9long.Web.Util.Form("chkRemember")!=""; string result=string.Empty; bool rs = UserDal.UserTryLogin(username, pwd, rember, out result); if (rs) Response.Redirect("../user/index.aspx"); else Web9long.Web.Clew.AlertBack(result); break; #endregion #region 修改密码 case "3": username = Web9long.Web.Util.Form("username"); username = Web9long.DB.SQLUtility.Replace(username).Trim(); pwd = Web9long.Web.Util.Form("txtOldPassword").Trim(); rs = UserDal.UserTryLoin(username, pwd); if (!rs) Web9long.Web.Clew.AlertBack("原密码错误!"); pwd = Web9long.Web.Util.Form("txtPassword").Trim(); rs = UserDal.UpdatePwd(username, pwd); if (rs) Web9long.Web.Clew.Alert("修改密码成功", "../user/changepwd.aspx"); else Web9long.Web.Clew.Alert("修改密码失败", "../user/changepwd.aspx"); break; #endregion #region 注册专家 case "5": username = Web9long.Web.Util.Form("txtUserName"); username = Web9long.DB.SQLUtility.Replace(username).Trim(); sql = "select * from DoctorUserInfo where OF_DocUserName='******'"; dt=bll.GetDataTable(sql); if (dt!=null&&dt.Rows.Count>0) Web9long.Web.Clew.AlertBack("注册名已经存在"); ety.TableCondition().TableName = "DoctorUserInfo"; ety.Set("OF_DocUserName", username); ety.Set("OF_DocMobile", Web9long.DB.SQLUtility.Replace(Web9long.Web.Util.Form("txtMobile"))); ety.Set("OF_DocTrueName", Web9long.DB.SQLUtility.Replace(Web9long.Web.Util.Form("txtTureName"))); ety.Set("OF_DocEmail", Web9long.DB.SQLUtility.Replace(Web9long.Web.Util.Form("txtEmail"))); string tel = Web9long.DB.SQLUtility.Replace(Web9long.Web.Util.Form("txtquhao")) +"-"+ Web9long.DB.SQLUtility.Replace(Web9long.Web.Util.Form("txtTelphone")) +"-"+ Web9long.DB.SQLUtility.Replace(Web9long.Web.Util.Form("txtFenji")); ety.Set("OF_DocTel", tel); ety.Set("OF_DocUserPwd", Web9long.Encrypt.MD5(Web9long.Web.Util.Form("txtPassword").Trim())); bll.Insert(ety); Response.Redirect("../user/RegDoctor2.aspx?username="******"6": ety.TableCondition().TableName = "DoctorUserInfo"; ety.TableCondition().Where = string.Format("OF_DocUserName='******'", Web9long.DB.SQLUtility.Replace(Web9long.Web.Util.Form("docUsername"))); ety.Set("OF_DocProvice", Web9long.DB.SQLUtility.Replace(Web9long.Web.Util.Form("province"))); ety.Set("OF_DocCity", Web9long.DB.SQLUtility.Replace(Web9long.Web.Util.Form("city"))); ety.Set("OF_DocHosptol", Web9long.DB.SQLUtility.Replace(Web9long.Web.Util.Form("txthospital"))); ety.Set("OF_DocOffice", Web9long.DB.SQLUtility.Replace(Web9long.Web.Util.Form("txtoffice"))); bll.Update(ety); Response.Redirect("../user/RegDoctorOK.aspx?username="******"docUsername")); break; #endregion } }
public static List<IES.CC.OC.Model.OC> OC_Get(int OCID) { ISiteBLL ocbll = new SiteBLL(); return ocbll.OC_Get(OCID); }
public void ProcessRequest(HttpContext context) { LoginUser loginUser = new LoginUser(context, "SalesInvoiceSummaryReport"); LotteryOrderBLL bll = new LotteryOrderBLL(context, loginUser); //加载DataGrid if (context.Request["action"] == "gridLoad") { int page = int.Parse(context.Request["page"]); int rows = int.Parse(context.Request["rows"]); string startDate = context.Request["startDate"]; string endDate = context.Request["endDate"]; string city = context.Request["cityId"]; string county = context.Request["countyId"]; string siteId = context.Request["siteId"]; string agentId = context.Request["agentId"]; string terminalId = context.Request["terminalId"]; bll.SalesInvoiceSummaryLoadGrid(page, rows, startDate, endDate, city, county, siteId, agentId, terminalId); } //获取销售总计 if (context.Request["action"] == "totalSale") { string startDate = context.Request["startDate"]; string endDate = context.Request["endDate"]; string city = context.Request["cityId"]; string county = context.Request["countyId"]; string siteId = context.Request["siteId"]; string agentId = context.Request["agentId"]; string terminalId = context.Request["terminalId"]; DataTable dt = bll.GetCommissionTotalSale(startDate, endDate, city, county, siteId, agentId, terminalId); DataRow dr = dt.Rows[0]; context.Response.Write("{\"totalSumbetfee\":" + dr["totalSumbetfee"] + ",\"totalCommissionFee\":" + dr["totalCommissionFee"] + ",\"totalAwardAmount\":" + dr["totalAwardAmount"] + ",\"totalSumTakeCashFee\":" + dr["totalSumTakeCashFee"] + ",\"totalRefundAmount\":" + dr["totalRefundAmount"] + "}"); } //加载市 if (context.Request["action"] == "cityListLoad") { Combobox com = new Combobox(context, loginUser); com.CityCombobox(); } //加载区县 if (context.Request["action"] == "countyListLoad") { string cityId = context.Request["cityId"]; Combobox com = new Combobox(context, loginUser); com.CountyCombobox(cityId); } //加载执法文书类型 if (context.Request["action"] == "siteListLoad") { Combobox com = new Combobox(context, loginUser); string cityId = context.Request["cityId"]; string countyId = context.Request["countyId"]; com.SiteByAreaCombobox(cityId, countyId); } if (context.Request["action"] == "ToExcel") { string startDate = context.Request["startDate"]; string endDate = context.Request["endDate"]; string city = context.Request["cityId"]; string county = context.Request["countyId"]; string siteId = context.Request["siteId"]; string agentId = context.Request["agentId"]; string terminalId = context.Request["terminalId"]; AgentAccDetailBLL agentAccDetailBLL = new AgentAccDetailBLL(context, loginUser); DataTable dt = bll.SalesInvoiceSummaryReport(startDate, endDate, city, county, siteId, agentId, terminalId); //获取预存款余额 List <TTAgentAccDetail> balanceList = agentAccDetailBLL.GetTTAgentAccDetailList(city, county, siteId, agentId, terminalId); int dtRowsCount = dt.Rows.Count + 5; context.Response.ContentType = "application/x-excel"; string fileName = HttpUtility.UrlEncode(startDate + "至" + endDate + "销售统计报表.xls"); context.Response.AddHeader("Content-Disposition", "attachment; fileName=" + fileName); IWorkbook workbook = new HSSFWorkbook(); //创建表 ISheet sheet = workbook.CreateSheet("销售统计报表"); //设置单元的宽度 sheet.SetColumnWidth(0, 20 * 256); sheet.SetColumnWidth(1, 20 * 256); sheet.SetColumnWidth(2, 20 * 256); sheet.SetColumnWidth(3, 20 * 256); sheet.SetColumnWidth(4, 20 * 256); sheet.SetColumnWidth(5, 20 * 256); sheet.SetColumnWidth(6, 20 * 256); #region 合并单元格 CellRangeAddress regionTitle = new CellRangeAddress(0, 0, 0, 6); sheet.AddMergedRegion(regionTitle); CellRangeAddress regionDate = new CellRangeAddress(1, 1, 0, 6); sheet.AddMergedRegion(regionDate); CellRangeAddress regionSearch = new CellRangeAddress(2, 2, 0, 6); sheet.AddMergedRegion(regionSearch); //CellRangeAddress()该方法的参数次序是:开始行号,结束行号,开始列号,结束列号。 IRow row0 = sheet.CreateRow(0); row0.Height = 20 * 20; ICell icell1top0 = row0.CreateCell(0); icell1top0.SetCellValue("销售统计报表"); NOPIHelper.RegionMethod(workbook, sheet, regionTitle, NOPIHelper.Stylexls.标题); IRow row1 = sheet.CreateRow(1); row1.Height = 20 * 20; ICell icell1top1 = row1.CreateCell(0); icell1top1.SetCellValue("日期:" + startDate + "至" + endDate + ""); NOPIHelper.RegionMethod(workbook, sheet, regionDate, NOPIHelper.Stylexls.头); IRow row2 = sheet.CreateRow(2); row2.Height = 20 * 20; ICell icell1top2 = row2.CreateCell(0); var cityName = ""; var countyName = ""; var agentName = ""; var siteName = ""; AgentBLL agentBLL = new AgentBLL(context, loginUser); SiteBLL siteBLL = new SiteBLL(context, loginUser); AreaBLL areaBLL = new AreaBLL(context, loginUser); if (!string.IsNullOrEmpty(agentId)) { var agent = agentBLL.Get(agentId); if (agent != null) { agentName = agent.agentName; } } if (!string.IsNullOrEmpty(siteId)) { siteName = siteBLL.Get(siteId).siteName; } if (!string.IsNullOrEmpty(city)) { cityName = areaBLL.Get(city).areaName; } if (!string.IsNullOrEmpty(county)) { countyName = areaBLL.Get(county).areaName; } icell1top2.SetCellValue("市:" + cityName + " 区县:" + countyName + " 执法文书类型:" + siteName + " 代理商编号:" + agentName + " 终端号:" + terminalId + "");//搜索条件 NOPIHelper.RegionMethod(workbook, sheet, regionSearch, NOPIHelper.Stylexls.头); #endregion #region 设置表头 int rowsNum = 3; //行号 IRow row3 = sheet.CreateRow(rowsNum); row3.Height = 20 * 20; ICell icell1top = row3.CreateCell(0); icell1top.CellStyle = NOPIHelper.Getcellstyle(workbook, NOPIHelper.Stylexls.头); icell1top.SetCellValue("时间"); ICell icell2top = row3.CreateCell(1); icell2top.CellStyle = NOPIHelper.Getcellstyle(workbook, NOPIHelper.Stylexls.头); icell2top.SetCellValue("预存款金额"); ICell icell3top = row3.CreateCell(2); icell3top.CellStyle = NOPIHelper.Getcellstyle(workbook, NOPIHelper.Stylexls.头); icell3top.SetCellValue("销售总额"); ICell icell4top = row3.CreateCell(3); icell4top.CellStyle = NOPIHelper.Getcellstyle(workbook, NOPIHelper.Stylexls.头); icell4top.SetCellValue("佣金金额"); ICell icell5top = row3.CreateCell(4); icell5top.CellStyle = NOPIHelper.Getcellstyle(workbook, NOPIHelper.Stylexls.头); icell5top.SetCellValue("中奖金额"); ICell icell6top = row3.CreateCell(5); icell6top.CellStyle = NOPIHelper.Getcellstyle(workbook, NOPIHelper.Stylexls.头); icell6top.SetCellValue("提现金额"); ICell icell7top = row3.CreateCell(6); icell7top.CellStyle = NOPIHelper.Getcellstyle(workbook, NOPIHelper.Stylexls.头); icell7top.SetCellValue("退款金额"); #endregion #region 合计 rowsNum = 4; //行号 IRow row4 = sheet.CreateRow(rowsNum); row4.Height = 20 * 20; ICell icell1Total = row4.CreateCell(0); icell1Total.CellStyle = NOPIHelper.Getcellstyle(workbook, NOPIHelper.Stylexls.头); icell1Total.SetCellValue("合计"); ICell icell2Total = row4.CreateCell(1); icell2Total.CellStyle = NOPIHelper.Getcellstyle(workbook, NOPIHelper.Stylexls.头); icell2Total.SetCellValue(""); ICell icell3Total = row4.CreateCell(2); icell3Total.CellStyle = NOPIHelper.Getcellstyle(workbook, NOPIHelper.Stylexls.钱); icell3Total.SetCellFormula("SUM(C6:C" + dtRowsCount + ")"); ICell icell4Total = row4.CreateCell(3); icell4Total.CellStyle = NOPIHelper.Getcellstyle(workbook, NOPIHelper.Stylexls.钱); icell4Total.SetCellFormula("SUM(D6:D" + dtRowsCount + ")"); ICell icell5Total = row4.CreateCell(4); icell5Total.CellStyle = NOPIHelper.Getcellstyle(workbook, NOPIHelper.Stylexls.钱); icell5Total.SetCellFormula("SUM(E6:E" + dtRowsCount + ")"); ICell icell6Total = row4.CreateCell(5); icell6Total.CellStyle = NOPIHelper.Getcellstyle(workbook, NOPIHelper.Stylexls.钱); icell6Total.SetCellFormula("SUM(F6:F" + dtRowsCount + ")"); ICell icell7Total = row4.CreateCell(6); icell7Total.CellStyle = NOPIHelper.Getcellstyle(workbook, NOPIHelper.Stylexls.钱); icell7Total.SetCellFormula("SUM(G6:G" + dtRowsCount + ")"); #endregion ICellStyle cellStyleMoney = NOPIHelper.Getcellstyle(workbook, NOPIHelper.Stylexls.钱); ICellStyle cellStyleTime = NOPIHelper.Getcellstyle(workbook, NOPIHelper.Stylexls.时间); ICellStyle cellStyleDefault = NOPIHelper.Getcellstyle(workbook, NOPIHelper.Stylexls.默认); rowsNum = 5; foreach (DataRow dr in dt.Rows) { /******************写入字段值*********************/ row4 = sheet.CreateRow(rowsNum); ICell icel1DateDay = row4.CreateCell(0); icel1DateDay.SetCellValue(dr["dateday"].ToString()); icel1DateDay.CellStyle = cellStyleTime; var balanceGroupList = balanceList.Where(c => DateTime.Parse(c.createTime.Substring(0, 10)) <= DateTime.Parse(dr["dateday"].ToString())) .OrderByDescending(x => x.createTime).GroupBy(x => x.agentId)//必须排序 .Select(g => new { g, count = g.Count() }) .SelectMany(t => t.g.Select(b => b) .Zip(Enumerable.Range(1, t.count), (j, i) => new { j.balance, j.createTime, rn = i })); var advanceBalance = balanceGroupList.Where(c => c.rn == 1).Sum(c => c.balance); ICell icellAdvanceBalance = row4.CreateCell(1); icellAdvanceBalance.SetCellValue(advanceBalance); icellAdvanceBalance.CellStyle = cellStyleMoney; ICell icellSumBetFee = row4.CreateCell(2); icellSumBetFee.SetCellValue(double.Parse(dr["sumBetFee"].ToString())); icellSumBetFee.CellStyle = cellStyleMoney; ICell icel1CommissionFee = row4.CreateCell(3); icel1CommissionFee.SetCellValue(double.Parse(dr["commissionFee"].ToString())); icel1CommissionFee.CellStyle = cellStyleMoney; ICell icel1AwardAmount = row4.CreateCell(4); icel1AwardAmount.SetCellValue(double.Parse(dr["awardAmount"].ToString())); icel1AwardAmount.CellStyle = cellStyleMoney; ICell icel1SumTakeCashFee = row4.CreateCell(5); icel1SumTakeCashFee.SetCellValue(double.Parse(dr["sumTakeCashFee"].ToString())); icel1SumTakeCashFee.CellStyle = cellStyleMoney; ICell icel1RefundAmount = row4.CreateCell(6); icel1RefundAmount.SetCellValue(double.Parse(dr["refundAmount"].ToString())); icel1RefundAmount.CellStyle = cellStyleMoney; rowsNum++; } workbook.Write(context.Response.OutputStream); //输出到流中 } }
protected void Page_Load(object sender, EventArgs e) { webconfig = Loneu.BLL.Config.WebSiteConfig.Info(); bll = new SiteBLL(); }
public static void OCSiteColumn_Move(int ColumnID, string Direction) { ISiteBLL ocbll = new SiteBLL(); ocbll.OCSiteColumn_Move(ColumnID, Direction); }
protected void Page_Load(object sender, EventArgs e) { webconfig = Loneu.BLL.Config.WebSiteConfig.Info(); string sql = string.Empty; string ids = string.Empty; List<EmptyTable> ls = null; using (SiteBLL bll = new SiteBLL()) { #region 今日发布 sql = @" select top 10 CategoryID,title, ArticleID,CateCallIndex,CL_Name,Addtime,Zhaiyao from SYS_Article,SYS_Category,SYS_channel where SYS_Article.CategoryID=SYS_Category.CateID and sys_article.ChannelID=SYS_channel.CL_ID and Islock<>1 and title<>'' order by Addtime desc,Sortid desc,ArticleID desc "; ls = bll.GetList<EmptyTable>(sql); if (ls != null && ls.Count > 0) { topNews = ls[0]; ls.Remove(topNews); } this.rpt_New_9NewsList.DataSource = ls; #endregion #region 热点排行 sql = @" select top 10 CategoryID,title, ArticleID,CateCallIndex,CL_Name,Addtime,Zhaiyao,Imgurl from SYS_Article,SYS_Category,SYS_channel where SYS_Article.CategoryID=SYS_Category.CateID and sys_article.ChannelID=SYS_channel.CL_ID and Islock<>1 and title<>'' and Imgurl<>'' and Isred=1 order by Sortid desc,ArticleID desc "; ls = new List<EmptyTable>(); ls = bll.GetList<EmptyTable>(sql); if (ls != null && ls.Count > 0) { hotNews = ls[0]; ls.Remove(hotNews); } this.rpt_Hits_NewsList.DataSource = ls; #endregion #region 图文精华 sql = @" select top 10 CategoryID,title, ArticleID,CateCallIndex,CL_Name,Addtime,Zhaiyao,Imgurl from SYS_Article,SYS_Category,SYS_channel where SYS_Article.CategoryID=SYS_Category.CateID and sys_article.ChannelID=SYS_channel.CL_ID and Islock<>1 and title<>'' and Imgurl<>'' and Zhaiyao<>'' order by Addtime desc,ArticleID desc "; this.rpt_List_PhotoNews.DataSource = bll.GetList<EmptyTable>(sql); #endregion //夷木百科及纵览 sql = @" select top 10 CategoryID,title, ArticleID,CateCallIndex,CL_Name,Imgurl from SYS_Article,SYS_Category,SYS_channel where SYS_Article.CategoryID=SYS_Category.CateID and sys_article.ChannelID=SYS_channel.CL_ID and sys_article.ChannelID=45 and Islock<>1 order by Istop desc,Sortid desc,ArticleID desc"; this.rpt_list_yimu.DataSource = bll.GetList<EmptyTable>(sql); //数据发布纵横 sql = @" select top 8 CategoryID,title, ArticleID,CateCallIndex,CL_Name,Imgurl from SYS_Article,SYS_Category,SYS_channel where SYS_Article.CategoryID=SYS_Category.CateID and sys_article.ChannelID=SYS_channel.CL_ID and sys_article.ChannelID=39 and Imgurl<>'' and Islock<>1 order by Istop desc,Sortid desc,ArticleID desc"; rpt_list_PostData.DataSource = bll.GetList<EmptyTable>(sql); //空气净化器纵览 sql = @" select top 2 CategoryID,title, ArticleID,CateCallIndex,CL_Name,Imgurl from SYS_Article,SYS_Category,SYS_channel where SYS_Article.CategoryID=SYS_Category.CateID and sys_article.ChannelID=SYS_channel.CL_ID and sys_article.ChannelID=51 and Imgurl<>'' and Islock<>1 order by ArticleID desc "; ls = bll.GetList<EmptyTable>(sql); ids = string.Empty; if (ls != null && ls.Count > 0) { foreach (EmptyTable et in ls) { ids += et.Get<string>("ArticleID") + ","; } } this.rpt_List_Photo_kongqi.DataSource = ls; sql = @" select top 5 CategoryID,title, ArticleID,CateCallIndex,CL_Name from SYS_Article,SYS_Category,SYS_channel where SYS_Article.CategoryID=SYS_Category.CateID and sys_article.ChannelID=SYS_channel.CL_ID and sys_article.ChannelID=51 {0} and Islock<>1 order by ArticleID desc "; if (!string.IsNullOrEmpty(ids)) { ids = ids.TrimEnd(','); ids = " and ArticleID not in(" + ids + ")"; } sql = string.Format(sql, ids); this.rpt_List_News_kongqi.DataSource = bll.GetList<EmptyTable>(sql); //甲醛清除纵览 sql = @" select top 10 CategoryID,title, ArticleID,CateCallIndex,CL_Name from SYS_Article,SYS_Category,SYS_channel where SYS_Article.CategoryID=SYS_Category.CateID and sys_article.ChannelID=SYS_channel.CL_ID and sys_article.ChannelID=56 and Islock<>1 order by Istop desc,Sortid desc,ArticleID desc"; this.rpt_List_jiaquan.DataSource = bll.GetList<EmptyTable>(sql); #region 社区生活纵览 sql = @" select top 2 CategoryID,title, ArticleID,CateCallIndex,CL_Name,Imgurl from SYS_Article,SYS_Category,SYS_channel where SYS_Article.CategoryID=SYS_Category.CateID and sys_article.ChannelID=SYS_channel.CL_ID and sys_article.ChannelID=2 and Imgurl<>'' and Islock<>1 order by Istop desc,Sortid desc,ArticleID desc"; ls = bll.GetList<EmptyTable>(sql); this.rpt_list_shenghuo_Photo.DataSource = ls; ids = string.Empty; if (ls != null && ls.Count > 0) { foreach (EmptyTable et in ls) { ids += et.Get<string>("ArticleID") + ","; } } sql = @" select top 5 CategoryID,title, ArticleID,CateCallIndex,CL_Name from SYS_Article,SYS_Category,SYS_channel where SYS_Article.CategoryID=SYS_Category.CateID and sys_article.ChannelID=SYS_channel.CL_ID and sys_article.ChannelID=2 {0} and Islock<>1 order by Istop desc,Sortid desc,ArticleID desc "; if (!string.IsNullOrEmpty(ids)) { ids = ids.TrimEnd(','); ids = " and ArticleID not in(" + ids + ")"; } sql = string.Format(sql, ids); this.rpt_List_shenghuo_news.DataSource = bll.GetList<EmptyTable>(sql); #endregion //热点纵览 sql = @" select top 10 CategoryID,title, ArticleID,CateCallIndex,CL_Name from SYS_Article,SYS_Category,SYS_channel where SYS_Article.CategoryID=SYS_Category.CateID and sys_article.ChannelID=SYS_channel.CL_ID and sys_article.ChannelID=63 and Islock<>1 order by Istop desc,Sortid desc,ArticleID desc"; rpt_list_Hot.DataSource = bll.GetList<EmptyTable>(sql); } this.Page.DataBind(); }
public static List <OCSiteColumn> OCSiteColumn_Get(int ColumnID) { ISiteBLL ocbll = new SiteBLL(); return(ocbll.OCSiteColumn_Get(ColumnID)); }
public static void OCSite_TemplateID_Upd(int OCID, int TemplateID) { ISiteBLL ocbll = new SiteBLL(); ocbll.OCSite_TemplateID_Upd(OCID, TemplateID); }
public static List<IES.CC.OC.Model.OC> OC_List() { string userid = IESCookie.GetCookieValue("ies"); IES.JW.Model.User user = new IES.JW.Model.User { UserID = Int32.Parse(userid) }; user = UserService.User_Get(user); ISiteBLL ocbll = new SiteBLL(); return ocbll.OC_List(user.UserID, user.UserType); }