예제 #1
0
        public Payment GetPayment(int ORNo, ref string message)
        {
            Payment pment = new Payment();
            PaymentBDO pbdo = plogic.GetPayment(ORNo);
            if (pbdo != null)
            {
                TranslatePaymentBDOToPaymentDTO(pbdo, pment);
            }
            else message = "Payment Does Not Exists";

            return pment;
        }
예제 #2
0
 public List<Payment> GetAllStudentsPayments(string studentID)
 {
     List<Payment> plist = new List<Payment>();
     foreach (PaymentBDO pbdo in plogic.GetALlStudentsPayments(studentID))
     {
         Payment p = new Payment();
         TranslatePaymentBDOToPayment(pbdo, p);
         p.StudentName = GetStudentName(pbdo.StudentId);
         plist.Add(p);
     }
     return plist;
 }
예제 #3
0
 public void TranslatePaymentToPaymentBDO(Payment p, PaymentBDO pbdo)
 {
     pbdo.BusinessStyle = p.BusinessStyle;
     pbdo.Cancelled = p.Cancelled;
     pbdo.ORNo = p.ORNo;
     pbdo.PaidAt = p.PaidAt;
     pbdo.PaidTo = p.PaidTo;
     //pbdo.PaymentDetails = ToPaymentDetailsBDOList(p.PaymentDetails);
     pbdo.ReceivedFrom = p.ReceivedFrom;
     pbdo.SettlementFor = p.SettlementFor;
     pbdo.StudentId = p.StudentId;
     pbdo.TIN = p.TIN;
     pbdo.Amount = p.Amount;
     pbdo.Adres = p.Adres;
 }
예제 #4
0
 public bool CreatePayment(ref Payment payment, ref string message)
 {
     PaymentBDO pbdo = new PaymentBDO();
     TranslatePaymentToPaymentBDO(payment, pbdo);
     return plogic.CreatePayment(ref pbdo, ref message);
 }
예제 #5
0
 public void TranslatePaymentBDOToPaymentDTO(PaymentBDO pBDO, Payment pment)
 {
     pment.BusinessStyle = pBDO.BusinessStyle;
     pment.Cancelled = pBDO.Cancelled;
     pment.ORNo = pBDO.ORNo;
     pment.PaidAt = pBDO.PaidAt;
     pment.PaidTo = pBDO.PaidTo;
     //pment.PaymentDetails = ToPaymentDetailDTO(pBDO.PaymentDetails);
     pment.ReceivedFrom = pBDO.ReceivedFrom;
     pment.SettlementFor = pBDO.SettlementFor;
     pment.StudentId = pBDO.StudentId;
     pment.TIN = pBDO.TIN;
     pment.Amount = (float)pBDO.Amount;
     pment.Adres = pBDO.Adres;
 }