protected void btn2_Click(object sender, EventArgs e)
    {
        try
        {
            int n = SqldsNationalDays.Update();
            if (n == 1)
            {
                String ppath = Server.MapPath("Programs");
                fuReport.SaveAs(ppath + "\\" + fuReport.FileName);
                fuPhoto.SaveAs(ppath + "\\" + fuPhoto.FileName);

                Response.Write("<script>alert('Data Inserted Successfully')</script>");
                txtArrangedProgram.Text = "";
                txtAttendance.Text      = "";
                txtPlace.Text           = "";
            }
            else
            {
                Response.Write("<script>alert('Please fill the form Correctly')</script>");
            }
        }
        catch (Exception er)
        {
            Response.Write(er.Message);
        }
    }
Beispiel #2
0
 protected void btn2_Click(object sender, EventArgs e)
 {
     try
     {
         int n = SqldsNationalDays.Insert();
         if (n == 1)
         {
             Response.Write("<script>alert('Data Inserted Successfully')</script>");
             txtDate.Text    = "";
             txtDayName.Text = "";
         }
         else
         {
             Response.Write("<script>alert('Please fill the form Correctly')</script>");
         }
     }
     catch (Exception er)
     {
         Response.Write(er.Message);
     }
 }