Ejemplo n.º 1
0
 protected void BtnAdd_Click(object sender, EventArgs e)
 {
     dtcheck = obj.CheckStudentMarksHS(Convert.ToInt32(ddnstudent.SelectedValue), Convert.ToInt32(ddnclass.SelectedValue), Convert.ToInt32(ddnsection.SelectedValue), ddnsemester.SelectedItem.Text);
     if (dtcheck.Rows.Count > 0)
     {
         lblmsg.Text = "Marks Already Exist";
     }
     if (dtcheck.Rows.Count <= 0)
     {
         i = obj.AddtStudentMarksHS(Convert.ToInt32(ddnstudent.SelectedValue), Convert.ToInt32(ddnclass.SelectedValue), Convert.ToInt32(ddnsection.SelectedValue), ddnsemester.SelectedItem.Text, Convert.ToInt32(txte1.Text),
                                    Convert.ToInt32(txte2.Text), Convert.ToInt32(txth1.Text), Convert.ToInt32(txth2.Text), Convert.ToInt32(txtm1.Text), Convert.ToInt32(txtm2.Text), Convert.ToInt32(txtphysics.Text), Convert.ToInt32(txtchem.Text),
                                    Convert.ToInt32(txtbio.Text), Convert.ToInt32(txtcomputers.Text), Convert.ToInt32(txtss.Text), "Teacher", Convert.ToInt32(Session["tuid"]), DateTime.Now.ToString());
         if (i > 0)
         {
             Session["StId"] = ddnstudent.SelectedValue;
             lblmsg.Text     = "Data Has Been Added";
             BindData();
             Response.Redirect("ReportCard1.aspx");
         }
     }
 }