Exemplo n.º 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;
        }
Exemplo n.º 2
0
 public List<Payment> GetAllStudentsPayments(string studentID)
 {
     List<Payment> plist = new List<Payment>();
     foreach (PaymentBDO pbdo in plogic.GetALlStudentsPayments(studentID))
     {
         string[] arrStudent = new string[2];
         Payment p = new Payment();
         TranslatePaymentBDOToPayment(pbdo, p);
         arrStudent = GetStudentName(pbdo.StudentId);
         p.StudentName = arrStudent[0];
         p.Balance = float.Parse(arrStudent[1]);
         plist.Add(p);
     }
     return plist;
 }
Exemplo n.º 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;
 }
Exemplo n.º 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);
 }
Exemplo n.º 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;
 }