private void AccountsList_SelectedIndexChanged(object sender, EventArgs e) { AccountsFromNav.CatalogoCuentasNav_Service ServiceAccounts = new CatalogoCuentasNav_Service(); string userconfigsfile = System.Configuration.ConfigurationManager.AppSettings["UserNav"]; string passconfigsfile = System.Configuration.ConfigurationManager.AppSettings["PasswordNav"]; var networkcre = new NetworkCredential(userconfigsfile, passconfigsfile); AccountsFromNav.CatalogoCuentasNav_Filter AccountsFilter = new CatalogoCuentasNav_Filter(); ServiceAccounts.Credentials = networkcre; List <CatalogoCuentasNav_Filter> AccountsFilterArray = new List <CatalogoCuentasNav_Filter>(); AccountsFilter.Field = CatalogoCuentasNav_Fields.No; AccountsFilter.Criteria = AccountsList.SelectedItem.ToString(); AccountsFilterArray.Add(AccountsFilter); CatalogoCuentasNav[] list = ServiceAccounts.ReadMultiple(AccountsFilterArray.ToArray(), null, 1000); foreach (CatalogoCuentasNav AcN in list) { AddAccounts(AcN); } }
private void comboBox3_Click(object sender, EventArgs e) { if (comboBox1.Items.Count <= 0) { AccountsFromNav.CatalogoCuentasNav_Service ServiceAccounts = new CatalogoCuentasNav_Service(); string userconfigsfile = System.Configuration.ConfigurationManager.AppSettings["UserNav"]; string passconfigsfile = System.Configuration.ConfigurationManager.AppSettings["PasswordNav"]; var networkcre = new NetworkCredential(userconfigsfile, passconfigsfile); AccountsFromNav.CatalogoCuentasNav_Filter AccountsFilter = new CatalogoCuentasNav_Filter(); ServiceAccounts.Credentials = networkcre; List <CatalogoCuentasNav_Filter> AccountsFilterArray = new List <CatalogoCuentasNav_Filter>(); AccountsFilterArray.Add(AccountsFilter); CatalogoCuentasNav[] list = ServiceAccounts.ReadMultiple(AccountsFilterArray.ToArray(), null, 1000); foreach (CatalogoCuentasNav AcN in list) { AddAccounts(AcN); } if (AccountsList.Items.Count < 1) { MessageBox.Show("No hay Cuentas Configuradas para usar en el POS"); } } }