Exemplo n.º 1
0
    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>");
        }
    }