Ejemplo n.º 1
0
 public int Add(ref PaymentGatewayTransactionsCoreEntity objPaymentGatewayTransactionsCoreEntity)
 {
     try
     {
         PaymentProfileTransactionsCoreEntity objPaymentProfileTransactionsCoreEntity = new PaymentProfileTransactions.PaymentProfileTransactionsCoreEntity();
         using (objPaymentProfileTransactionsCoreEntity as IDisposable)
         {
             AssignProfileTransactionFromGatewayTransaction(ref objPaymentGatewayTransactionsCoreEntity, ref objPaymentProfileTransactionsCoreEntity);
             PaymentProfileTransactionsModel objPaymentProfileTransactionsModel = new PaymentProfileTransactionsModel();
             using (objPaymentProfileTransactionsModel as IDisposable)
             {
                 AssignModelFromEntity(ref objPaymentProfileTransactionsCoreEntity, ref objPaymentProfileTransactionsModel);
                 IUnitOfWork objIUnitOfWorkAdd = new UnitOfWork(_objLoggedInUser.ConnectionStringAppKey);
                 using (objIUnitOfWorkAdd as IDisposable)
                 {
                     objIUnitOfWorkAdd.RepositoryPaymentProfileTransactions.Add(objPaymentProfileTransactionsModel);
                     objIUnitOfWorkAdd.commit();
                 }
                 objIUnitOfWorkAdd = null;
             }
             objPaymentProfileTransactionsModel = null;
         }
         objPaymentProfileTransactionsCoreEntity = null;
     }
     catch (Exception objEx)
     {
         Helpers.LogExceptionInFlatFile(objEx);
     }
     return(0);
 }
Ejemplo n.º 2
0
 public int GetAllPaymentTransactions(ref List <PaymentProfileTransactionsCoreEntity> objPaymentProfileTransactionsCoreEntityList)
 {
     try
     {
         IUnitOfWork objIUnitOfWork = new UnitOfWork(_objLoggedInUser.ConnectionStringAppKey);
         using (objIUnitOfWork as IDisposable)
         {
             foreach (PaymentProfileTransactionsModel objPaymentProfileTransactionsModel in objIUnitOfWork.RepositoryPaymentProfileTransactions.GetAll().Where(y => y.ProfileID == _objLoggedInUser.LoginID).OrderByDescending(x => x.PaymentDate).ToList())
             {
                 PaymentProfileTransactionsModel _objPaymentProfileTransactionsModel = objPaymentProfileTransactionsModel;
                 using (_objPaymentProfileTransactionsModel as IDisposable)
                 {
                     PaymentProfileTransactionsCoreEntity objPaymentProfileTransactionsCoreEntity = new PaymentProfileTransactionsCoreEntity();
                     using (objPaymentProfileTransactionsCoreEntity as IDisposable)
                     {
                         AssignEntityFromModel(ref objPaymentProfileTransactionsCoreEntity, ref _objPaymentProfileTransactionsModel);
                         objPaymentProfileTransactionsCoreEntityList.Add(objPaymentProfileTransactionsCoreEntity);
                     }
                     objPaymentProfileTransactionsCoreEntity = null;
                 }
                 _objPaymentProfileTransactionsModel = null;
             }
         }
         objIUnitOfWork = null;
     }
     catch (Exception objEx)
     {
         Helpers.LogExceptionInFlatFile(objEx);
     }
     return(0);
 }
Ejemplo n.º 3
0
 private int AssignEntityFromModel
 (
     ref PaymentProfileTransactionsCoreEntity objPaymentProfileTransactionsCoreEntity,
     ref PaymentProfileTransactionsModel objPaymentProfileTransactionsModel
 )
 {
     try
     {
         objPaymentProfileTransactionsCoreEntity.CreatedBy          = objPaymentProfileTransactionsModel.CreatedBy;
         objPaymentProfileTransactionsCoreEntity.CreatedDate        = objPaymentProfileTransactionsModel.CreatedDate;
         objPaymentProfileTransactionsCoreEntity.PaymentAmount      = objPaymentProfileTransactionsModel.PaymentAmount;
         objPaymentProfileTransactionsCoreEntity.PaymentDate        = objPaymentProfileTransactionsModel.PaymentDate;
         objPaymentProfileTransactionsCoreEntity.PaymentFor         = objPaymentProfileTransactionsModel.PaymentFor;
         objPaymentProfileTransactionsCoreEntity.PaymentMode        = objPaymentProfileTransactionsModel.PaymentMode;
         objPaymentProfileTransactionsCoreEntity.PaymentNotes       = objPaymentProfileTransactionsModel.PaymentNotes;
         objPaymentProfileTransactionsCoreEntity.ProfileID          = objPaymentProfileTransactionsModel.ProfileID;
         objPaymentProfileTransactionsCoreEntity.SangamID           = objPaymentProfileTransactionsModel.SangamID;
         objPaymentProfileTransactionsCoreEntity.TransactionID      = objPaymentProfileTransactionsModel.TransactionID;
         objPaymentProfileTransactionsCoreEntity.ValidityExpiryDate = objPaymentProfileTransactionsModel.ValidityExpiryDate;
         objPaymentProfileTransactionsCoreEntity.ValidityStartDate  = objPaymentProfileTransactionsModel.ValidityStartDate;
     }
     catch (Exception objEx)
     {
         Helpers.LogExceptionInFlatFile(objEx);
     }
     return(0);
 }