Esempio n. 1
0
        private void button4_Click(object sender, System.EventArgs e)
        {
            string strBanco, strIdAgencia, strIdConta, strEndereco, mstrCidade, strEstado, strEstadoSigla, strTelefone, strFax;

            this.m_txtRetorno.Text = "";
            CreateDataBase();
            mdlBancos.clsBancoExportador modBancoExportador;
            modBancoExportador = new mdlBancos.BancoExportador.clsBancoExportadorComercial(ref m_cls_tre_tratadorErro, ref m_cls_dba_ConnectionBD, m_txtPath.Text, Int32.Parse(m_txtIdExportador.Text), m_txtIdCodigo.Text);
            modBancoExportador.retornaValores(out strBanco, out strIdAgencia, out strIdConta, out strEndereco, out mstrCidade, out strEstado, out strEstadoSigla, out strTelefone, out strFax);
            this.m_txtRetorno.Text = "Banco: " + strBanco + " ;Agência: " + strIdAgencia + " ;Conta: " + strIdConta;
            modBancoExportador.ShowDialog();
            modBancoExportador.retornaValores(out strBanco, out strIdAgencia, out strIdConta, out strEndereco, out mstrCidade, out strEstado, out strEstadoSigla, out strTelefone, out strFax);
            this.m_txtRetorno.Text = "Banco: " + strBanco + " ;Agência: " + strIdAgencia + " ;Conta: " + strIdConta;
        }
Esempio n. 2
0
 private void selecionaBancoExportador(ref System.Windows.Forms.PictureBox pbOkBancoExportador, ref System.Windows.Forms.PictureBox pbNOKBancoExportador)
 {
     mdlBancos.clsBancoExportador obj = new mdlBancos.BancoExportador.clsBancoExportadorComercial(ref m_cls_terTratadorErro, ref m_cls_dbaConnnectionDB, m_strEnderecoExecutavel, m_nIdExportador, m_strIdPE);
     obj.ShowDialog();
     if (obj.m_bModificado)
     {
         pbOkBancoExportador.Visible  = true;
         pbNOKBancoExportador.Visible = false;
         m_bBancoExportadorPreenchido = true;
         obj = null;
     }
     else
     {
         return;
     }
 }
Esempio n. 3
0
 private void verificaCamposPreenchidos()
 {
     try
     {
         #region Banco Exportador
         string strBanco, strAgencia, strConta;
         mdlBancos.clsBancoExportador obj = new mdlBancos.BancoExportador.clsBancoExportadorComercial(ref m_cls_terTratadorErro, ref m_cls_dbaConnnectionDB, m_strEnderecoExecutavel, m_nIdExportador, m_strIdPE);
         obj.retornaValores(out strBanco, out strAgencia, out strConta);
         if (strBanco.Trim() != "" && strAgencia.Trim() != "" && strConta.Trim() != "")
         {
             m_bBancoExportadorPreenchido = true;
         }
         #endregion
         #region Banco Importador
         mdlBancos.clsBancoImportador objBI = new mdlBancos.BancoImportador.clsBancoImportadorComercial(ref m_cls_terTratadorErro, ref m_cls_dbaConnnectionDB, m_strEnderecoExecutavel, m_nIdExportador, m_strIdPE);
         objBI.retornaValores(out strBanco);
         if (strBanco.Trim() != "")
         {
             m_bBancoImportadorPreenchido = true;
         }
         #endregion
         if (m_typDatSetTbPes.tbPEs.Rows.Count > 0)
         {
             mdlDataBaseAccess.Tabelas.XsdTbPes.tbPEsRow dtrwTbPes = (mdlDataBaseAccess.Tabelas.XsdTbPes.tbPEsRow)m_typDatSetTbPes.tbPEs.Rows[0];
         }
         if (m_typDatSetTbBorderos.tbBorderos.Rows.Count > 0)
         {
             mdlDataBaseAccess.Tabelas.XsdTbBorderos.tbBorderosRow dtrwTbBorderos = (mdlDataBaseAccess.Tabelas.XsdTbBorderos.tbBorderosRow)m_typDatSetTbBorderos.tbBorderos.Rows[0];
             #region Número
             if (!dtrwTbBorderos.IsstrNumeroNull())
             {
                 m_bNumeroPreenchido = true;
             }
             #endregion
             #region Esquema Pagamento
             if (!dtrwTbBorderos.IsmstrEsquemaPagamentoNull())
             {
                 m_bPagamentoPreenchido = true;
             }
             #endregion
             #region Documentação
             bool bFC = true, bSG = true, bCE = true, bCO = true, bRM = true, bCP = true, bCA = true, bSQ = true, bFS = true;
             #region Fatura Comercial
             if (m_typDatSetTbFaturasComerciais.tbFaturasComerciais.Rows.Count > 0)
             {
                 if (dtrwTbBorderos.IsnQtdeDocCopiaFaturaComercialNull())
                 {
                     bFC = false;
                 }
                 if (dtrwTbBorderos.IsnQtdeDocOriginalFaturaComercialNull())
                 {
                     bFC = false;
                 }
             }
             #endregion
             #region Certificado Origem
             if (m_typDatSetTbProdutosCertificadosOrigem.tbProdutosCertificadoOrigem.Rows.Count > 0)
             {
                 if (dtrwTbBorderos.IsnQtdeDocOriginalCertificadoOrigemNull())
                 {
                     bCO = false;
                 }
                 if (dtrwTbBorderos.IsnQtdeDocCopialCertificadoOrigemNull())
                 {
                     bCO = false;
                 }
             }
             #endregion
             #region Romaneio
             if (m_typDatSetTbRomaneios.tbRomaneios.Rows.Count > 0)
             {
                 if (dtrwTbBorderos.IsnQtdeDocCopialRomaneioNull())
                 {
                     bRM = false;
                 }
                 if (dtrwTbBorderos.IsnQtdeDocOriginalRomaneioNull())
                 {
                     bRM = false;
                 }
             }
             #endregion
             #region Saque
             if (m_typDatSetTbSaques.tbSaques.Rows.Count > 0)
             {
                 if (dtrwTbBorderos.IsnQtdeDocCopialSaqueNull())
                 {
                     bSQ = false;
                 }
                 if (dtrwTbBorderos.IsnQtdeDocOriginalSaqueNull())
                 {
                     bSQ = false;
                 }
             }
             #endregion
             #region PE
             if (m_typDatSetTbPes.tbPEs.Rows.Count > 0)
             {
                 mdlDataBaseAccess.Tabelas.XsdTbPes.tbPEsRow dtrwTbPes = (mdlDataBaseAccess.Tabelas.XsdTbPes.tbPEsRow)m_typDatSetTbPes.tbPEs.Rows[0];
                 #region Conhecimento Embarque
                 if (dtrwTbPes.IsstrIdConhecimentoEmbarqueNull())
                 {
                     bCE = false;
                 }
                 if (dtrwTbBorderos.IsnQtdeDocCopialConhecimentoEmbarqueNull())
                 {
                     bCE = false;
                 }
                 if (dtrwTbBorderos.IsnQtdeDocOriginalConhecimentoEmbarqueNull())
                 {
                     bCE = false;
                 }
                 #endregion
                 #region Certificado Peso
                 if (dtrwTbPes.IsstrIdCertificadoPesoNull())
                 {
                     bCP = false;
                 }
                 if (dtrwTbBorderos.IsnQtdeDocCopialCertificadoPesoNull())
                 {
                     bCP = false;
                 }
                 if (dtrwTbBorderos.IsnQtdeDocOriginalCertificadoPesoNull())
                 {
                     bCP = false;
                 }
                 #endregion
                 #region Certificado Análise
                 if (dtrwTbPes.IsstrIdCertificadoAnaliseNull())
                 {
                     bCA = false;
                 }
                 if (dtrwTbBorderos.IsnQtdeDocCopialCertificadoAnaliseNull())
                 {
                     bCA = false;
                 }
                 if (dtrwTbBorderos.IsnQtdeDocOriginalCertificadoAnaliseNull())
                 {
                     bCA = false;
                 }
                 #endregion
                 #region Fito Sanitário
                 if (dtrwTbPes.IsstrIdFitossanitarioNull())
                 {
                     bFS = false;
                 }
                 if (dtrwTbBorderos.IsnQtdeDocCopialFitoSanitarioNull())
                 {
                     bFS = false;
                 }
                 if (dtrwTbBorderos.IsnQtdeDocOriginalFitoSanitarioNull())
                 {
                     bFS = false;
                 }
                 #endregion
             }
             #endregion
             m_bDocumentacaoPreenchido = (bFC && bSG && bCE && bCO && bRM && bCP && bCA && bSQ && bFS);
             #endregion
             #region Número
             if (!dtrwTbBorderos.IsnEntregaDocumentosNull())
             {
                 m_bCobrancaPreenchido = true;
             }
             #endregion
         }
         if (m_typDatSetTbFaturasComerciais.tbFaturasComerciais.Rows.Count > 0)
         {
             mdlDataBaseAccess.Tabelas.XsdTbFaturasComerciais.tbFaturasComerciaisRow dtrwTbFaturasComerciais = (mdlDataBaseAccess.Tabelas.XsdTbFaturasComerciais.tbFaturasComerciaisRow)m_typDatSetTbFaturasComerciais.tbFaturasComerciais.Rows[0];
             #region Data Embarque
             if (!dtrwTbFaturasComerciais.IsdataEmbarqueNull())
             {
                 m_bDataEmbarquePreenchido = true;
             }
             #endregion
         }
         if (m_typDatSetTbInstrucoesEmbarque.tbInstrucoesEmbarque.Rows.Count > 0)
         {
             mdlDataBaseAccess.Tabelas.XsdTbInstrucoesEmbarque.tbInstrucoesEmbarqueRow dtrwTbInstrucoesEmbarque = (mdlDataBaseAccess.Tabelas.XsdTbInstrucoesEmbarque.tbInstrucoesEmbarqueRow)m_typDatSetTbInstrucoesEmbarque.tbInstrucoesEmbarque.Rows[0];
             #region Descrição Mercadorias
             if (!dtrwTbInstrucoesEmbarque.IsmstrDescricaoGeralMercadoriasNull())
             {
                 m_bDescricaoMercadoriasPreenchido = true;
             }
             #endregion
         }
         #region Contrato Cambio
         if (m_typDatSetTbProdutosBordero.tbProdutosBordero.Rows.Count > 0)
         {
             m_bContratoCambioPreenchido = true;
         }
         #endregion
     }
     catch (Exception err)
     {
         Object erro = err;
         m_cls_terTratadorErro.trataErro(ref erro);
     }
 }