cmd = new SqlCommand("sp_Main_Information", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@REG_Date", dt);
cmd.Parameters.AddWithValue("@NAME", name);
cmd.Parameters.AddWithValue("@ADDRESS", Address);
cmd.Parameters.AddWithValue("@YEAR", Year);
cmd.Parameters.AddWithValue("@CURRENT_GPA ", gpa);
cmd.Parameters.AddWithValue("@ATTCH_ID1", img1);
cmd.Parameters.AddWithValue("@ATTCH_ID2 , img2);
cmd.Parameters.AddWithValue("@REMARKS", remarks.Text);
dr = cmd.ExecuteReader();
dr.Read();
int xx = int.Parse(dr[0].ToString());
Response.Write(xx);
for (i = 0; i < chktype.Items.Count; i++)
{
if (chktype.Items[i].Selected == true)
cmd = new SqlCommand();
cmd.CommandText = "insert into tblItemstb values ('" + chktype.Items[i].Text + "'," + xx + ")";
cmd.Connection = con;
cmd.ExecuteNonQuery();
}
dr.Close();
int yy = int.Parse(dr[0].ToString());
Response.Write(yy);
for (i = 0; i < chkoption.Items.Count; i++)
if (chkoption.Items[i].Selected == true)
cmd.CommandText = "insert into tbloptions values ('" + chkoption.Items[i].Text + "'," + yy + ")";
con.Close();
lbldone.Text = "Record Added Successfully!";