Esempio n. 1
0
 public void Add(Domain.Myfashion.Domain.EwalletWithdrawRequest _EwalletWithdrawRequest)
 {
     //Creates a database connection and opens up a session
     using (NHibernate.ISession session = SessionFactory.GetNewSession())
     {
         using (NHibernate.ITransaction transaction = session.BeginTransaction())
         {
             session.Save(_EwalletWithdrawRequest);
             transaction.Commit();
         }
     }
 }
 public void AddRequestToWithdraw(string WithdrawAmount, string PaymentMethod, string PaypalEmail, int Status, string UserID)
 {
     Domain.Myfashion.Domain.User _User = _UserRepository.getUsersById(Guid.Parse(UserID));
     Domain.Myfashion.Domain.EwalletWithdrawRequest _EwalletWithdrawRequest = new Domain.Myfashion.Domain.EwalletWithdrawRequest();
     _EwalletWithdrawRequest.Id             = Guid.NewGuid();
     _EwalletWithdrawRequest.UserName       = _User.UserName;
     _EwalletWithdrawRequest.UserEmail      = _User.EmailId;
     _EwalletWithdrawRequest.PaypalEmail    = PaypalEmail;
     _EwalletWithdrawRequest.PaymentMethod  = PaymentMethod;
     _EwalletWithdrawRequest.Status         = Status;
     _EwalletWithdrawRequest.WithdrawAmount = WithdrawAmount;
     _EwalletWithdrawRequest.UserId         = Guid.Parse(UserID);
     _EwalletWithdrawRequestRepository.Add(_EwalletWithdrawRequest);
 }
        public void AddRequestToWithdraw(string WithdrawAmount, string PaymentMethod, string PaypalEmail, int Status, string UserID)
        {
            
            Domain.Myfashion.Domain.User _User = _UserRepository.getUsersById(Guid.Parse(UserID));
            Domain.Myfashion.Domain.EwalletWithdrawRequest _EwalletWithdrawRequest = new Domain.Myfashion.Domain.EwalletWithdrawRequest();
            _EwalletWithdrawRequest.Id = Guid.NewGuid();
            _EwalletWithdrawRequest.UserName = _User.UserName;
            _EwalletWithdrawRequest.UserEmail = _User.EmailId;
            _EwalletWithdrawRequest.PaypalEmail = PaypalEmail;
            _EwalletWithdrawRequest.PaymentMethod = PaymentMethod;
            _EwalletWithdrawRequest.Status = Status;
            _EwalletWithdrawRequest.WithdrawAmount = WithdrawAmount;
            _EwalletWithdrawRequest.UserId =Guid.Parse(UserID);
            _EwalletWithdrawRequestRepository.Add(_EwalletWithdrawRequest);

        }