protected string strRetornaDescricaoProduto(int nIdOrdemProdutoFaturaComercial) { string strRetorno = ""; mdlDataBaseAccess.Tabelas.XsdTbProdutosFaturaComercial.tbProdutosFaturaComercialRow dtrwProdutoFatura = m_typDatSetTbProdutosFaturaComercial.tbProdutosFaturaComercial.FindByidExportadoridPEidOrdem(m_nIdExportador, m_strIdPE, nIdOrdemProdutoFaturaComercial); if (dtrwProdutoFatura != null) { if (!dtrwProdutoFatura.IsmstrDescricaoNull()) { strRetorno = dtrwProdutoFatura.mstrDescricao; } else { mdlDataBaseAccess.Tabelas.XsdTbProdutos.tbProdutosRow dtrwProduto = m_typDatSetTbProdutos.tbProdutos.FindByidExportadoridProduto(m_nIdExportador, dtrwProdutoFatura.idProduto); if ((dtrwProduto != null) && (!dtrwProduto.IsmstrDescricaoNull())) { strRetorno = dtrwProduto.mstrDescricao; } } } return(strRetorno); }
private void copiaDescricaoProdutoSelecionado() { try { if (m_lvProdutos.SelectedItems.Count > 0) { mdlDataBaseAccess.Tabelas.XsdTbProdutos.tbProdutosRow dtrwTbProdutos = m_typDatSetTbProdutos.tbProdutos.FindByidExportadoridProduto(m_nIdExportador, (int)m_lvProdutos.SelectedItems[0].Tag); if (dtrwTbProdutos != null) { m_strDescricao = (dtrwTbProdutos.IsmstrDescricaoNull() ? "" : dtrwTbProdutos.mstrDescricao); mdlDataBaseAccess.Tabelas.XsdTbProdutosIdiomas.tbProdutosIdiomasRow dtrwTbProdutosIdiomas = m_typDatSetTbProdutosIdiomas.tbProdutosIdiomas.FindByidExportadoridIdiomaidProduto(m_nIdExportador, m_nIdIdioma, (int)m_lvProdutos.SelectedItems[0].Tag); if (dtrwTbProdutosIdiomas != null) { m_strIdioma = (dtrwTbProdutosIdiomas.IsstrDescricaoNull() ? "" : dtrwTbProdutosIdiomas.strDescricao); } else { m_strIdioma = ""; } } else { m_strDescricao = ""; m_strIdioma = ""; } } else { m_strDescricao = ""; m_strIdioma = ""; } } catch (Exception err) { Object erro = err; m_cls_ter_tratadorErro.trataErro(ref erro); } }