lt_update.aspx.cs

来自「OA自动化办公系统,就是OA自动化办公系统」· CS 代码 · 共 44 行

CS
44
字号
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using COM.OA.BLL;
using COM.OA.Entity;
using System.Collections.Generic;

public partial class linminchao_bbs_lt_update : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            int id = Int32.Parse(this.Request["id"]);
            bbs bb = bbsBLL.Select(id);
            this.Label1.Text = bb.bbs_title;
            this.FreeTextBox1.Text = bb.bbs_content;
        }
    }
    protected void submit2_ServerClick(object sender, EventArgs e)
    {
        int id = Int32.Parse(this.Request["id"]);
        bbs bb = bbsBLL.Select(id);
        bb.bbs_content = this.FreeTextBox1.Text;
        bb.bbs_releasetime = DateTime.Now;
        int i = bbsBLL.Update(bb);
        if (i < 0)
        {
            this.Response.Write(string.Format(GetRedirect.WINALERT, "修改帖子成功!"));
            this.Response.Write(string.Format(GetRedirect.REDIRECT, "lt_lookbbs.aspx"));
        }
        else {
            this.Response.Write(string.Format(GetRedirect.WINALERT, "修改帖子失败!"));
        }
    }
}

⌨️ 快捷键说明

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