Пример #1
0
        protected void rptList_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            string commandName = e.CommandName;

            if (commandName != null)
            {
                if (!(commandName == "delete"))
                {
                    if (!(commandName == "pub"))
                    {
                        return;
                    }
                }
                else
                {
                    NoticeHelper.DelNotice(Globals.ToNum(e.CommandArgument.ToString()));
                    this.ShowMsg("成功删除了指定的" + ((this.sendType == 1) ? "消息" : "公告"), true);
                    this.BindData(this.pageno, this.sendType);
                    return;
                }
                NoticeHelper.NoticePub(Globals.ToNum(e.CommandArgument.ToString()));
                this.ShowMsg("成功发布了指定的" + ((this.sendType == 1) ? "消息" : "公告"), true);
                this.BindData(this.pageno, this.sendType);
            }
        }
        protected void btnDel_Click(object sender, EventArgs e)
        {
            string[] strArray = Globals.RequestFormStr("cbNoticeGroup").Trim().Split(new char[] { ',' });
            int      noticeid = 0;
            int      num2     = 0;

            foreach (string str2 in strArray)
            {
                noticeid = Globals.ToNum(str2);
                if (noticeid > 0)
                {
                    NoticeHelper.DelNotice(noticeid);
                    num2++;
                }
            }
            if (num2 > 0)
            {
                this.ShowMsg("成功删除了指定的" + ((this.sendType == 1) ? "消息" : "公告"), true);
                this.BindData(this.pageno, this.sendType);
            }
            else
            {
                this.ShowMsg("请选择要删除的" + ((this.sendType == 1) ? "消息" : "公告"), false);
            }
        }
Пример #3
0
        protected void rptList_ItemCommand(object source, System.Web.UI.WebControls.RepeaterCommandEventArgs e)
        {
            string commandName;

            if ((commandName = e.CommandName) != null)
            {
                int noticeid;
                if (commandName == "delete")
                {
                    noticeid = Globals.ToNum(e.CommandArgument.ToString());
                    NoticeHelper.DelNotice(noticeid);
                    this.ShowMsg("成功删除了指定的" + ((this.sendType == 1) ? "消息" : "公告"), true);
                    this.BindData(this.pageno, this.sendType);
                    return;
                }
                if (!(commandName == "pub"))
                {
                    return;
                }
                noticeid = Globals.ToNum(e.CommandArgument.ToString());
                NoticeHelper.NoticePub(noticeid);
                this.ShowMsg("成功发布了指定的" + ((this.sendType == 1) ? "消息" : "公告"), true);
                this.BindData(this.pageno, this.sendType);
            }
        }
Пример #4
0
        protected void btnDel_Click(object sender, System.EventArgs e)
        {
            string text = Globals.RequestFormStr("cbNoticeGroup").Trim();

            string[] array = text.Split(new char[]
            {
                ','
            });
            int num = 0;

            string[] array2 = array;
            for (int i = 0; i < array2.Length; i++)
            {
                string s    = array2[i];
                int    num2 = Globals.ToNum(s);
                if (num2 > 0)
                {
                    NoticeHelper.DelNotice(num2);
                    num++;
                }
            }
            if (num > 0)
            {
                this.ShowMsg("成功删除了指定的" + ((this.sendType == 1) ? "消息" : "公告"), true);
                this.BindData(this.pageno, this.sendType);
                return;
            }
            this.ShowMsg("请选择要删除的" + ((this.sendType == 1) ? "消息" : "公告"), false);
        }