private void bb_contratante_Click(object sender, EventArgs e) { object obj_regvenda = null; if (!string.IsNullOrEmpty(cd_vendedor.Text)) { obj_regvenda = new CamadaDados.Faturamento.Cadastros.TCD_Vendedor_X_RegiaoVenda().BuscarEscalar( new Utils.TpBusca[] { new Utils.TpBusca() { vNM_Campo = "a.cd_vendedor", vOperador = "=", vVL_Busca = "'" + cd_vendedor.Text.Trim() + "'" } }, "1"); } string vParam = "isnull(a.st_registro, 'A')|<>|'C'"; if (obj_regvenda == null ? false : obj_regvenda.ToString().Trim().Equals("1")) { vParam += ";|exists|(select 1 from tb_fat_vendedor_x_regiaovenda x " + " where x.id_regiao = a.id_regiao " + " and x.cd_vendedor = '" + cd_vendedor.Text.Trim() + "')"; } UtilPesquisa.BTN_BuscaClifor(new Componentes.EditDefault[] { cd_contratante, nm_contratante }, vParam); this.Busca_Endereco_Clifor(); }
private void bb_fornecedor_Click(object sender, EventArgs e) { string vParam = "isnull(a.st_registro, 'A')|<>|'C';" + "isnull(a.st_fornecedor, 'N')|=|'S'"; UtilPesquisa.BTN_BuscaClifor(new Componentes.EditDefault[] { cd_fornecedor }, vParam); }
private void bb_clifor_requisitante_Click(object sender, EventArgs e) { string vParam = "isnull(a.st_registro, 'A')|<>|'C';" + "|exists|(select 1 from tb_cmp_usuariocompra x " + "where x.cd_clifor_cmp = a.cd_clifor " + "and x.login = '******')"; UtilPesquisa.BTN_BuscaClifor(new Componentes.EditDefault[] { cd_clifor_requisitante }, vParam); }
private void BB_Transportadora_Click(object sender, EventArgs e) { UtilPesquisa.BTN_BuscaClifor(new Componentes.EditDefault[] { CD_Transp, NM_Clifor }, "isNull(a.ST_Transportadora,'N')|=|'S'"); string vColunas = "a.Nm_Clifor|Transportadora|350;" + "a.CD_Clifor|Cód. Transportadora|100"; UtilPesquisa.BTN_BUSCA(vColunas, new Componentes.EditDefault[] { CD_Transp, NM_Clifor }, new CamadaDados.Financeiro.Cadastros.TCD_CadClifor(), "isNull(a.ST_Transportadora,'N')|=|'S'"); }
private void bb_Clifor_Click(object sender, EventArgs e) { if ((CD_Produto.Text != null) && (CD_Produto.Text.Length > 1)) { } string vParm = ""; UtilPesquisa.BTN_BuscaClifor(new Componentes.EditDefault[] { CD_Clifor, NM_Clifor }, vParm); }
private void bb_fornecedor_Click(object sender, EventArgs e) { string vParam = "isnull(a.st_registro, 'A')|<>|'C';" + "isnull(a.st_fornecedor, 'N')|=|'S';" + "|exists|(select 1 from tb_cmp_fornec_x_grupoitem x " + " where x.cd_clifor = a.cd_clifor )"; UtilPesquisa.BTN_BuscaClifor(new Componentes.EditDefault[] { cd_fornecedor }, vParam); }
private void bb_clifor_requisitante_Click(object sender, EventArgs e) { string vParam = "isnull(a.st_registro, 'A')|<>|'C';" + "|exists|(select 1 from tb_cmp_usuariocompra x " + "where x.cd_clifor_cmp = a.cd_clifor " + ((!Utils.Parametros.pubLogin.Trim().Equals("MASTER")) && (!Utils.Parametros.pubLogin.Trim().ToUpper().Equals("DESENV")) ? "and x.login = '******'" : string.Empty) + ")"; UtilPesquisa.BTN_BuscaClifor(new Componentes.EditDefault[] { cd_clifor_requisitante, nm_clifor_requisitante }, vParam); }
private void bb_clifor_Click(object sender, EventArgs e) { string vParamFixo = ""; if (nr_pedido.Text.Trim() != "") { vParamFixo = "|EXISTS|(Select 1 From TB_FAT_Pedido x Where x.CD_Clifor = a.CD_Clifor and x.NR_Pedido = " + nr_pedido.Text + ")"; } UtilPesquisa.BTN_BuscaClifor(new Componentes.EditDefault[] { cd_clifor, nm_clifor }, vParamFixo); }
private void bb_Clifor_Click(object sender, EventArgs e) { string vParam = "isnull(a.st_registro, 'A')|<>|'C';" + "isnull(a.st_fornecedor, 'N')|=|'S'"; if (cd_grupo.Text.Trim() != string.Empty) { vParam += ";|not exists|(select 1 from tb_cmp_fornec_x_grupoitem x " + "where x.cd_clifor = a.cd_clifor " + "and x.cd_grupo = '" + cd_grupo.Text.Trim() + "')"; } UtilPesquisa.BTN_BuscaClifor(new Componentes.EditDefault[] { cd_Clifor, Nm_Clifor }, vParam); }
private void bb_fornecedor_Click(object sender, EventArgs e) { string vParam = "isnull(a.st_registro, 'A')|<>|'C';" + "isnull(a.st_fornecedor, 'N')|=|'S';" + "|exists|(select 1 from tb_cmp_fornec_x_grupoitem x " + " where x.cd_clifor = a.cd_clifor " + " and x.cd_grupo = '" + cd_grupo.Text.Trim() + "')"; UtilPesquisa.BTN_BuscaClifor(new Componentes.EditDefault[] { cd_fornecedor, nm_fornecedor }, vParam); this.BuscarEnd(); this.BuscarComprasFornec(); this.BuscarComprasConc(); this.BuscarNegociacaoFornec(); this.BuscarNegociacaoConc(); }
private void bb_fornecedor_Click(object sender, EventArgs e) { string vParam = "isnull(a.st_registro, 'A')|<>|'C';" + "isnull(a.st_fornecedor, 'N')|=|'S';" + "|exists|(select 1 from tb_cmp_fornec_x_grupoitem x " + " where x.cd_clifor = a.cd_clifor )"; UtilPesquisa.BTN_BuscaClifor(new Componentes.EditDefault[] { cd_fornecedor, nm_fornecedor }, vParam); this.Busca_Endereco_Clifor(); this.Busca_Contato_Clifor(); this.BuscarRequisicoes(); this.BuscarComprasFornec(); this.BuscarComprasConc(); this.BuscarCotacaoFornec(); this.BuscarCotacaoConc(); this.TotalCotacoes(); }
private void bb_inserirClifor_Click(object sender, EventArgs e) { if (bsRota.Current != null) { //Retirar da busca clientes informados memória ainda não gravados string and = string.Empty; (bsRota.Current as TRegistro_CadRota).lClifor.ForEach(p => and += ";a.cd_clifor|<>|'" + p.Cd_clifor.Trim() + "'"); //Buscar somente clifor que não possui rota string vParam = "a.id_rota|is|null" + and; DataRowView linha = UtilPesquisa.BTN_BuscaClifor(null, vParam); if (linha != null) { (bsRota.Current as TRegistro_CadRota).lClifor.Add(new TRegistro_CadClifor() { Cd_clifor = linha["cd_clifor"].ToString(), Nm_clifor = linha["nm_clifor"].ToString() }); bsRota.ResetCurrentItem(); } } }
private void bb_clifor_Click(object sender, EventArgs e) { string vParamFixo = "|| EXISTS (Select 1 From TB_FAT_notafiscal_item x " + "INNER JOIN TB_FAT_NotaFiscal w On w.cd_empresa = x.cd_empresa and w.Nr_LanctoFiscal = x.Nr_lanctoFiscal " + "LEFT OUTER JOIN TB_gro_Originacao_x_faturamento y On x.cd_empresa = y.cd_empresa and x.Nr_LanctoFiscal = y.Nr_lanctoFiscal and x.ID_NFItem = y.ID_NFItem " + "Where w.CD_Clifor = a.cd_clifor and w.tp_movimento = 'E' " + "GROUP BY x.quantidade " + "having SUM(isnull(y.QTD_Origem,0)) < x.quantidade)"; UtilPesquisa.BTN_BuscaClifor(new Componentes.EditDefault[] { cd_clifor, nm_clifor }, vParamFixo); if (cd_clifor.Text.Trim() == "") { Nr_LanctoFiscal.Text = ""; Nr_NotaFiscal.Text = ""; ID_NFItem.Text = ""; VL_SubtotalNF.Value = 0; Quantidade.Value = 0; Quantidade.Maximum = 0; VL_Subtotal.Value = 0; VL_Subtotal.Maximum = 0; } }
private void bb_trasnp_Click(object sender, EventArgs e) { UtilPesquisa.BTN_BuscaClifor(new Componentes.EditDefault[] { CD_Transp, nm_transportadora, CPF_Transp }, "isnull(a.st_transportadora, 'N')|=|'S'"); }
private void BB_Tecnico_Click(object sender, EventArgs e) { UtilPesquisa.BTN_BuscaClifor(new Componentes.EditDefault[] { ID_Tecnico, DS_Funcao }, "isnull(a.st_tecnico, 'N')|=|'S';isnull(a.ST_Funcionarios, 'N')|=|'S'"); }
private void bb_transportadora_Click(object sender, EventArgs e) { UtilPesquisa.BTN_BuscaClifor(new Componentes.EditDefault[] { cd_transportadora, nm_transportadora }, "isnull(a.st_registro, 'A')|<>|'C';isnull(a.st_transportadora, 'N')|=|'S'"); this.BuscarEnd(); }
private void button1_Click(object sender, EventArgs e) { UtilPesquisa.BTN_BuscaClifor(new EditDefault[] { editDefault1, editDefault2 }, string.Empty); }
private void btn_Clifor_Busca_Click(object sender, EventArgs e) { UtilPesquisa.BTN_BuscaClifor(new Componentes.EditDefault[] { CD_Clifor_Busca }, "isnull(a.st_registro, 'A')|<>|'C'"); }
private void bb_Clifor_Click(object sender, EventArgs e) { UtilPesquisa.BTN_BuscaClifor(new Componentes.EditDefault[] { cd_clifor_cmp, ds_clifor_cmp }, "a.st_funcionarios|=|'S'"); }
private void bb_clifor_nominal_Click(object sender, EventArgs e) { UtilPesquisa.BTN_BuscaClifor(new Componentes.EditDefault[] { cd_clifor_nominal, nm_clifor_nominal }, string.Empty); }
private void bb_clifor_Click(object sender, EventArgs e) { UtilPesquisa.BTN_BuscaClifor(new Componentes.EditDefault[] { cd_clifor, nm_clifor }, String.Empty); this.BuscarEndereco(); }
private void BB_Contador_Click(object sender, EventArgs e) { UtilPesquisa.BTN_BuscaClifor(new Componentes.EditDefault[] { CD_Clifor_Contador, NM_CliforContador }, "a.tp_pessoa|=|'F'"); }
private void bb_escritorio_contabil_Click(object sender, EventArgs e) { UtilPesquisa.BTN_BuscaClifor(new Componentes.EditDefault[] { cd_escritorio_contabil, nm_escritorio_contabil }, "a.tp_pessoa|=|'J'"); }
private void bb_cliforEnt_Click(object sender, EventArgs e) { UtilPesquisa.BTN_BuscaClifor(new Componentes.EditDefault[] { Cd_cliforent, nm_cliforEnt, Tp_pessoaent, Cd_CondFiscal_Clifor }, string.Empty); Busca_Endereco_Clifor(); }
private void bb_vendedor_Click(object sender, EventArgs e) { UtilPesquisa.BTN_BuscaClifor(new Componentes.EditDefault[] { cd_vendedor }, "isnull(a.st_vendedor, 'N')|=|'S';isnull(a.st_funcativo, 'N')|=|'S'"); }
private void bb_contratante_Click(object sender, EventArgs e) { UtilPesquisa.BTN_BuscaClifor(new Componentes.EditDefault[] { cd_contratante }, string.Empty); }
private void bb_clifor_Click(object sender, EventArgs e) { UtilPesquisa.BTN_BuscaClifor(new Componentes.EditDefault[] { cd_clifor }, "|exists|(select 1 from vtb_gro_contrato x " + " where x.cd_clifor = a.cd_clifor)"); }
private void BB_CompVend_Click(object sender, EventArgs e) { UtilPesquisa.BTN_BuscaClifor(new Componentes.EditDefault[] { CD_CompVend, NM_CompVend }, "isnull(a.st_vendedor, 'N')|=|'S';isnull(a.st_funcativo, 'N')|=|'S';a.cd_clifor|<>|'" + pCd_vendedor.Trim() + "'"); this.BuscarCFGVend(); }
private void BB_Clifor_Click(object sender, EventArgs e) { UtilPesquisa.BTN_BuscaClifor(new Componentes.EditDefault[] { nm_clifor }, string.Empty); }
private void bb_transp_Click(object sender, EventArgs e) { UtilPesquisa.BTN_BuscaClifor(new Componentes.EditDefault[] { cd_transp, nm_motorista }, "a.ST_Transportadora|=|'S'"); }