How to handle the data base insert or updates in code behind page?
Hi all,
I have a customer transaction page. And in this i am doing insert and updates in 7 tables. I wrote below code and sending the data to data base.
btnSubmit_click(object sender, EventArgs e){
insertNewLoan();
updateCustomerThroughLoan();
updatePartyThroughLoan();
insertAccount();
insertCustTransactionbyLoan();
insertPartyTransaction();
insertLoanInstallment();
}
so my query is if any one of the insertion or update is fail, then i need to cancel my previous insert or update statements.
Please help me on this
Thank you.