Posted on: 11/15/2013 12:24:07 PM | Views : 890

Good day all,
I am trying to get this logic done but facing some problem.
The logic is that at a click of a button i select all student who are in a particular class from the students table and insert them into a studentaccount table attaching fees amount.
But before i do the individual insertion i want to check if a student has a balance to pay and if he does i had it up to the fees before inserting.
Below is my code for review
protected void SubmitAccountContent() { SqlConnection conn = new SqlConnection(strconnection); SqlCommand cmd = new SqlCommand("SELECT StudID, ClassNo FROM Students WHERE LevelName = @LevelName AND ClassNo = @ClassNo", conn); { cmd.Parameters.AddWithValue("@LevelName", RadComboBoxFeeLevel.SelectedValue); cmd.Parameters.AddWithValue("@ClassNo", RadComboBoxFeeClass.SelectedValue); conn.Open(); ...

Go to the complete details ...