private int getIndexOfTipoServicio(ComboBox.ObjectCollection objectCollection, int p) { foreach (Servicio servicio in objectCollection) { if (servicio.tipo_servicio_id.Equals(p)) { return objectCollection.IndexOf(servicio); } } return 0; }
private int getIndexOfCity(ComboBox.ObjectCollection objectCollection, int p) { foreach (Ciudad ciudad in objectCollection) { if (ciudad.id.Equals(p)) { return objectCollection.IndexOf(ciudad); } } return 0; }