예제 #1
0
 protected override void salvaDadosBDEspecificos()
 {
     try
     {
         if (m_typDatSetTbInstrucoesEmbarque != null)
         {
             if (m_typDatSetTbInstrucoesEmbarque.tbInstrucoesEmbarque.Rows.Count > 0)
             {
                 mdlDataBaseAccess.Tabelas.XsdTbInstrucoesEmbarque.tbInstrucoesEmbarqueRow dtrwTbInstrucoesEmbarque = (mdlDataBaseAccess.Tabelas.XsdTbInstrucoesEmbarque.tbInstrucoesEmbarqueRow)m_typDatSetTbInstrucoesEmbarque.tbInstrucoesEmbarque.Rows[0];
                 if (!dtrwTbInstrucoesEmbarque.IsbPermitirEmbarquesParciaisNull())
                 {
                     dtrwTbInstrucoesEmbarque.bPermitirEmbarquesParciais = m_bValorBooleano;
                 }
             }
             m_cls_dba_ConnectionDB.SetTbInstrucoesEmbarque(m_typDatSetTbInstrucoesEmbarque);
         }
     }
     catch (Exception err)
     {
         Object erro = err;
         m_cls_ter_tratadorErro.trataErro(ref erro);
     }
 }
예제 #2
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);
     }
 }
예제 #3
0
 protected override void carregaDadosBD()
 {
     try
     {
         if (m_typDatSetTbInstrucoesEmbarque != null)
         {
             if (m_typDatSetTbInstrucoesEmbarque.tbInstrucoesEmbarque.Rows.Count > 0)
             {
                 mdlDataBaseAccess.Tabelas.XsdTbInstrucoesEmbarque.tbInstrucoesEmbarqueRow dtrwTbInstrucoesEmbarque = (mdlDataBaseAccess.Tabelas.XsdTbInstrucoesEmbarque.tbInstrucoesEmbarqueRow)m_typDatSetTbInstrucoesEmbarque.tbInstrucoesEmbarque.Rows[0];
                 if (!dtrwTbInstrucoesEmbarque.IsbPermitirEmbarquesParciaisNull())
                 {
                     m_bValorBooleano = dtrwTbInstrucoesEmbarque.bPermitirEmbarquesParciais;
                 }
             }
         }
     }
     catch (Exception err)
     {
         Object erro = err;
         m_cls_ter_tratadorErro.trataErro(ref erro);
     }
 }
예제 #4
0
 protected override void carregaDadosBD()
 {
     mdlDataBaseAccess.Tabelas.XsdTbPes typDatSetPes = GetTypDatSetPes();
     if (typDatSetPes.tbPEs.Rows.Count > 0)
     {
         mdlDataBaseAccess.Tabelas.XsdTbPes.tbPEsRow dtrwPe = (mdlDataBaseAccess.Tabelas.XsdTbPes.tbPEsRow)typDatSetPes.tbPEs.Rows[0];
         if (!dtrwPe.IsbTransbordoNull())
         {
             m_bValorBooleano = dtrwPe.bTransbordo;
             if (!dtrwPe.IsmstrLocalTransbordoNull() && (dtrwPe.mstrLocalTransbordo.Trim() != ""))
             {
                 m_bValorBooleano = true;
             }
         }
         else
         {
             mdlDataBaseAccess.Tabelas.XsdTbInstrucoesEmbarque typDatSetInstrucoesEmbarque = GetTypDatSetInstrucoesEmbarque();
             if (typDatSetInstrucoesEmbarque.tbInstrucoesEmbarque.Rows.Count > 0)
             {
                 mdlDataBaseAccess.Tabelas.XsdTbInstrucoesEmbarque.tbInstrucoesEmbarqueRow dtrwTbInstrucoesEmbarque = (mdlDataBaseAccess.Tabelas.XsdTbInstrucoesEmbarque.tbInstrucoesEmbarqueRow)typDatSetInstrucoesEmbarque.tbInstrucoesEmbarque.Rows[0];
                 if (!dtrwTbInstrucoesEmbarque.IsbPermitirTransbordoNull())
                 {
                     m_bValorBooleano = dtrwTbInstrucoesEmbarque.bPermitirTransbordo;
                 }
             }
         }
     }
 }
 private void verificaCamposPreenchidos()
 {
     try
     {
         if (m_typDatSetTbInstrucoesEmbarque.tbInstrucoesEmbarque.Rows.Count > 0)
         {
             mdlDataBaseAccess.Tabelas.XsdTbInstrucoesEmbarque.tbInstrucoesEmbarqueRow dtrwTbInstrucoesEmbarque = (mdlDataBaseAccess.Tabelas.XsdTbInstrucoesEmbarque.tbInstrucoesEmbarqueRow)m_typDatSetTbInstrucoesEmbarque.tbInstrucoesEmbarque.Rows[0];
             #region Número
             if (!dtrwTbInstrucoesEmbarque.IsstrNumeroNull())
             {
                 m_bNumeroPreenchido = true;
             }
             #endregion
             #region Esquema Pagamento
             if (!dtrwTbInstrucoesEmbarque.IsnIdAgenteNull())
             {
                 m_bAgentePreenchido = true;
             }
             #endregion
             #region Número
             if (!dtrwTbInstrucoesEmbarque.IsstrNumeroReservaNull())
             {
                 m_bNumeroReservaPreenchido = true;
             }
             #endregion
             #region Data de Reserva
             if (!dtrwTbInstrucoesEmbarque.IsdtReservaNull())
             {
                 m_bDataReservaPreenchido = true;
             }
             #endregion
             #region Descrição Geral Mercadorias
             if (!dtrwTbInstrucoesEmbarque.IsmstrDescricaoGeralMercadoriasNull())
             {
                 m_bDescricaoMercadoriasPreenchido = true;
             }
             #endregion
             #region Código Tarifário
             if (!dtrwTbInstrucoesEmbarque.IsmstrCodigoTarifarioNull())
             {
                 m_bClassificacaoTarifariaPreenchido = true;
             }
             #endregion
             #region Despachante
             if (!dtrwTbInstrucoesEmbarque.IsnIdDespachanteNull())
             {
                 m_bDespachantePreenchido = true;
             }
             #endregion
             #region Observacoes
             if (!dtrwTbInstrucoesEmbarque.IsmstrObservacaoNull())
             {
                 m_bObservacoesPreenchido = true;
             }
             #endregion
         }
         if (m_typDatSetTbFaturasComerciais.tbFaturasComerciais.Rows.Count > 0)
         {
             mdlDataBaseAccess.Tabelas.XsdTbFaturasComerciais.tbFaturasComerciaisRow dtrwTbFaturasComerciais = (mdlDataBaseAccess.Tabelas.XsdTbFaturasComerciais.tbFaturasComerciaisRow)m_typDatSetTbFaturasComerciais.tbFaturasComerciais.Rows[0];
             #region Veículo
             if (!dtrwTbFaturasComerciais.IsnavioNull())
             {
                 m_bVeiculoPreenchido = true;
             }
             #endregion
         }
         if (m_typDatSetTbPes.tbPEs.Rows.Count > 0)
         {
             mdlDataBaseAccess.Tabelas.XsdTbPes.tbPEsRow dtrwTbPEs = (mdlDataBaseAccess.Tabelas.XsdTbPes.tbPEsRow)m_typDatSetTbPes.tbPEs.Rows[0];
             #region Consignatário
             if (!dtrwTbPEs.IsnIdConsignatarioNull())
             {
                 m_bConsignatarioPreenchido = true;
             }
             #endregion
             #region Siscomex
             if (!dtrwTbPEs.IsmstrRENull())
             {
                 m_bSiscomexPreenchido = true;
             }
             else if (!dtrwTbPEs.IsmstrSDNull())
             {
                 m_bSiscomexPreenchido = true;
             }
             else if (!dtrwTbPEs.IsmstrDSENull())
             {
                 m_bSiscomexPreenchido = true;
             }
             #endregion
         }
     }
     catch (Exception err)
     {
         Object erro = err;
         m_cls_terTratadorErro.trataErro(ref erro);
     }
 }
예제 #6
0
 private void salvaDadosBD()
 {
     try
     {
         if (m_typDatSetTbInstrucoesEmbarque.tbInstrucoesEmbarque.Rows.Count > 0)
         {
             mdlDataBaseAccess.Tabelas.XsdTbInstrucoesEmbarque.tbInstrucoesEmbarqueRow dtrwTbInstrucoesEmbarque = (mdlDataBaseAccess.Tabelas.XsdTbInstrucoesEmbarque.tbInstrucoesEmbarqueRow)m_typDatSetTbInstrucoesEmbarque.tbInstrucoesEmbarque.Rows[0];
             dtrwTbInstrucoesEmbarque.mstrCodigoTarifario = m_strClassificacao;
             m_cls_dba_ConnectionDB.SetTbInstrucoesEmbarque(m_typDatSetTbInstrucoesEmbarque);
         }
     }
     catch (Exception err)
     {
         Object erro = err;
         m_cls_ter_tratadorErro.trataErro(ref erro);
     }
 }
예제 #7
0
 private void carregaTextosBD()
 {
     try
     {
         if (m_typDatSetTbInstrucoesEmbarque.tbInstrucoesEmbarque.Rows.Count > 0)
         {
             mdlDataBaseAccess.Tabelas.XsdTbInstrucoesEmbarque.tbInstrucoesEmbarqueRow dtrwTbInstrucoesEmbarque = (mdlDataBaseAccess.Tabelas.XsdTbInstrucoesEmbarque.tbInstrucoesEmbarqueRow)m_typDatSetTbInstrucoesEmbarque.tbInstrucoesEmbarque.Rows[0];
             m_strClassificacao = (dtrwTbInstrucoesEmbarque.IsmstrCodigoTarifarioNull() ? "" : dtrwTbInstrucoesEmbarque.mstrCodigoTarifario);
         }
         m_strSugestao = strRetornaSugestao();
     }
     catch (Exception err)
     {
         Object erro = err;
         m_cls_ter_tratadorErro.trataErro(ref erro);
     }
 }