public formPesquisaFornecedor(formCadastro cadastro, bool novoHabilitado)
     : base(cadastro, novoHabilitado)
 {
     InitializeComponent();
     map = new MapFornecedor(dsFROGIOS.FORNECEDOR, dsFROGIOS.FORNECEDOR_FISICO, dsFROGIOS.FORNECEDOR_JURIDICO);
     fornecedorSQL = new GerFornecedor();
 }
 public formCadastroFornecedor(bool pesquisaHabilitado)
     : base(pesquisaHabilitado)
 {
     InitializeComponent();
     if (pesquisaHabilitado)
         pesquisa = new formPesquisaFornecedor(this, false);
     comboTipo.Enabled = false;
     fornecedorSQL = new GerFornecedor();
 }
Example #3
0
 public void inserirFornecedor(int codigo, bool eFisico)
 {
     try {
         Conexao.abrir();
         GerFornecedor fornecedor = new GerFornecedor();
         fornecedor.selecionar(
             codigo,
             dsFROGIOS.FORNECEDOR,
             eFisico ? dsFROGIOS.FORNECEDOR_FISICO : null,
             eFisico ? null : dsFROGIOS.FORNECEDOR_JURIDICO,
             dsFROGIOS.UF);
     } catch (Exception erro) {
         exibirMensagemErro(erro.Message);
     } finally {
         Conexao.fechar();
     }
 }
Example #4
0
        public void adicionarFornecedor(int codigo, bool eFisico)
        {
            GerFornecedor fornecedorSQL = new GerFornecedor();
               dsFROGIOS.FORNECEDOR_FISICO.Clear();
               dsFROGIOS.FORNECEDOR_JURIDICO.Clear();
               if (eFisico) {
               fornecedorSQL.selecionar(codigo, dsFROGIOS.FORNECEDOR, dsFROGIOS.FORNECEDOR_FISICO, null, dsFROGIOS.UF);
               } else {
               fornecedorSQL.selecionar(codigo, dsFROGIOS.FORNECEDOR, null, dsFROGIOS.FORNECEDOR_JURIDICO, dsFROGIOS.UF);
               }

               if (dsFROGIOS.FORNECEDOR_FISICO.Rows.Count > 0) {
               fORNECEDOR_FISICO_NOMETextBox.Visible = true;
               fORNECEDOR_JURIDICO_FANTASIATextBox.Visible = false;
               } else {
               fORNECEDOR_FISICO_NOMETextBox.Visible = false;
               fORNECEDOR_JURIDICO_FANTASIATextBox.Visible = true;
               }
        }