Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //判断权限
            if (!CheckGrant(global::Common.Enum.TravelPermission.短信中心_短信中心_栏目))
            {
                Utils.ResponseNoPermit(global::Common.Enum.TravelPermission.短信中心_短信中心_栏目, true);
                return;
            }
            pageIndex = Utils.GetInt(Utils.GetQueryStringValue("Page"), 1);
            itemIndex = (pageIndex - 1) * pageSize + 1;
            EyouSoft.BLL.SMSStructure.CommonWords           commonBll = new EyouSoft.BLL.SMSStructure.CommonWords();
            IList <EyouSoft.Model.SMSStructure.CommonWords> list      = commonBll.GetList(pageSize, pageIndex, ref recordCount, CurrentUserCompanyID, "", 0);

            //绑定短语
            if (list != null && list.Count > 0)
            {
                rptSms.DataSource = list;
                rptSms.DataBind();
                BindExportPage();
            }
            else
            {
                rptSms.EmptyText        = "<tr><td colspan='4' align='center'>对不起,暂无短语信息!</td></tr>";
                ExportPageInfo1.Visible = false;
            }
        }
Example #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //判断权限
            if (!CheckGrant(global::Common.Enum.TravelPermission.短信中心_短信中心_栏目))
            {
                Utils.ResponseNoPermit(global::Common.Enum.TravelPermission.短信中心_短信中心_栏目, true);
                return;
            }
            string method = Utils.GetQueryStringValue("method");            //当前操作

            pageIndex = Utils.GetInt(Utils.GetQueryStringValue("Page"), 1); //获取当前页码
            EyouSoft.BLL.SMSStructure.CommonWords commonBll = new EyouSoft.BLL.SMSStructure.CommonWords();
            //绑定短语类别列表
            IList <EyouSoft.Model.SMSStructure.CommonWordClass> classList = commonBll.GetCommonWordsClass(CurrentUserCompanyID);

            if (classList != null && classList.Count > 0)
            {
                selSmsType.DataTextField  = "ClassName";
                selSmsType.DataValueField = "ID";
                selSmsType.DataSource     = classList;
                selSmsType.DataBind();
            }
            selSmsType.Items.Insert(0, new ListItem("请选择", ""));
            //删除短语
            if (method == "del")
            {
                string cid    = Utils.GetQueryStringValue("cid");
                bool   result = commonBll.DeleteCommonWords(cid.Split(','));
                Utils.ResponseMeg(result, string.Empty);
                return;
            }
            //绑定短语列表
            string smsKeyword = Request.QueryString["smsKeyword"];//短语关键字

            smsKeyword = !string.IsNullOrEmpty(smsKeyword) ? Utils.InputText(Server.UrlDecode(smsKeyword)) : "";
            string cmstype = Utils.GetQueryStringValue("smstype");//短语类别
            IList <EyouSoft.Model.SMSStructure.CommonWords> list = commonBll.GetList(pageSize, pageIndex, ref recordCount, CurrentUserCompanyID, smsKeyword, Utils.GetInt(cmstype));

            if (list != null && list.Count > 0)
            {
                rptSms.DataSource = list;
                rptSms.DataBind();
                BindExportPage();
            }
            else
            {
                rptSms.EmptyText        = "<tr><td colspan='4' align='center'>对不起,暂无短语信息!</td></tr>";
                ExportPageInfo1.Visible = false;
            }
            //恢复查询条件
            txtKeyWord.Value = smsKeyword; //短语关键字
            selSmsType.Value = cmstype;    //短语类别
        }