コード例 #1
0
 public void BuscarContatos()
 {
     if (!string.IsNullOrEmpty(cd_clifor.Text))
     {
         CamadaDados.Financeiro.Cadastros.TList_CadContatoCliFor lContatos =
             CamadaNegocio.Financeiro.Cadastros.TCN_CadContatoCliFor.Buscar(string.Empty,
                                                                            cd_clifor.Text,
                                                                            string.Empty,
                                                                            string.Empty,
                                                                            string.Empty,
                                                                            string.Empty,
                                                                            string.Empty,
                                                                            false,
                                                                            false,
                                                                            false,
                                                                            string.Empty,
                                                                            0,
                                                                            null);
         lContatos.ForEach(p =>
         {
             if (!string.IsNullOrEmpty(p.Email))
             {
                 clbContatos.Items.Add(p.Email.Trim(), (St_danfe && (p.St_receberdanfebool || p.St_receberxmlnfebool)) ? true : false);
             }
         });
         //Verificar se existe contato para enviar XML
         if (lContatos.Exists(p => p.St_receberxmlnfebool.Equals(true)))
         {
             St_receberXmlNfe = true;
         }
     }
 }