Esempio n. 1
0
 public PaymentRequisites TraverseTemplate(PaymentTemplate template)
 {
     PaymentRequisites requisite = new PaymentRequisites();
     requisite.ID = template.ID;
     requisite.AccountId = template.Account.ID;
     requisite.Amount = template.Amount;
     requisite.JsonPayment = template.JsonPayment;
     requisite.Type = template.EripType;
     return requisite;
 }
Esempio n. 2
0
 public PaymentTemplate TraverseTemplate(PaymentRequisites requisites)
 {
     PaymentTemplate template = new PaymentTemplate();
     Account account = db.Accounts.Find(requisites.AccountId);
     if (account == null)
     {
         throw new WebFaultException(HttpStatusCode.NotFound);
     }
     template.Account = account;
     template.Amount = requisites.Amount;
     template.JsonPayment = requisites.JsonPayment;
     template.EripType = requisites.Type;
     return template;
 }