public EntityPayment GetPaymentByType(int OrderID, int TypeQuotation)
        {
            var data = base.DataContext.Payment.Where(p => p.FK_OrderID == OrderID && p.Fk_TypeQuotation == TypeQuotation);

            if (data.Count() > 0)
            {
                return(FactoryPayment.Get(data.First()));
            }
            else
            {
                return(null);
            }
        }
        public EntityPayment GetByOrderID(int OrderID)
        {
            var data = base.DataContext.Payment.Where(p => p.FK_OrderID == OrderID);

            if (data.Count() > 0)
            {
                return(FactoryPayment.Get(data.First()));
            }
            else
            {
                return(null);
            }
        }
        public EntityPayment GetPolicyPayment(int OrderID, string Folio)
        {
            var data = base.DataContext.Payment.Where(p => p.FK_OrderID == OrderID && p.Folio == Folio);

            if (data.Count() > 0)
            {
                return(FactoryPayment.Get(data.First()));
            }
            else
            {
                return(null);
            }
        }
        public EntityPayment Get(int Id)
        {
            var data = base.DataContext.Payment.Where(p => p.PK_PaymentID == Id);

            if (data.Count() == 1)
            {
                return(FactoryPayment.Get(data.Single()));
            }
            else
            {
                return(null);
            }
        }