예제 #1
0
파일: U_rank.ascx.cs 프로젝트: tabtu/ADBP2
    protected void Button_submit_Click(object sender, EventArgs e)
    {
        SqlFuns    sf  = new SqlFuns();
        Attendance tmp = new Attendance();

        tmp.Course  = uint.Parse(DropDownList_cos.SelectedValue);
        tmp.Student = uint.Parse(DropDownList_stu.SelectedValue);
        tmp.Date    = DateTime.Parse(TextBox_dt.Text);
        int result = sf.AddAttendance(tmp);

        if (result > 0)
        {
            Response.Write("<script language='javascript'>alert('Success!!!');</script>");
        }
        else
        {
            Response.Write("<script language='javascript'>alert('Failed!!!');</script>");
        }
    }