⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 contentview.aspx.cs

📁 动易SiteFactory&#8482 网上商店系统1.0源代码
💻 CS
📖 第 1 页 / 共 2 页
字号:
namespace PowerEasy.WebSite.Admin.Contents
{
    using PowerEasy.AccessManage;
    using PowerEasy.Common;
    using PowerEasy.CommonModel;
    using PowerEasy.Components;
    using PowerEasy.Contents;
    using PowerEasy.Controls;
    using PowerEasy.Enumerations;
    using PowerEasy.ExtendedControls;
    using PowerEasy.Model.CommonModel;
    using PowerEasy.Model.Contents;
    using PowerEasy.UserManage;
    using PowerEasy.Web.UI;
    using PowerEasy.WebSite.Controls;
    using System;
    using System.Collections.Generic;
    using System.Data;
    using System.Text;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;

    public class ContentView : AdminPage
    {
        protected StringBuilder arrTrs0 = new StringBuilder();
        protected StringBuilder arrTrs1 = new StringBuilder();
        protected StringBuilder arrTrs2 = new StringBuilder();
        protected StringBuilder arrTrs3 = new StringBuilder();
        protected Button BtnAllComment;
        protected Button BtnAuditedComment;
        protected Button BtnUNAuditedComment;
        protected DataTable contentDataTable;
        protected ExtendedNodeButton EBtnBack;
        protected ExtendedNodeButton EBtnCPass;
        protected ExtendedNodeButton EBtnDelete;
        protected ExtendedNodeButton EBtnEltiy;
        protected ExtendedNodeButton EBtnModify;
        protected ExtendedNodeButton EBtnMove;
        protected ExtendedNodeButton EBtnTop;
        protected ExtendedCheckBoxList EChklUserGroupList;
        protected HiddenField HdnListType;
        protected Label LblEndTime;
        protected Label LblGetNextInfo;
        protected Label LblGetPrevInfo;
        protected Label LblPriority;
        protected Label LblSigninType;
        protected Label LblStatus;
        protected Label LblTitle;
        private int m_floorNumber;
        private int m_GeneralId;
        private bool m_IsEshop;
        protected AspNetPager Pager;
        protected string Path = "";
        protected RadioButtonList RadlInfoPurview;
        protected Repeater RptCommentList;
        protected Repeater RptContent;
        protected Repeater RptSigninLog;
        protected ChargeTypeSetting ShowChargeType;
        protected ExtendedSiteMapPath SmpNavigator;
        protected HtmlTableCell TabTitle5;
        protected HtmlTableCell TabTitle6;
        protected TextBox TxtDividePercent;
        protected TextBox TxtInfoPoint;

        protected void BtnAllComment_Click(object sender, EventArgs e)
        {
            this.HdnListType.Value = "0";
            this.Pager.CurrentPageIndex = 1;
            this.CommentBindData();
        }

        protected void BtnAuditedComment_Click(object sender, EventArgs e)
        {
            this.HdnListType.Value = "1";
            this.Pager.CurrentPageIndex = 1;
            this.CommentBindData();
        }

        protected void BtnUNAuditedComment_Click(object sender, EventArgs e)
        {
            this.HdnListType.Value = "2";
            this.Pager.CurrentPageIndex = 1;
            this.CommentBindData();
        }

        private void CommentBindData()
        {
            this.m_floorNumber = (this.Pager.CurrentPageIndex - 1) * this.Pager.PageSize;
            this.RptCommentList.DataSource = Comment.GetList((this.Pager.CurrentPageIndex - 1) * this.Pager.PageSize, this.Pager.PageSize, this.m_GeneralId, DataConverter.CLng(this.HdnListType.Value));
            this.Pager.RecordCount = Comment.GetTotalOfCommentInfo();
            this.RptCommentList.DataBind();
        }

        protected void EBtnBack_Click(object sender, EventArgs e)
        {
        }

        protected void EBtnCPass_Click(object sender, EventArgs e)
        {
        }

        protected void EBtnDelete_Click(object sender, EventArgs e)
        {
            RolePermissions.BusinessAccessCheck(OperateCode.NodeContentManage, DataConverter.CLng(this.contentDataTable.Rows[0]["NodeId"]));
            if (ContentManage.UpdateStatus(this.m_GeneralId, -3))
            {
                AdminPage.WriteSuccessMsg("<li>删除成功!</li>", "ContentManage.aspx?NodeID=" + this.contentDataTable.Rows[0]["NodeId"].ToString());
            }
            else
            {
                AdminPage.WriteErrMsg("<li>删除失败!</li>");
            }
        }

        protected void EBtnEltiy_Click(object sender, EventArgs e)
        {
        }

        protected void EBtnModify_Click(object sender, EventArgs e)
        {
            RolePermissions.BusinessAccessCheck(OperateCode.NodeContentManage, DataConverter.CLng(this.contentDataTable.Rows[0]["NodeId"]));
            StringBuilder builder = new StringBuilder();
            if (ModelManager.GetModelInfoById(DataConverter.CLng(this.contentDataTable.Rows[0]["ModelID"].ToString())).IsEshop)
            {
                builder.Append("../shop/Product.aspx");
            }
            else
            {
                builder.Append("Content.aspx");
            }
            builder.Append("?Action=Modify&NodeID=");
            builder.Append(this.contentDataTable.Rows[0]["NodeId"].ToString());
            builder.Append("&GeneralID=");
            builder.Append(this.m_GeneralId.ToString());
            builder.Append("&ModelID=");
            builder.Append(this.contentDataTable.Rows[0]["ModelID"].ToString());
            builder.Append("&LinkType=");
            builder.Append(this.contentDataTable.Rows[0]["LinkType"].ToString());
            BasePage.ResponseRedirect(builder.ToString());
        }

        protected void EBtnMove_Click(object sender, EventArgs e)
        {
        }

        protected void EBtnTop_Click(object sender, EventArgs e)
        {
        }

        protected string GetStatusShow(string status)
        {
            int num = DataConverter.CLng(status);
            switch (num)
            {
                case -3:
                    return "回收站中";

                case -2:
                    return "退稿";

                case -1:
                    return "草稿";

                case 0:
                    return "待审核";

                case 0x63:
                    return "终审通过";
            }
            return "审核中";
        }

        protected string GetValue(string col)
        {
            return this.contentDataTable.Rows[0][col].ToString();
        }

        private void InitCharge(int generalId, bool enableCharge)
        {
            if (enableCharge)
            {
                ContentPermissionInfo contentPermissionInfoById = PermissionContent.GetContentPermissionInfoById(generalId);
                if (!contentPermissionInfoById.IsNull)
                {
                    this.RadlInfoPurview.SelectedValue = contentPermissionInfoById.PermissionType.ToString();
                    if (!string.IsNullOrEmpty(contentPermissionInfoById.ArrGroupId))
                    {
                        string[] strArray = contentPermissionInfoById.ArrGroupId.Split(new char[] { ',' });
                        for (int i = 0; i < strArray.Length; i++)
                        {
                            this.EChklUserGroupList.Items.FindByValue(strArray[i]).Selected = true;
                        }
                    }
                }
                ContentChargeInfo contentChargeInfoById = PowerEasy.Contents.ContentCharge.GetContentChargeInfoById(generalId);
                if (!contentChargeInfoById.IsNull)
                {
                    this.TxtInfoPoint.Text = contentChargeInfoById.InfoPoint.ToString();
                    this.ShowChargeType.ChargeType = contentChargeInfoById.ChargeType;
                    this.ShowChargeType.PitchTime = contentChargeInfoById.PitchTime;
                    this.ShowChargeType.ReadTimes = contentChargeInfoById.ReadTimes;
                    this.TxtDividePercent.Text = contentChargeInfoById.DividePercent.ToString();
                }
            }
        }

        protected void InitComment()
        {
            if (this.m_GeneralId == 0)
            {
                AdminPage.WriteErrMsg("<li>没有找到隶属信息评论,请返回!</li>");
            }
            else
            {
                string s = BasePage.RequestString("Title");
                this.LblTitle.Text = s;
                string returnurl = "ContentView.aspx?GeneralID=" + this.m_GeneralId.ToString() + "&title=" + base.Server.UrlEncode(s);
                int commentId = BasePage.RequestInt32("CommentID");
                switch (BasePage.RequestString("Action"))
                {
                    case "Delete":
                        if (Comment.Delete(commentId))
                        {
                            AdminPage.WriteSuccessMsg("<li>删除指定信息评论成功!</li>", returnurl);
                        }
                        break;

                    case "Audited":
                        if (Comment.SetStatus(commentId, true))
                        {
                            AdminPage.WriteSuccessMsg("<li>指定信息评论审核成功!</li>", returnurl);
                        }
                        break;

                    case "UnAudited":
                        if (Comment.SetStatus(commentId, false))
                        {
                            AdminPage.WriteSuccessMsg("<li>已取消指定评论审核!</li>", returnurl);
                        }
                        break;

                    case "Premier":
                        if (Comment.Elite(commentId, true))
                        {
                            AdminPage.WriteSuccessMsg("<li>设定指定评论精华成功!</li>", returnurl);
                        }
                        break;

                    case "UnPremier":
                        if (Comment.Elite(commentId, false))
                        {
                            AdminPage.WriteSuccessMsg("<li>已取消指定评论精华!</li>", returnurl);
                        }
                        break;

                    case "AddPKZone":
                    {
                        CommentPKZoneInfo commentPKZoneInfo = new CommentPKZoneInfo();
                        commentPKZoneInfo.CommentId = commentId;
                        commentPKZoneInfo.Content = base.Request["ItemContent"];
                        commentPKZoneInfo.Position = DataConverter.CLng(base.Request["RadlPosition"]);
                        commentPKZoneInfo.IP = PEContext.Current.UserHostAddress;
                        commentPKZoneInfo.UpdateTime = DateTime.Now;
                        commentPKZoneInfo.UserName = "匿名发表";
                        CommentPKZone.Add(commentPKZoneInfo);
                        AdminPage.WriteSuccessMsg("<li>感谢您的参与,添加辩论成功!</li>", returnurl);
                        break;
                    }
                }
                this.CommentBindData();
            }
        }

        protected void InitContent()
        {
            IList<FieldInfo> fieldList = Field.GetFieldList(DataConverter.CLng(this.contentDataTable.Rows[0]["ModelID"].ToString()), false);
            this.RptContent.DataSource = fieldList;
            this.RptContent.DataBind();
            IList<UserGroupsInfo> userGroupList = UserGroups.GetUserGroupList(0, 0);
            this.EChklUserGroupList.DataSource = userGroupList;
            this.EChklUserGroupList.DataBind();
        }

        private void InitPage()
        {
            this.Path = this.Page.Request.ApplicationPath.Equals("/") ? string.Empty : this.Page.Request.ApplicationPath;
            this.Path = this.Page.Request.Url.Scheme + "://" + this.Page.Request.Url.Authority + this.Path;
            if (base.Request.UrlReferrer != null)
            {
                this.ViewState["UrlReferrer"] = base.Request.UrlReferrer.ToString();
            }
            this.contentDataTable = ContentManage.GetContentDataById(this.m_GeneralId);
            if ((this.contentDataTable == null) || (this.contentDataTable.Rows.Count == 0))
            {
                AdminPage.WriteErrMsg("<li>指定项目不存在!</li>");
            }
            ModelInfo modelInfoById = ModelManager.GetModelInfoById(DataConverter.CLng(this.contentDataTable.Rows[0]["ModelID"].ToString()));
            if (modelInfoById.IsEshop)
            {
                this.m_IsEshop = true;
                this.TabTitle5.Style.Add("display", "none");
            }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -