BBSService/Bbs/S_Bbs.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System.Web.Services;
using System.Data;
using System.Xml;
using BaseConfig.BaseBLL;
using BBS.Model;
using BaseConfig;

namespace BBS.WebService
{
    /// <summary>
    ///S_Bbs 的摘要说明
    /// </summary>
    [WebService(Namespace = "http://bbs.netluntan.com")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    public class S_Bbs : System.Web.Services.WebService
    {
        public S_Bbs()
        {

            //如果使用设计的组件,请取消注释以下行 
            //InitializeComponent(); 
        }

        /// <summary>
        /// 返回分论坛下的板块
        /// </summary>
        /// <returns></returns>
        [WebMethod(EnableSession = true)]
        public XmlDocument GetBbsByParentForumId(int parentForumId)
        {
            XmlDocument xd = new XmlDocument(); //表示XML文档
            XmlDeclaration xde;     //声明xml结点

            xde = xd.CreateXmlDeclaration("1.0", "utf-8", null);
            xd.AppendChild(xde);
            XmlElement xe_msgList = xd.CreateElement("Bbs");

            if (Session[SessionKey.USER] == null)
            {
                xe_msgList.SetAttribute("counts", "0");
                xd.AppendChild(xe_msgList);
                return xd;
            }

            X_UserInfo u = (X_UserInfo)Session[SessionKey.USER];
            if (u == null)
            {
                xe_msgList.SetAttribute("counts", "0");
                xd.AppendChild(xe_msgList);
                return xd;
            }
            BBS.BLL.F_Bbs bllbbs = new BBS.BLL.F_Bbs();
            DataTable dt = Pager.GetPager(10, 1, " parentForumId=" + parentForumId, "id", "F_Bbs", "id,forumTitle,parentForumId", true);
            if (dt.Rows.Count > 0)
            {
                xe_msgList.SetAttribute("counts", dt.Rows.Count.ToString());
                xd.AppendChild(xe_msgList);
                foreach (DataRow dr in dt.Rows)
                {
                    XmlElement xe_member = xd.CreateElement("oneForum");
后面还有 15 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。