コード例 #1
0
        public string getNostroAcocunt(string currency, string bankID)
        {
            string MethodName    = MethodBase.GetCurrentMethod().Name;
            string NostroAccount = "";

            ModuleName = this.GetType().Name;

            try
            {
                string sqlQuery = "select cd_desc as nostro_acc_number from cocd where code_type = 'NST' and cm_code = '" + currency + "' and bank_id = '" + bankID + "'";

                OledbSqlHelper _dbHelper = new OledbSqlHelper(ConnString, bConnEncrypted);

                Logger.logDebug(ModuleName, MethodName, "Executing Query : " + sqlQuery, Logger.LOGLEVEL.INFO);

                NostroAccount = _dbHelper.getSingleValue(sqlQuery, "nostro_acc_number");

                Logger.logDebug(ModuleName, MethodName, "Nostro Account : " + NostroAccount, Logger.LOGLEVEL.INFO);

                return(NostroAccount);
            }
            catch (Exception ex)
            {
                Logger.logDebug(ModuleName, MethodName, "Exception : " + ex.Message, Logger.LOGLEVEL.INFO);
                throw ex;
            }
            finally
            {
                Logger.logDebug(ModuleName, MethodName, "**********Exiting Method**********", Logger.LOGLEVEL.INFO);
            }
        }
コード例 #2
0
        private string getRecordsCount()
        {
            string          MethodName  = MethodBase.GetCurrentMethod().Name;
            OleDbDataReader _dataReader = null;
            string          ModuleName  = "TPINMigrationUtility";

            try
            {
                Logger.logDebug(ModuleName, MethodName, "**********Entered Method**********", Logger.LOGLEVEL.INFO);

                OledbSqlHelper _dbHelper = new OledbSqlHelper(VisionConnString, bVisionConnEncrypted);

                Logger.logDebug(ModuleName, MethodName, "Fetching Records", Logger.LOGLEVEL.INFO);

                string sqlQuery = ConfigurationManager.AppSettings["RETREIVE_RECORDS_LIST_COUNT"];
                Logger.logDebug(ModuleName, MethodName, "Executing Query : " + sqlQuery, Logger.LOGLEVEL.INFO);

                string count = _dbHelper.getSingleValue(sqlQuery, "TOTAL");

                Logger.logDebug(ModuleName, MethodName, "Query executed.", Logger.LOGLEVEL.INFO);
                Logger.logDebug(ModuleName, MethodName, "Total Records Feteched: [" + count + "]", Logger.LOGLEVEL.INFO);

                lblTotal.Text = count;
                return(count);
            }
            catch (Exception ex)
            {
                if (_dataReader != null)
                {
                    _dataReader.Close();
                }

                Logger.logDebug(ModuleName, MethodName, "Exception      : " + ex.Message, Logger.LOGLEVEL.INFO);
                if (ex.InnerException != null)
                {
                    Logger.logDebug(ModuleName, MethodName, "Inner Exception: " + ex.InnerException.Message, Logger.LOGLEVEL.INFO);
                }
                Logger.logDebug(ModuleName, MethodName, "**********Exiting Method**********", Logger.LOGLEVEL.INFO);

                MessageBox.Show(ex.Message);

                throw ex;
            }
        }