private void PopulateBillValue() { MPOST.Bill[] Bills = billacceptor.BillValues; Boolean[] Enables = billacceptor.GetBillValueEnables(); string code = string.Empty; string value = string.Empty; string atributes = string.Empty; string enable = string.Empty; for (int i = 0; i < Bills.Length; i++) { code = Bills[i].Country; value = Bills[i].Value.ToString(); atributes = Bills[i].Type.ToString() + " " + Bills[i].Series.ToString() + " " + Bills[i].Compatibility.ToString() + " " + Bills[i].Version.ToString(); enable = Enables[i] ? "True" : "False"; addlistbillvalue(code, value, atributes, enable); } }
static void configDefault() { Console.WriteLine("Obteniendo configuración"); MPOST.Bill[] bills = billAccept.BillValues; Boolean[] enables = billAccept.GetBillValueEnables(); for (int i = 0; i < bills.Length; i++) { if (bills[i].Value == 1000) { enables[i] = false; } Console.WriteLine("{0} :: {1}", bills[i].Value, enables[i]); } billAccept.SetBillValueEnables(ref enables); }