public static int Update(VaaaN.MLFF.Libraries.CommonLibrary.CBE.AccountHistoryCBE accountHistory) { int entryId = accountHistory.EntryId; try { string spName = VaaaN.MLFF.Libraries.CommonLibrary.Constants.oraclePackagePrefix + "ACCOUNT_HISTORY_UPDATE"; DbCommand command = VaaaN.MLFF.Libraries.CommonLibrary.DBA.DBAccessor.GetStoredProcCommand(spName); command.Parameters.Add(VaaaN.MLFF.Libraries.CommonLibrary.DBA.DBAccessor.CreateDbParameter(ref command, "p_tms_id", DbType.Int32, accountHistory.TMSId, ParameterDirection.Input)); command.Parameters.Add(VaaaN.MLFF.Libraries.CommonLibrary.DBA.DBAccessor.CreateDbParameter(ref command, "P_ACCOUNT_ID", DbType.Int32, accountHistory.EntryId, ParameterDirection.Input)); command.Parameters.Add(VaaaN.MLFF.Libraries.CommonLibrary.DBA.DBAccessor.CreateDbParameter(ref command, "p_entry_id", DbType.Int32, accountHistory.EntryId, ParameterDirection.Input)); command.Parameters.Add(VaaaN.MLFF.Libraries.CommonLibrary.DBA.DBAccessor.CreateDbParameter(ref command, "p_customer_vehicle_entry_id", DbType.Int32, accountHistory.CustomerVehicleEntryId, ParameterDirection.Input)); command.Parameters.Add(VaaaN.MLFF.Libraries.CommonLibrary.DBA.DBAccessor.CreateDbParameter(ref command, "p_account_type", DbType.Int32, accountHistory.TransactionTypeId, ParameterDirection.Input)); command.Parameters.Add(VaaaN.MLFF.Libraries.CommonLibrary.DBA.DBAccessor.CreateDbParameter(ref command, "p_transaction_id", DbType.Int32, accountHistory.TransactionId, ParameterDirection.Input)); command.Parameters.Add(VaaaN.MLFF.Libraries.CommonLibrary.DBA.DBAccessor.CreateDbParameter(ref command, "p_amount", DbType.Decimal, accountHistory.Amount, ParameterDirection.Input)); command.Parameters.Add(VaaaN.MLFF.Libraries.CommonLibrary.DBA.DBAccessor.CreateDbParameter(ref command, "p_is_sms_sent", DbType.Int32, accountHistory.IsEmailSent, ParameterDirection.Input)); command.Parameters.Add(VaaaN.MLFF.Libraries.CommonLibrary.DBA.DBAccessor.CreateDbParameter(ref command, "p_is_email_sent", DbType.String, accountHistory.IsEmailSent, ParameterDirection.Input, 100)); command.Parameters.Add(VaaaN.MLFF.Libraries.CommonLibrary.DBA.DBAccessor.CreateDbParameter(ref command, "p_modified_by", DbType.Int32, accountHistory.ModifierId, ParameterDirection.Input)); command.Parameters.Add(VaaaN.MLFF.Libraries.CommonLibrary.DBA.DBAccessor.CreateDbParameter(ref command, "p_transfer_status", DbType.Int32, accountHistory.TransferStatus, ParameterDirection.Input)); VaaaN.MLFF.Libraries.CommonLibrary.DBA.DBAccessor.ExecuteNonQuery(command); } catch (Exception ex) { throw ex; } return(entryId); }
public static int Insert(VaaaN.MLFF.Libraries.CommonLibrary.CBE.AccountHistoryCBE accountHistory) { int entryId = 0; try { string spName = VaaaN.MLFF.Libraries.CommonLibrary.Constants.oraclePackagePrefix + "ACCOUNT_HISTORY_INSERT"; DbCommand command = VaaaN.MLFF.Libraries.CommonLibrary.DBA.DBAccessor.GetStoredProcCommand(spName); command.Parameters.Add(VaaaN.MLFF.Libraries.CommonLibrary.DBA.DBAccessor.CreateDbParameter(ref command, "p_tms_id", DbType.Int32, accountHistory.TMSId, ParameterDirection.Input)); command.Parameters.Add(VaaaN.MLFF.Libraries.CommonLibrary.DBA.DBAccessor.CreateDbParameter(ref command, "P_ACCOUNT_ID", DbType.Int32, accountHistory.AccountId, ParameterDirection.Input)); command.Parameters.Add(VaaaN.MLFF.Libraries.CommonLibrary.DBA.DBAccessor.CreateDbParameter(ref command, "p_entry_id", DbType.Int32, accountHistory.EntryId, ParameterDirection.Output)); command.Parameters.Add(VaaaN.MLFF.Libraries.CommonLibrary.DBA.DBAccessor.CreateDbParameter(ref command, "p_customer_vehicle_entry_id", DbType.Int32, accountHistory.CustomerVehicleEntryId, ParameterDirection.Input)); command.Parameters.Add(VaaaN.MLFF.Libraries.CommonLibrary.DBA.DBAccessor.CreateDbParameter(ref command, "p_transaction_type", DbType.Int32, accountHistory.TransactionTypeId, ParameterDirection.Input)); command.Parameters.Add(VaaaN.MLFF.Libraries.CommonLibrary.DBA.DBAccessor.CreateDbParameter(ref command, "p_transaction_id", DbType.Int32, accountHistory.TransactionId, ParameterDirection.Input)); command.Parameters.Add(VaaaN.MLFF.Libraries.CommonLibrary.DBA.DBAccessor.CreateDbParameter(ref command, "p_amount", DbType.Decimal, accountHistory.Amount, ParameterDirection.Input)); command.Parameters.Add(VaaaN.MLFF.Libraries.CommonLibrary.DBA.DBAccessor.CreateDbParameter(ref command, "p_is_sms_sent", DbType.Int32, accountHistory.IsEmailSent, ParameterDirection.Input)); command.Parameters.Add(VaaaN.MLFF.Libraries.CommonLibrary.DBA.DBAccessor.CreateDbParameter(ref command, "p_is_email_sent", DbType.String, accountHistory.IsEmailSent, ParameterDirection.Input, 100)); command.Parameters.Add(VaaaN.MLFF.Libraries.CommonLibrary.DBA.DBAccessor.CreateDbParameter(ref command, "p_creation_date", DbType.DateTime, accountHistory.CreationDate, ParameterDirection.Input)); command.Parameters.Add(VaaaN.MLFF.Libraries.CommonLibrary.DBA.DBAccessor.CreateDbParameter(ref command, "p_transfer_status", DbType.Int32, accountHistory.TransferStatus, ParameterDirection.Input)); command.Parameters.Add(VaaaN.MLFF.Libraries.CommonLibrary.DBA.DBAccessor.CreateDbParameter(ref command, "p_opening_balance", DbType.Decimal, accountHistory.OpeningBalance, ParameterDirection.Input)); command.Parameters.Add(VaaaN.MLFF.Libraries.CommonLibrary.DBA.DBAccessor.CreateDbParameter(ref command, "p_closing_balance", DbType.Decimal, accountHistory.ClosingBalance, ParameterDirection.Input)); VaaaN.MLFF.Libraries.CommonLibrary.DBA.DBAccessor.ExecuteNonQuery(command); entryId = Convert.ToInt32(command.Parameters["p_entry_id"].Value); } catch (Exception ex) { throw ex; } return(entryId); }
public static void Delete(VaaaN.MLFF.Libraries.CommonLibrary.CBE.AccountHistoryCBE accountHistory) { try { string spName = VaaaN.MLFF.Libraries.CommonLibrary.Constants.oraclePackagePrefix + "ACCOUNT_HISTORY_DELETE"; DbCommand command = VaaaN.MLFF.Libraries.CommonLibrary.DBA.DBAccessor.GetStoredProcCommand(spName); command.Parameters.Add(VaaaN.MLFF.Libraries.CommonLibrary.DBA.DBAccessor.CreateDbParameter(ref command, "p_tms_id", DbType.Int32, accountHistory.TMSId, ParameterDirection.Input)); command.Parameters.Add(VaaaN.MLFF.Libraries.CommonLibrary.DBA.DBAccessor.CreateDbParameter(ref command, "p_entry_id", DbType.Int32, accountHistory.EntryId, ParameterDirection.Input)); VaaaN.MLFF.Libraries.CommonLibrary.DBA.DBAccessor.ExecuteNonQuery(command); } catch (Exception ex) { throw ex; } }
public static void Delete(VaaaN.MLFF.Libraries.CommonLibrary.CBE.AccountHistoryCBE accountHistory) { VaaaN.MLFF.Libraries.CommonLibrary.DAL.AccountHistoryDAL.Delete(accountHistory); }
public static int Update(VaaaN.MLFF.Libraries.CommonLibrary.CBE.AccountHistoryCBE accountHistory) { return(VaaaN.MLFF.Libraries.CommonLibrary.DAL.AccountHistoryDAL.Update(accountHistory)); }
public static int Insert(VaaaN.MLFF.Libraries.CommonLibrary.CBE.AccountHistoryCBE accountHistory) { return(VaaaN.MLFF.Libraries.CommonLibrary.DAL.AccountHistoryDAL.Insert(accountHistory)); }
private static VaaaN.MLFF.Libraries.CommonLibrary.CBE.AccountHistoryCollection ConvertDataTableToCollection(DataTable dt) { try { VaaaN.MLFF.Libraries.CommonLibrary.CBE.AccountHistoryCollection accountHistories = new VaaaN.MLFF.Libraries.CommonLibrary.CBE.AccountHistoryCollection(); for (int i = 0; i < dt.Rows.Count; i++) { VaaaN.MLFF.Libraries.CommonLibrary.CBE.AccountHistoryCBE crossTalkPacket = new VaaaN.MLFF.Libraries.CommonLibrary.CBE.AccountHistoryCBE(); if (dt.Rows[i]["TMS_ID"] != DBNull.Value) { crossTalkPacket.TMSId = Convert.ToInt32(dt.Rows[i]["TMS_ID"]); } if (dt.Rows[i]["ENTRY_ID"] != DBNull.Value) { crossTalkPacket.EntryId = Convert.ToInt32(dt.Rows[i]["ENTRY_ID"]); } if (dt.Rows[i]["TRANSACTION_ID"] != DBNull.Value) { crossTalkPacket.TransactionId = Convert.ToInt32(dt.Rows[i]["TRANSACTION_ID"]); } if (dt.Rows[i]["AMOUNT"] != DBNull.Value) { crossTalkPacket.Amount = Convert.ToDecimal(dt.Rows[i]["AMOUNT"]); } if (dt.Rows[i]["SMS_SENT"] != DBNull.Value) { crossTalkPacket.IsSMSSent = Convert.ToInt32(dt.Rows[i]["SMS_SENT"]); } if (dt.Rows[i]["EMAIL_SENT"] != DBNull.Value) { crossTalkPacket.IsEmailSent = Convert.ToInt32(dt.Rows[i]["EMAIL_SENT"]); } if (dt.Rows[i]["MODIFIED_BY"] != DBNull.Value) { crossTalkPacket.ModifierId = Convert.ToInt32(dt.Rows[i]["MODIFIED_BY"]); } if (dt.Rows[i]["CREATION_DATE"] != DBNull.Value) { crossTalkPacket.CreationDate = Convert.ToDateTime(dt.Rows[i]["CREATION_DATE"]); } accountHistories.Add(crossTalkPacket); } return(accountHistories); } catch (Exception ex) { throw ex; } }