private void AddTransactionbtn_Click(object sender, EventArgs e) { ITransactions m_Transactions; m_Transactions = new TransactionsClass(); m_Transactions.InvokeAddTransactionDlg(); }
private void EditMiscIncomebtn_Click(object sender, EventArgs e) { ITransactions m_Transactions; m_Transactions = new TransactionsClass(); m_Transactions.InvokeEditMiscIncomeDlg(); }
/// <summary> /// Initializes the Database instance with the database connection to utilise. /// The connection is not opened until it is required. /// The supplied connection should not be opened. /// </summary> /// <param name="objDatabaseConnection">An unopened connection to the database.</param> /// <remarks></remarks> public Database(IDbConnection objDatabaseConnection, ConnectionType eConnectionType) { pobjConnection = new ConnectionController(objDatabaseConnection, eConnectionType); pobjTransactions = new TransactionsClass(pobjConnection); }
/// -------------------------------------------------------------------------------- /// <summary> /// Creates a new Database instance specifying the database to connect to and SQL /// syntax to use with the database. Each function call of the Database class opens /// and closes a connection. Therefore, connection pooling should be enabled /// for optimal performance. /// </summary> /// /// <param name="strConnectionString"> /// A database connection string to either a Microsoft Access, SQLServer, Pervasive or MySQL /// database. For example, 'Provider=Microsoft.Jet.OLEDB.4.0;Data /// Source=northwind.mdb;Jet OLEDB:Database Password=;'. /// </param> /// /// <param name="eConnectionType"> /// Indicates the SQL syntax to generate for the database specified in strConnectionString. /// </param> /// -------------------------------------------------------------------------------- /// public Database(string strConnectionString, ConnectionType eConnectionType) { pobjConnection = new ConnectionController(strConnectionString, eConnectionType); pobjTransactions = new TransactionsClass(pobjConnection); }