Get Paid By Click

Mginger Mobile Money

Jan 22, 2010

c# code for begin and end transaction

public class classTransaction
{
private SqlTransaction st;
public bool errorOccured;

Public SqlTransaction beginTransaction(SqlConnection con)
{
try
{
st = con.BeginTransaction();
errorOccured = false;
return st;
}
catch
{
return null;
}
}

public bool endTransaction(SqlTransaction st)
{
bool done;
if (!errorOccured)
{
st.Commit();
done = true;
}
else
{
st.Rollback();
done = false;
}
return done;

}
}

Easy Way To Pay

Sign up for PayPal and start accepting credit card payments instantly.

Earn While Searching