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