public bool DeletePayment(Payment payment)
        {
            try
            {
                PaymentTable.DeleteOnSubmit(payment);
                PaymentTable.Context.SubmitChanges();

                return true;
            }
            catch (Exception)
            {
                return false;
            }
        }
        public bool SavePayment(Payment payment)
        {
            try
            {
                if (payment.PaymentId == 0)
                {
                    PaymentTable.InsertOnSubmit(payment);
                }
                else
                {
                    PaymentTable.Context.Refresh(RefreshMode.KeepCurrentValues, payment);
                }

                PaymentTable.Context.SubmitChanges();

                return true;
            }
            catch (Exception)
            {
                return false;
            }
        }
 public List<Payment> GetPaymentsByType(Payment.PaymentTypeList paymentType)
 {
     return PaymentTable.Where(x => x.PaymentTypeId == (int)paymentType).ToList();
 }
 public List<Payment> GetPaymentsByStatus(Payment.PaymentStatusList paymentStatus)
 {
     return PaymentTable.Where(x => x.PaymentStatusId == (int)paymentStatus).ToList();
 }