Exemplo n.º 1
0
        public List <PaymentDetailsView> GetPDetailsViews()
        {
            List <PaymentDetailsView> paymentDetails = new List <PaymentDetailsView>();

            using (CMSProjectEntities db = new CMSProjectEntities())
            {
                var payments = db.PaymentTBLs.ToList();
                foreach (PaymentTBL payment in payments)
                {
                    PaymentDetailsView PV = new PaymentDetailsView();
                    PV.PaymentID       = payment.PaymentID;
                    PV.Value           = payment.Value;
                    PV.PaymentDate     = payment.PaymentDate.ToString();
                    PV.PaymentStatusID = payment.PaymentStatusID;
                    var pstatus = db.PaymentStatusLookups.Where(o => o.PaymentStatusID.Equals(PV.PaymentStatusID)).FirstOrDefault();
                    PV.PaymentStatus = pstatus.Status;
                    paymentDetails.Add(PV);
                }
                return(paymentDetails);
            }
        }
Exemplo n.º 2
0
        private void OpenPaymentDetailsViewClick(object sender, RoutedEventArgs e)
        {
            PaymentDetailsView v = new PaymentDetailsView();

            ShowView(v);
        }