Actually i am having a webform for fee-structure like below
fee-type |amount |annual/month(checkbox)
registration-fee: | textbox1| chekbox1
tution-fee: | textbox2 | checkbox2
books-fee |textbox3 |checkbox3
think that above is a form for fee-structure while clicking on the save button i want to save the records into below table manner
table fee-structure
student_id|fee_type|amount(textbox)|annual/month(checkbox)
1002 | registration-fee |1001 | 1(if checked means)
1002 | tution-fee | 2500 | 0(if not checked means)
1002 | books-fee | 2300 | 1
//my question is for inserting every record i have to take separate query...if not how i can write...i am giving my code below
SqlCommand cmdInsertFeeQuotation = DBManager.DataAccess.command();
cmdInsertFeeQuotation.Parameters.Add(new SqlParameter("@option", SqlDbType.VarChar, 50));
cmdInsertFeeQuotation.Parameters["@option"].Value = "InsertFeeQuotation";
cmdInsertFeeQuotation.Parameters.Add(new SqlParameter("@Fee_Type", SqlDbType.VarChar, 50));
cmdInsertFeeQuotation.Parameters["@Fee_Type"].Value = "Registration Fee";
cmdInsertFeeQuotation.Parameters.Add(new SqlParameter("@Amount", SqlDbType.Money));
cmdInsertFeeQuotation.Parameters["@Amount"].Value = txtRegistrationFee.Text;
if (ckboxRegistrationFee.Checked == true)
{
cmdInsertFeeQuotation.Parameters.Add(new SqlParameter("@Annual_Month", SqlDbType.Bit));
cmdInsertFeeQuotation.Parameters["@Annual_Month"].Value = 1;
}
else
{
cmdInsertFeeQuotation.Parameters.Add(new SqlParameter("@Annual_Month", SqlDbType.Bit));
cmdInsertFeeQuotation.Parameters["@Annual_Month"].Value = 0;
}
string sqlquery1 = "SchoolProc";
DBManager.DataAccess.executeQuery(sqlquery1);