Exemple #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);
     }
 }
Exemple #2
0
 public static bool XdrIsCustomer(this CustomerXDRInfo xdr)
 {
     if (xdr.xdr_type == "customer")
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Exemple #3
0
 public static float XdrGetCosto(this CustomerXDRInfo xdr)
 {
     try
     {
         return(xdr.charged_amount);
     }
     catch (Exception)
     {
         return(0);
     }
 }
Exemple #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);
            //}
        }
Exemple #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("");
     }
 }
Exemple #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);
     }
 }
Exemple #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("");
     }
 }
Exemple #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);
     }
 }
Exemple #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);
     }
 }