コード例 #1
0
 /// <summary>
 /// This is to create a BPI reference number for over-the-counter payments
 /// <param name="strConnectionString">The string variable that will serve as the connection string as declared in the web.config</param>
 /// </summary>
 /// <exception cref="System.ArgumentNullException"/>
 /// <exception cref="System.Exception"/>
 public RNBuilder(string strConnectionString)
 {
     if (strConnectionString == null || strConnectionString.Length <= 0)
     {
         throw new ArgumentNullException();
     }
     try
     {
         d = new DataAccess(strConnectionString);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
コード例 #2
0
 /// <summary>
 /// This is to create a BPI reference number for over-the-counter payments
 /// </summary>
 /// <param name="strDataSource">The name of the SQL database server</param>
 /// <param name="strDatabase">The name of the database that will be accessed</param>
 /// <param name="strUserId">The username for the SQL database server</param>
 /// <param name="strPassword">The password for the SQL database server</param>
 /// <exception cref="System.ArgumentNullException"/>
 /// <exception cref="System.Exception"/>
 public RNBuilder(string strDataSource, string strDatabase, string strUserId, string strPassword)
 {
     if (strDataSource == null || strDataSource.Length <= 0)
     {
         throw new ArgumentNullException();
     }
     if (strDatabase == null || strDatabase.Length <= 0)
     {
         throw new ArgumentNullException();
     }
     if (strUserId == null || strUserId.Length <= 0)
     {
         throw new ArgumentNullException();
     }
     if (strPassword == null || strPassword.Length <= 0)
     {
         throw new ArgumentNullException();
     }
     try
     {
         d = new DataAccess(strDataSource, strDatabase, strUserId, strPassword);
     }
     catch (Exception e)
     {
         throw e;
     }
 }