⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 notice.aspx.cs

📁 这是一个OA企业办公自动化网站,是采用c#+asp编写的,很值得一看
💻 CS
字号:
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;

public partial class BaseInfo_notice : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        BaseClass bc = new BaseClass();
        if (TextBox2.Text == "" && TextBox1.Text == "")
        {
            Response.Write(bc.MessageBox("标题和内容不能为空!"));
            return;
        }

        bool bl;
        string str = Convert.ToString(Session["loginName"]);
        bl = bc.ExecSQL("insert into notice values('" + TextBox1.Text + "','" + DateTime.Today.ToString("yyyy-MM-dd") + "','" + str + "','" + TextBox2.Text + "')");
        if (bl)
        {
            Response.Write(bc.MessageBox("-公告发布-成功!"));
        }
        else
        {
            Response.Write(bc.MessageBox("由于网络故障信息-公告发布-失败!"));
        }

    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        TextBox1.Text = "";
        TextBox2.Text = "";
    }
}

⌨️ 快捷键说明

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