SqlDataAdapter sda = new SqlDataAdapter("select scode from result where Enrollno ='" + Label7.Text + "'", con);
DataTable dt = new DataTable();
sda.Fill(dt);
int c = dt.Rows.Count;
if (c != 0)
{
Label8.Text ="Sorry You Have been already Given Exam";
}
{
SqlCommand cmd = new SqlCommand("insert into result(Enrollno,scode,TotalQuestion,TotalCorrectAnswer,TotalWrongAnswer,Examdate) values (" + Label7.Text + ",'" + DropDownList1.Text + "','" + a + "','" + count + "','" + b + "','" + Label5.Text + "')", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}



Mukesh KumarRank #119 · 18.2K reputationPosted Dec 1, 2015, 1:24 AM EST
Jignesh TrivediRank #16 · 50.3K reputationPosted Dec 2, 2015, 12:22 AM EST
Manas MohapatraRank #182 · 13.2K reputationPosted Dec 1, 2015, 12:57 AM EST
Upendra Pratap ShahiRank #329 · 7.5K reputationPosted Dec 1, 2015, 1:07 AM EST
Ravi PatelRank #439 · 5.7K reputationPosted Dec 1, 2015, 3:23 AM EST
Vindhya Yadaav54 reputationPosted Dec 1, 2015, 9:00 PM EST