public jpos() { this.ca = null; this.mcc = null; this.pf_id = null; this.visa_spnsrd_mercht = null; this.amex_id_comercio = null; }
public jpos(string ca, string mcc, string pf_id, string visa_spnsrd_mercht, string amex_id_comercio) { this.ca = new ca_name(ca); this.mcc = mcc.ToCharArray(0, 4); this.pf_id = pf_id.ToCharArray(0, 11); this.visa_spnsrd_mercht = visa_spnsrd_mercht.ToCharArray(0, 15); this.amex_id_comercio = amex_id_comercio.ToCharArray(0, 20); }
public void setSysconfigValue(string[] jpos_values) { for (int index = 0; index < jpos_values.Length; index++) { if (jpos_values[index] != null && jpos_values[index].Length > 0) { int tam = jpos_values[index].Length; switch (index) { case 0: for (int i = tam; i < 40; i++) { jpos_values[index] += ""; } ca = new ca_name(jpos_values[index]); break; case 1: for (int i = tam; i < 4; i++) { jpos_values[index] += ""; } mcc = jpos_values[index].ToCharArray(0, 4); break; case 2: for (int i = tam; i < 11; i++) { jpos_values[index] += ""; } pf_id = jpos_values[index].ToCharArray(0, 11); break; case 3: for (int i = tam; i < 15; i++) { jpos_values[index] += ""; } visa_spnsrd_mercht = jpos_values[index].ToCharArray(0, 15); break; case 4: for (int i = tam; i < 20; i++) { jpos_values[index] += ""; } amex_id_comercio = jpos_values[index].ToCharArray(0, 20); break; default: Console.WriteLine("Opciones de 0 a 4"); break; } } } }