1 private void ddlSeguradoraDataBind()
2 {
3
4 try
5 {
6 ddlSeguradora.Items.Clear();
7 SeguradoraBO objSeguradoraBO = new SeguradoraBO();
8 ddlSeguradora.DataSource = objSeguradoraBO.GetSeguradoras();
9 ddlSeguradora.DataBind();
10 }
11 catch (Exception ex)
12 {
13 ucGlobal.PopUpClient(this.Page, "Ocorreu um erro ao carregar o combo Seguradora!");
14 }
15 }
16
17
18
19
20namespace MobileInspection.VistoriaWEB.BO
21{
22 public class SeguradoraBO
23 {
24 public DataTable GetSeguradoras()
25 {
26 DataTable dtSeguradoras = new DataTable();
27 SeguradoraDAO objSegurancaDAO = new SeguradoraDAO();
28
29 try
30 {
31 dtSeguradoras = objSegurancaDAO.GetSeguradoras();
32 }
33 catch (Exception ex)
34 {
35 throw new Exception("ERRO na camada BO: " + ex.Message);
36 }
37 return dtSeguradoras;
38 }
39 }
40}
41
42