public List <BE_BankAccount> getBankAccount() { BE_BankAccount _BeBankAccount = null; List <BE_BankAccount> _lstBankAccount = new List <BE_BankAccount>(); Dictionary <string, object> parameters = new Dictionary <string, object>(); var rows = _database.QuerySP("sps_getBankAccount", parameters); foreach (var row in rows) { _BeBankAccount = new BE_BankAccount(); _BeBankAccount.bankAccountId = string.IsNullOrEmpty(row["Id"]) ? 0 : int.Parse(row["Id"]); _BeBankAccount.accountNumber = row["AccountNumber"]; _BeBankAccount.bankId = string.IsNullOrEmpty(row["BankId"]) ? 0 : int.Parse(row["BankId"]); _BeBankAccount.currency = row["Currency"]; _BeBankAccount.status = row["Status"] == bool.TrueString ? true : false; _BeBankAccount.balance = string.IsNullOrEmpty(row["Balance"]) ? 0 : decimal.Parse(row["Balance"]); _BeBankAccount.accounting = row["Accounting"]; _BeBankAccount.cash = row["Cash"]; _BeBankAccount.companyCode = row["CompanyCode"]; _BeBankAccount.AccountNumberCCI = row["AccountNumberCCI"]; _BeBankAccount.AccountType = row["AccountType"]; _lstBankAccount.Add(_BeBankAccount); } return(_lstBankAccount); }
public BE_Payment RegisterClientPayment(BE_Payment _bePayment) { _database = new MySQLDatabase(connectionString); var mensaje = ""; BL_WorkFlow bL_WorkFlow = new BL_WorkFlow(); bL_WorkFlow.connectionString = connectionString; var bOK = bL_WorkFlow.NextWorkFlowStep(ref mensaje, 2, int.Parse(_bePayment.id), _bePayment.userName, false); if (bOK) { BE_Payment bE_Payment = new DA_Payment(_database).createPaymentSales(_bePayment); BL_Bank bL_Bank = new BL_Bank(); bL_Bank.connectionString = connectionString; BE_BankAccount bE_BankAccountAux = bL_Bank.updateBalanceBankAccountByInvoice(int.Parse(_bePayment.id), _bePayment.bankAccountId); return(bE_Payment); } else { throw new ApplicationException("Ud. no cuenta con los privilegios necesarios"); } }
public BE_BankAccount getBankAccountById(int bankAccountId) { BE_BankAccount _veBank = null; Dictionary <string, object> parameters = new Dictionary <string, object>() { { "_bankAccountId", bankAccountId } }; var rows = _database.QuerySP("sps_getBankAccountById", parameters); foreach (var row in rows) { _veBank = new BE_BankAccount(); _veBank.bankAccountId = string.IsNullOrEmpty(row["BankAccountId"]) ? 0 : int.Parse(row["BankAccountId"]); _veBank.bankId = string.IsNullOrEmpty(row["Id"]) ? 0 : int.Parse(row["Id"]); _veBank.accountNumber = row["AccountNumber"]; _veBank.currency = row["Currency"]; _veBank.status = row["Status"] == bool.TrueString ? true : false; _veBank.balance = string.IsNullOrEmpty(row["Balance"]) ? 0 : Decimal.Parse(row["Balance"]); _veBank.companyCode = row["CompanyCode"]; _veBank.AccountNumberCCI = row["AccountNumberCCI"]; _veBank.AccountType = row["AccountType"]; } return(_veBank); }
public Stream getTxtPaymentAuth(int paymentAuthId, int _bankAccountId, ref string filename) { BL_Bank _blBank = new BL_Bank(); _blBank.connectionString = connectionString; BE_BankAccount _bankAccount = _blBank.GetBankAccountById(_bankAccountId); BE_Bank _bank = _blBank.GetBankById(_bankAccount.bankId); filename = _bank.bankShortName + "_" + _bankAccount.accountNumber; if (_bank.bankShortName == "INTERB") { return(getIBK(paymentAuthId, _bank.bankId, _bankAccountId, 0)); } else if (_bank.bankShortName == "BBVA") { return(getBBVA(paymentAuthId, _bank.bankId, _bankAccountId, 0)); } else if (_bank.bankShortName == "BCP") { return(getBCP(paymentAuthId, _bank.bankId, _bankAccountId, 0)); } else if (_bank.bankShortName == "BCSCTB") { return(getSCOTIA(paymentAuthId, _bank.bankId, _bankAccountId, 0)); } throw new ApplicationException("UNKNOWN_ERROR"); // return GetMDFile(vePaymentAuth.paymentAuthId, _bankAccountId); }