Ejemplo n.º 1
0
        public ContentResult Msg_API()
        {
            string action = GetParam("action");
            string ids    = GetParam("ids");

            switch (action)
            {
            case "recycle":
                B_GuestBook.UpdateAudit(ids, -1);
                break;

            case "recover":
                B_GuestBook.UpdateAudit(ids, 1);
                break;

            case "del":
                B_GuestBook.DelByIDS(ids);
                break;

            case "audit":
                B_GuestBook.UpdateAudit(ids, 1);
                break;

            case "unaudit":
                B_GuestBook.UpdateAudit(ids, 0);
                break;
            }
            return(Content(Success.ToString()));
        }
        protected void Lnk_Click(object sender, GridViewCommandEventArgs e)
        {
            if (this.Page.IsValid)
            {
                switch (e.CommandName)
                {
                case "QList":
                    Response.Redirect("GuestBookShow.aspx?GID=" + e.CommandArgument.ToString());
                    break;

                case "Reply":
                    Response.Redirect("ReplyGuest.aspx?GID=" + e.CommandArgument.ToString());
                    break;

                case "RList":
                    Response.Redirect("ReplyList.aspx?GID=" + e.CommandArgument.ToString());
                    break;

                case "Del":
                    B_GuestBook.UpdateAudit(e.CommandArgument.ToString(), -1);
                    break;

                case "Del2":
                    int gid = DataConverter.CLng(e.CommandArgument);
                    B_GuestBook.DelByIDS(e.CommandArgument.ToString());
                    break;

                case "Audit":
                    B_GuestBook.UpdateAudit(e.CommandArgument.ToString(), 1);
                    break;

                case "CancelAudit":
                    B_GuestBook.UpdateAudit(e.CommandArgument.ToString(), 0);
                    break;
                }
                MyBind();
            }
        }
 protected void Del_B_Click(object sender, EventArgs e)
 {
     B_GuestBook.DelByIDS(Request.Form["idchk"]);
     this.MyBind();
 }