Sysnet.EDP.HSE-Commerce.Web/plugins/feedback/admin/index.aspx.cs

(开头部分) 4KB

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

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Sysnet.EDP.HSE_Commerce.Common;
using System.Text;

namespace Sysnet.EDP.HSE_Commerce.Web.Plugin.Feedback.admin
{
    public partial class index : Web.UI.ManagePage
    {
        // Fields
        protected string keywords = "";
        protected int page;
        protected int pageSize;
        protected int totalCount;

        // Methods
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            Sysnet.EDP.HSE_Commerce.Web.Plugin.Feedback.BLL.feedback feedback = new Sysnet.EDP.HSE_Commerce.Web.Plugin.Feedback.BLL.feedback();
            for (int i = 0; i < this.rptList.Items.Count; i++)
            {
                int id = Convert.ToInt32(((HiddenField)this.rptList.Items[i].FindControl("hidId")).Value);
                CheckBox box = (CheckBox)this.rptList.Items[i].FindControl("chkId");
                if (box.Checked)
                {
                    feedback.Delete(id);
                }
            }
            base.JscriptMsg("批量删除成功啦!", Utils.CombUrlTxt("index.aspx", "keywords={0}", new string[] { this.keywords }), "Success");
        }

        protected void btnSearch_Click(object sender, EventArgs e)
        {
            base.Response.Redirect(Utils.CombUrlTxt("index.aspx", "keywords={0}", new string[] { this.txtKeywords.Text }));
        }

        protected string CombSqlTxt(string _keywords)
        {
            StringBuilder builder = new StringBuilder();
            _keywords = _keywords.Replace("'", "");
            if (!string.IsNullOrEmpty(_keywords))
            {
                builder.Append(" and (title like '%" + _keywords + "%' or user_name like '%" + _keywords + "%')");
            }
            return builder.ToString();
        }

        private int GetPageSize(int _default_size)
        {
            int num;
            if (int.TryParse(Utils.GetCookie("feedback_page_size"), out num) && (num > 0))
            {
                return num;
            }
            return _default_size;
        }
后面还有 55 行代码,购买后查看完整代码

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

AI 解读

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

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