Esempio n. 1
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);
 }
Esempio n. 2
0
 private int AssignProfileTransactionFromGatewayTransaction
 (
     ref PaymentGatewayTransactionsCoreEntity objPaymentGatewayTransactionsCoreEntity,
     ref PaymentProfileTransactionsCoreEntity objPaymentProfileTransactionsCoreEntity
 )
 {
     try
     {
         objPaymentProfileTransactionsCoreEntity.CreatedBy          = _objLoggedInUser.LoginID;
         objPaymentProfileTransactionsCoreEntity.CreatedDate        = DateTime.Now;
         objPaymentProfileTransactionsCoreEntity.PaymentAmount      = objPaymentGatewayTransactionsCoreEntity.MerAmount;
         objPaymentProfileTransactionsCoreEntity.PaymentDate        = objPaymentGatewayTransactionsCoreEntity.TranDate;
         objPaymentProfileTransactionsCoreEntity.PaymentFor         = objPaymentGatewayTransactionsCoreEntity.MerchantParam2;
         objPaymentProfileTransactionsCoreEntity.PaymentMode        = Constants.MEMBERSHIPONLINEPAYMENT;
         objPaymentProfileTransactionsCoreEntity.PaymentNotes       = objPaymentGatewayTransactionsCoreEntity.MerchantParam3;
         objPaymentProfileTransactionsCoreEntity.ProfileID          = objPaymentGatewayTransactionsCoreEntity.MerchantParam1;
         objPaymentProfileTransactionsCoreEntity.TransactionID      = objPaymentGatewayTransactionsCoreEntity.TransactionID;
         objPaymentProfileTransactionsCoreEntity.ValidityExpiryDate = objPaymentGatewayTransactionsCoreEntity.TranDate.AddMonths(Constants.MEMBERSHIPFORSIXMONTHS);
         objPaymentProfileTransactionsCoreEntity.SangamID           = _objLoggedInUser.sangamID;
     }
     catch (Exception objEx)
     {
         Helpers.LogExceptionInFlatFile(objEx);
     }
     return(0);
 }
Esempio 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);
 }