protected void btnViewAll_OnClcick(object sender, EventArgs e)
    {
        panelView.Visible = false;
        qury = "select RollNo,SID,SubID,SubName,ExamDate,Shift,Status from ExamUFM where  Session='" + lblHiddenSeason.Text.ToString() + "'";
        SqlDataAdapter ad = new SqlDataAdapter(qury, con);
        DataSet        ds = new DataSet();

        ad.Fill(ds);
        GridUFM.DataSource = ds;
        GridUFM.DataBind();
    }
 protected void btnOK_OnClcick(object sender, EventArgs e)
 {
     try
     {
         GridUFM.DataSource = gridsouce();
         GridUFM.DataBind();
         panelView.Visible = true;
         con.Close(); con.Open();
         if (rbtnRollNo.Checked == true)
         {
             qury = "select * from ExamUFM where RollNo='" + txtRollNo.Text.ToString() + "' and Session='" + lblHiddenSeason.Text.ToString() + "'";
         }
         else if (rbtnSID.Checked == true)
         {
             qury = "select * from ExamUFM where SID='" + txtRollNo.Text.ToString() + "' and Session='" + lblHiddenSeason.Text.ToString() + "'";
         }
         else
         {
             qury = "select  * from ExamUFM where  Session='" + lblHiddenSeason.Text.ToString() + "'";
         }
         SqlCommand    cmd1 = new SqlCommand(qury, con);
         SqlDataReader reader1;
         reader1 = cmd1.ExecuteReader();
         while (reader1.Read())
         {
             lblExamDate.Text   = reader1["ExamDate"].ToString();
             lblShift.Text      = reader1["Shift"].ToString();
             lblCenterCode.Text = reader1["CenterCode"].ToString();
             lblCenterName.Text = reader1["CenterName"].ToString();
             lblRollNo.Text     = reader1["RollNo"].ToString();
             lblCourse.Text     = reader1["Course"].ToString(); lblPart.Text = reader1["Part"].ToString();
             lblSID.Text        = reader1["SID"].ToString();
             lblSubID.Text      = reader1["SubID"].ToString(); lblSubName.Text = reader1["SubName"].ToString();
             lblStatus.Text     = reader1["Status"].ToString();
         }
         reader1.Close();
         reader1.Dispose();
     }
     catch (SqlException ex)
     {
         lblExceptionOK.Text = ex.ToString();
     }
     finally
     {
         con.Close();
         con.Dispose();
     }
 }
 protected void btnunfair_OnClick(object sender, EventArgs e)
 {
     lblStatus.Text = "unfair";
     try
     {
         con.Close(); con.Open();
         SqlCommand cmd = new SqlCommand("update ExamUFM set Status='unfair' where RollNo='" + lblRollNo.Text.ToString() + "' and Session='" + lblHiddenSeason.Text.ToString() + "' and SubID='" + lblSubID.Text.ToString() + "'", con);
         cmd.ExecuteNonQuery();
         GridUFM.DataSource = gridsouce();
         GridUFM.DataBind();
     }
     catch (SqlException ex)
     {
         lblExceptionOK.Text = ex.ToString();
     }
     finally
     {
         con.Close();
         con.Dispose();
     }
 }
 protected void GridUFM_PageIndexChanging(object sender, GridViewPageEventArgs e)
 {
     GridUFM.PageIndex = e.NewPageIndex;
     GridUFM.DataBind();
 }