public void UpdateCombox() { var menus = client.GetMenu(); var plato = client.GetTipoPlatos(); var bebida = client.GetTipoBebidas(); List <String> vPlatos = new List <String>(); List <String> vBebida = new List <String>(); List <String> vMenu = new List <String>(); foreach (var p in plato) { vPlatos.Add(p.nombre); } foreach (var p in bebida) { vBebida.Add(p.nombre); } foreach (var p in menus) { vMenu.Add(p.nombre); } comboBoxMenu.DataSource = vMenu; comboBoxTipoPlato.DataSource = vPlatos; comboBoxTipoBebida.DataSource = vBebida; }
public void UpdateComboBoxTiboBebida() { var tipoPlatos = client.GetTipoPlatos(); List <String> strTipoBebidas = new List <string>(); foreach (var t in tipoPlatos) { strTipoBebidas.Add(t.nombre); } var vPlatos = client.GetMenu(); List <String> strPlato = new List <string>(); foreach (var p in vPlatos) { strPlato.Add(p.nombre); } comboBoxMenu.DataSource = strPlato; comboBoxTipoPlato.DataSource = strTipoBebidas; }