private void tp_produto_Leave(object sender, EventArgs e) { string vParam = "a.tp_produto|=|'" + tp_produto.Text.Trim() + "'"; UtilPesquisa.EDIT_LEAVE(vParam, new Componentes.EditDefault[] { tp_produto }, new CamadaDados.Estoque.Cadastros.TCD_CadTpProduto()); tempo_Tick(this, new EventArgs()); }
private void cd_marca_Leave(object sender, EventArgs e) { string vParam = "a.cd_marca|=|" + cd_marca.Text; UtilPesquisa.EDIT_LEAVE(vParam, new Componentes.EditDefault[] { cd_marca }, new CamadaDados.Estoque.Cadastros.TCD_CadMarca()); tempo_Tick(this, new EventArgs()); }
private void cd_grupo_Leave(object sender, EventArgs e) { string vParam = "a.cd_grupo|=|'" + cd_grupo.Text.Trim() + "';" + "isnull(a.tp_grupo, 'A')|=|'A';" + "isnull(a.st_registro, 'A')|<>|'C'"; UtilPesquisa.EDIT_LEAVE(vParam, new Componentes.EditDefault[] { cd_grupo }, new CamadaDados.Estoque.Cadastros.TCD_CadGrupoProduto()); tempo_Tick(this, new EventArgs()); }
private void cd_referencia_Leave(object sender, EventArgs e) { string vParam = "a.cd_referencia|=|'" + cd_referencia.Text.Trim() + "';" + "a.tp_conta|=|'A'"; DataRow linha = UtilPesquisa.EDIT_LEAVE(vParam, new Componentes.EditDefault[] { cd_referencia, ds_referencia }, new CamadaDados.Contabil.Cadastro.TCD_PlanoReferencial()); if (linha != null) { tp_contasped.SelectedValue = linha["natureza"].ToString().FormatStringEsquerda(2, '0'); } }
private void cd_contactbpai_Leave(object sender, EventArgs e) { string vColunas = "a.CD_Conta_CTB|=|'" + cd_contactbpai.Text.Trim() + "';" + "a.TP_Conta|=|'S'"; DataRow linha = UtilPesquisa.EDIT_LEAVE(vColunas, new Componentes.EditDefault[] { cd_contactbpai, ds_conta_ctbpai, cd_classif_pai }, new CamadaDados.Contabil.Cadastro.TCD_CadPlanoContas()); if (linha != null) { natureza.SelectedValue = linha["natureza"].ToString(); natureza.Enabled = string.IsNullOrEmpty(linha["natureza"].ToString()); tp_contasped.SelectedValue = linha["tp_contasped"].ToString(); tp_contasped.Enabled = tp_contasped.SelectedValue == null; cd_classificacao.Text = TCN_PlanoContas.CalcularClassif(cd_contactbpai.Text, null); } else { natureza.Enabled = true; tp_contasped.Enabled = true; } }