示例#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);
            }
        }
示例#2
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);
            }
        }