Example #1
0
 public static string TranslateMetodoPagoToLegible(cfdi33.c_MetodoPago c_MetodoPago)
 {
     if (c_MetodoPago == cfdi33.c_MetodoPago.PPD)
     {
         return("Pago en parcialidades o diferido");
     }
     else if (c_MetodoPago == cfdi33.c_MetodoPago.PUE)
     {
         return("Pago en una sola exhibición");
     }
     else
     {
         return(String.Empty);
     }
 }
 public static cfdi33.c_MetodoPago TranslateMetodoPago(string from, ref bool isSpecified)
 {
     if (String.IsNullOrEmpty(from))
     {
         isSpecified = false;
         return(cfdi33.c_MetodoPago.PPD);
     }
     else
     {
         cfdi33.c_MetodoPago to = new cfdi33.c_MetodoPago();
         if (Enum.TryParse(from, out to))
         {
             isSpecified = true;
             return(to);
         }
         else
         {
             throw new InvalidCastException("Metodo de pago no definido / soportado por el esquema cfdi");
         }
     }
 }