/// <summary> /// Função que preenche o ComboBox Biblia /// </summary> /// <returns></returns> internal void carregaBiblia() { try { objBLL_Biblia = new BLL_biblia(); listaBiblia = new List <MOD_biblia>(); cboBiblia.SelectedIndexChanged -= new EventHandler(cboBiblia_SelectedIndexChanged); listaBiblia = objBLL_Biblia.buscarCod(string.Empty); cboBiblia.DataSource = listaBiblia; cboBiblia.ValueMember = "CodBiblia"; cboBiblia.DisplayMember = "DescLivro"; cboBiblia.SelectedIndexChanged += new EventHandler(cboBiblia_SelectedIndexChanged); cboBiblia.SelectedIndex = (-1); } catch (SqlException exl) { throw exl; } catch (Exception ex) { throw ex; } }
/// <summary> /// função que carrega os combos que serão preenchidos /// com a tabela Biblia /// </summary> /// <param name="cboCombo"></param> public static ComboBoxPersonal carregaComboBiblia(ComboBoxPersonal cboCombo) { try { objBLL_Biblia = new BLL_biblia(); listaBiblia = new List <MOD_biblia>(); listaBiblia = objBLL_Biblia.buscarCod(string.Empty); cboCombo.DataSource = listaBiblia; cboCombo.ValueMember = "CodBiblia"; cboCombo.DisplayMember = "DescLivro"; cboCombo.SelectedIndex = (-1); return(cboCombo); } catch (SqlException exl) { throw exl; } catch (Exception ex) { throw ex; } }