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 hqgl.user;
public partial class CalendarManage_AddSchaddup : System.Web.UI.Page
{
    
    protected void Page_Load(object sender, EventArgs e)
    {
        userchuli uch = new userchuli();
        uch.user_yanzheng();
    }


    protected void bnSave_ServerClick(object sender, EventArgs e)
    {
        if (txDes.Value.Trim() == "")
        {
            Response.Write("<script>alert('请输入内容！！')</script>");
        }
        else
        {
            userchuli uch = new userchuli();
            string name = uch.user_loginname();
            string UserName = name;
            SqlInsert sl = new SqlInsert();
            Sqlselete ss = new Sqlselete();
            string TeacherID = ss.SelectTeacherID(UserName);
            string Motif = this.txName.Value.Trim();
            string Content = this.txDes.Value.Trim();
            string AddTime = this.TextBox2.Text.Trim();
            sl.InsertCalendar(TeacherID, Motif, Content, AddTime);
            Response.Write("<script>alert('添加成功！');window.close();</script>");
        }   
    }
}
