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

📄 questionscomplexsearch.cs

📁 动易SiteFactory&#8482 网上商店系统1.0源代码
💻 CS
字号:
namespace PowerEasy.WebSite.Admin.Crm
{
    using PowerEasy.Controls;
    using PowerEasy.Crm;
    using PowerEasy.UserManage;
    using PowerEasy.Web.UI;
    using System;
    using System.Text;
    using System.Web.UI.WebControls;
    using System.Xml;

    public class QuestionsComplexSearch : AdminPage
    {
        protected Button BtnSearch;
        protected CheckBoxList ChklQuestionType;
        protected DatePicker DpkBegin;
        protected DatePicker DpkEnd;
        protected DatePicker DpkReplyBegin;
        protected DatePicker DpkReplyEnd;
        protected DropDownList DropAdmin;
        protected RadioButtonList RadlIsMine;
        protected RadioButtonList RadlIsPublc;
        protected RadioButtonList RadlIsReply;
        protected RadioButtonList RadlIsSolved;
        protected RadioButtonList RadlScore;
        protected ExtendedSiteMapPath SmpNavigator;
        protected TextBox TxtAdmin;
        protected TextBox TxtProblemCreator;
        protected TextBox TxtProblemTitle;

        protected void BtnSearch_Click(object sender, EventArgs e)
        {
            string oldValue = "|";
            string s = this.GetQuestionTypeList() + oldValue + this.RadlScore.SelectedValue + oldValue + this.RadlIsReply.SelectedValue + oldValue + this.RadlIsSolved.SelectedValue + oldValue + this.RadlIsPublc.SelectedValue + oldValue + this.RadlIsMine.SelectedValue + oldValue + this.TxtProblemTitle.Text.Trim().Replace(oldValue, "") + oldValue + (string.IsNullOrEmpty(this.DpkBegin.Text) ? string.Empty : this.DpkBegin.Date.ToShortDateString()) + oldValue + (string.IsNullOrEmpty(this.DpkEnd.Text) ? string.Empty : this.DpkEnd.Date.AddDays(1.0).ToShortDateString()) + oldValue + (string.IsNullOrEmpty(this.DpkReplyBegin.Text) ? string.Empty : this.DpkReplyBegin.Date.ToShortDateString()) + oldValue + (string.IsNullOrEmpty(this.DpkReplyEnd.Text) ? string.Empty : this.DpkReplyEnd.Date.AddDays(1.0).ToShortDateString()) + oldValue + this.TxtProblemCreator.Text.Trim().Replace(oldValue, "") + oldValue + this.TxtAdmin.Text.Trim();
            BasePage.ResponseRedirect("ServiceCenterManage.aspx?SearchType=10&Keyword=" + base.Server.UrlEncode(s));
        }

        private string GetQuestionTypeList()
        {
            StringBuilder builder = new StringBuilder();
            foreach (ListItem item in this.ChklQuestionType.Items)
            {
                if (item.Selected)
                {
                    builder.Append(item.Value).Append(",");
                }
            }
            return builder.ToString().TrimEnd(new char[] { ',' });
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!base.IsPostBack)
            {
                this.ChklQuestionType.DataSource = PowerEasy.Crm.QuestionType.GetTypeList();
                this.ChklQuestionType.DataBind();
                XmlDocument document = new XmlDocument();
                document.Load(base.Server.MapPath("~/Config/Question.Config"));
                foreach (XmlNode node in document.SelectNodes("Config/QuestionDifficulty/Item"))
                {
                    this.RadlScore.Items.Add(new ListItem(node.Attributes["Text"].Value, node.Attributes["Value"].Value));
                }
                this.RadlScore.Items.Add(new ListItem("所有难度", "0"));
                BasePage.SetSelectedIndexByValue(this.RadlScore, "0");
                this.DropAdmin.DataSource = Administrators.AdminList(0, 0);
                this.DropAdmin.DataBind();
                this.DropAdmin.Items.Insert(0, new ListItem("请选择...", "0"));
            }
        }
    }
}

⌨️ 快捷键说明

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