Пример #1
0
 public static bool XdrIsAccount(this CustomerXDRInfo xdr)
 {
     try
     {
         var array = xdr.CLD.Split('-');
         if (array.Length == 0)
         {
             return(false);
         }
         else
         {
             var id = array[3].Replace(" ", "");
             if (string.IsNullOrEmpty(id))
             {
                 return(false);
             }
             else
             {
                 return(true);
             }
         }
     }
     catch (Exception)
     {
         return(false);
     }
 }
Пример #2
0
 public static bool XdrIsCustomer(this CustomerXDRInfo xdr)
 {
     if (xdr.xdr_type == "customer")
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Пример #3
0
 public static float XdrGetCosto(this CustomerXDRInfo xdr)
 {
     try
     {
         return(xdr.charged_amount);
     }
     catch (Exception)
     {
         return(0);
     }
 }
Пример #4
0
        public static float XdrGetCustomerComision(this CustomerXDRInfo xdr, float descuentoCustomer)
        {
            //if (xdr.XdrIsCustomer())
            //    return 0;
            //else
            //{
            var montoRecarga            = xdr.XdrGetMonto();
            var costoPorRecargaCustomer = montoRecarga * descuentoCustomer / 100;

            return(montoRecarga - costoPorRecargaCustomer);
            //}
        }
Пример #5
0
 public static string XdrGetNombre(this CustomerXDRInfo xdr)
 {
     try
     {
         var array = xdr.CLD.Split('-');
         if (array.Length == 0)
         {
             return("");
         }
         else
         {
             return(array[4]);
         }
     }
     catch (Exception)
     {
         return("");
     }
 }
Пример #6
0
 public static int XdrIdAsociado(this CustomerXDRInfo xdr)
 {
     try
     {
         var array = xdr.CLD.Split('-');
         if (array.Length == 0)
         {
             return(0);
         }
         else
         {
             var id = array[3].Replace(" ", "");
             return(id.ToInt());
         }
     }
     catch (Exception)
     {
         return(0);
     }
 }
Пример #7
0
 public static string XdrGetNumero(this CustomerXDRInfo xdr)
 {
     try
     {
         var array = xdr.CLD.Split('-');
         if (array.Length == 0)
         {
             return("");
         }
         else
         {
             var numero = array[2].Replace(" ", "");
             return(numero);
         }
     }
     catch (Exception)
     {
         return("");
     }
 }
Пример #8
0
 public static int XdrGetMonto(this CustomerXDRInfo xdr)
 {
     try
     {
         var array = xdr.CLD.Split('-');
         if (array.Length == 0)
         {
             return(0);
         }
         else
         {
             var monto = array[1].Replace(" ", "");
             return(monto.ToInt());
         }
     }
     catch (Exception)
     {
         return(0);
     }
 }
Пример #9
0
 public static bool XdrIsNauta(this CustomerXDRInfo xdr)
 {
     try
     {
         var array = xdr.CLD.Split('-');
         if (array.Length == 0)
         {
             return(false);
         }
         else
         {
             var tipo = array[0].Replace(" ", "");
             if (tipo == "Nauta")
             {
                 return(true);
             }
         }
         return(false);
     }
     catch (Exception)
     {
         return(false);
     }
 }