示例#1
0
        public string RetPrestadorEmail()
        {
            belConnection cx = new belConnection();

            try
            {
                string sMsgPadraoEmail = "{5}Razão Social:{1}{0}{5}E-mail: {2}{0}{5}CCM :{3}{0}{5}CNPJ:{4}{0}{0}";
                StringBuilder sQuery = new StringBuilder();
                sQuery.Append(" select empresa.cd_cgc, empresa.cd_inscrmu, empresa.cd_email, empresa.nm_empresa from empresa ");
                sQuery.Append(" where empresa.cd_empresa = '" + belStatic.codEmpresaNFe + "'");
                FbCommand Comand = new FbCommand(sQuery.ToString(), cx.get_Conexao());
                cx.Open_Conexao();
                Comand.ExecuteNonQuery();
                FbDataReader dr = Comand.ExecuteReader();
                dr.Read();
                objtcIdentificacaoPrestador = new tcIdentificacaoPrestador();

                return string.Format(sMsgPadraoEmail, "<br>",
                                            dr["nm_empresa"].ToString(),
                                            dr["cd_email"].ToString(),
                                            dr["cd_inscrmu"].ToString(),
                                            dr["cd_cgc"].ToString(), "    ");
            }
            catch (Exception ex)
            {
                throw;
            }
            finally
            {
                cx.Close_Conexao();
            }
        }
        private void frmImportaEscritor_Load(object sender, EventArgs e)
        {


            belInfNFe objInfNFe = new belInfNFe();
            belConnection cx = new belConnection();
            fbConexao = cx.get_Conexao();

            belEscrituracao objEscrituracao = new belEscrituracao(objInfNFe, fbConexao);

            cbxEmpresas.DisplayMember = "Descricao";
            cbxEmpresas.ValueMember = "Codigo";

            cbxEmpresas.DataSource = objEscrituracao.RetornaEmpresa();

        }