private void afterExcluiCustoFixo() { if (bsFormulaApontamento.Current != null) { if (CD_Empresa.Text.Trim().Equals(string.Empty)) { MessageBox.Show("Obrigatório informar empresa.", "Mensagem", MessageBoxButtons.OK, MessageBoxIcon.Information); CD_Empresa.Focus(); return; } if (bsCustoFixo.Current == null) { MessageBox.Show("Obrigatorio selecionar custo fixo para excluir.", "Mensagem", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } if (MessageBox.Show("Custo fixo selecionado: " + (bsFormulaApontamento.Current as TRegistro_FormulaApontamento).Cd_produto.Trim() + "-" + (bsFormulaApontamento.Current as TRegistro_FormulaApontamento).Ds_produto.Trim() + "\r\n\r\nConfirma exclusão?", "Pergunta", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.Yes) { //Adicionar item na lista a ser excluido (bsFormulaApontamento.Current as TRegistro_FormulaApontamento).LCustoFixoDel.Add( bsCustoFixo.Current as TRegistro_CustoFixo_Direto); //Excluir item do grid (bsFormulaApontamento.Current as TRegistro_FormulaApontamento).LCustoFixo.Remove( bsCustoFixo.Current as TRegistro_CustoFixo_Direto); bsFormulaApontamento.ResetCurrentItem(); } } else { MessageBox.Show("Não existe registro de apontamento selecionado.", "Mensagem", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
public override void afterNovo() { if (tcCentral.SelectedIndex == 0) { if ((vTP_Modo == TTpModo.tm_busca) || (vTP_Modo == TTpModo.tm_Standby)) { BS_CadSerieNF.AddNew(); base.afterNovo(); if (!Nr_Serie.Focus()) { DS_SerieNf.Focus(); } } } else { if ((vTP_Modo == TTpModo.tm_busca) || (vTP_Modo == TTpModo.tm_Standby)) { string NR_Serie_Sequencia = (BS_CadSerieNF.Current as TRegistro_CadSerieNF).Nr_Serie.Trim(); string DS_Serie_Sequencia = (BS_CadSerieNF.Current as TRegistro_CadSerieNF).DS_SerieNf.Trim(); BS_Sequencia.AddNew(); base.afterNovo(); CD_Empresa.Focus(); (BS_Sequencia.Current as TRegistro_CadSequenciaNF).Nr_Serie = NR_Serie_Sequencia; (BS_Sequencia.Current as TRegistro_CadSequenciaNF).DS_Serie = DS_Serie_Sequencia; NR_Serie_Sequencia_edit.Text = NR_Serie_Sequencia; DS_Serie_Sequencia_edit.Text = DS_Serie_Sequencia; } } }
public void afterGrava() { if (string.IsNullOrEmpty(CD_Empresa.Text)) { MessageBox.Show("Obrigatório informar empresa.", "Mensagem", MessageBoxButtons.OK, MessageBoxIcon.Information); CD_Empresa.Focus(); return; } if (string.IsNullOrEmpty(login.Text)) { MessageBox.Show("Obrigatório informar login.", "Mensagem", MessageBoxButtons.OK, MessageBoxIcon.Information); login.Focus(); return; } if (string.IsNullOrEmpty(senha.Text)) { MessageBox.Show("Obrigatório informar senha.", "Mensagem", MessageBoxButtons.OK, MessageBoxIcon.Information); senha.Focus(); return; } if (string.IsNullOrEmpty(licenca.Text)) { MessageBox.Show("Obrigatório informar licença.", "Mensagem", MessageBoxButtons.OK, MessageBoxIcon.Information); licenca.Focus(); return; } if (string.IsNullOrEmpty(Integracao.Text)) { MessageBox.Show("Obrigatório informar código integração.", "Mensagem", MessageBoxButtons.OK, MessageBoxIcon.Information); Integracao.Focus(); return; } DialogResult = DialogResult.OK; }
private void TFOrcamentoProjeto_Load(object sender, EventArgs e) { this.Icon = Utils.ResourcesUtils.TecnoAliance_ICO; pDados.set_FormatZero(); if (this.rorcamento != null) { bsOrcamento.DataSource = new CamadaDados.Faturamento.Orcamento.TList_Orcamento() { this.rorcamento }; tslTotal.Text = rorcamento.lItens.Sum(p => p.Vl_subtotalliq).ToString("N2", new System.Globalization.CultureInfo("pt-BR")); CD_Empresa.Focus(); } else { bsOrcamento.AddNew(); (bsOrcamento.Current as CamadaDados.Faturamento.Orcamento.TRegistro_Orcamento).St_orcprojeto = "S"; CD_Empresa.Focus(); //Buscar vendedor do login CamadaDados.Financeiro.Cadastros.TList_CadClifor lVend = CamadaNegocio.Financeiro.Cadastros.TCN_CadClifor.BuscaVendedor(string.Empty, Utils.Parametros.pubLogin, null); if (lVend.Count > 0) { CD_CompVend.Text = lVend[0].Cd_clifor; NM_CompVend.Text = lVend[0].Nm_clifor; } } }
private void BB_Empresa_Click(object sender, EventArgs e) { FormBusca.UtilPesquisa.BTN_BuscaEmpresa(new Componentes.EditDefault[] { CD_Empresa, NM_Empresa }, string.Empty); if (!string.IsNullOrEmpty(CD_Empresa.Text)) { //Buscar config pdv para a empresa CamadaDados.Faturamento.Cadastros.TList_CFGCupomFiscal lCfg = CamadaNegocio.Faturamento.Cadastros.TCN_CFGCupomFiscal.Buscar(CD_Empresa.Text, null); if (lCfg.Count > 0) { rCfg = lCfg[0]; //cd_produto.ST_Int = lCfg[0].St_produtocodigobool; CD_Clifor.Text = rCfg.Cd_clifor; NM_Clifor.Text = rCfg.Nm_clifor; cd_endereco.Text = rCfg.Cd_endereco; ds_endereco.Text = rCfg.Ds_endereco; CD_TabelaPreco.Text = rCfg.Cd_tabelapreco; } else { MessageBox.Show("Não existe configuração frente caixa para a empresa.", "Mensagem", MessageBoxButtons.OK, MessageBoxIcon.Information); CD_Empresa.Clear(); CD_Empresa.Focus(); return; } } }
private bool validaGravaPsAvulsa() { if (placaCarreta.Text.Trim().Equals(string.Empty)) { MessageBox.Show("Obrigatorio informar placa.", "Mensagem", MessageBoxButtons.OK, MessageBoxIcon.Information); placaCarreta.Focus(); return(false); } if (CD_Empresa.Text.Trim().Equals(string.Empty)) { MessageBox.Show("Obrigatorio informar empresa.", "Mensagem", MessageBoxButtons.OK, MessageBoxIcon.Information); CD_Empresa.Focus(); return(false); } if (TP_Movimento.Text.Trim().Equals(string.Empty)) { MessageBox.Show("Obrigatorio informar tipo de movimento.", "Mensagem", MessageBoxButtons.OK, MessageBoxIcon.Information); TP_Movimento.Focus(); return(false); } if (nm_clifor.Text.Trim().Equals(string.Empty)) { MessageBox.Show("Obrigatorio informar nome do cliente.", "Mensagem", MessageBoxButtons.OK, MessageBoxIcon.Information); nm_clifor.Focus(); return(false); } return(true); }
private void afterBusca() { if (string.IsNullOrEmpty(CD_Empresa.Text)) { MessageBox.Show("Obrigatorio informar empresa.", "Mensagem", MessageBoxButtons.OK, MessageBoxIcon.Information); CD_Empresa.Focus(); return; } if (string.IsNullOrEmpty(id_bico.Text)) { MessageBox.Show("Obrigatorio informar bico.", "Mensagem", MessageBoxButtons.OK, MessageBoxIcon.Information); id_bico.Focus(); return; } bsVendaCombustivel.DataSource = CamadaNegocio.PostoCombustivel.TCN_VendaCombustivel.Buscar(string.Empty, CD_Empresa.Text, string.Empty, id_bico.Text, string.Empty, string.Empty, dt_inicial.Text, dt_final.Text, "'A'", "N", false, string.Empty, string.Empty, "a.dt_abastecimento desc", null); volumetotal.Value = (bsVendaCombustivel.List as CamadaDados.PostoCombustivel.TList_VendaCombustivel).Sum(p => p.Volumeabastecido); valortotal.Value = (bsVendaCombustivel.List as CamadaDados.PostoCombustivel.TList_VendaCombustivel).Sum(p => p.Vl_subtotal); }
public override void afterNovo() { if ((vTP_Modo == TTpModo.tm_busca) || (vTP_Modo == TTpModo.tm_Standby)) { if (tcCentral.SelectedTab.Equals(tpPadrao)) { BS_LanCMP_Requisicao.AddNew(); base.afterNovo(); if (!CD_Empresa.Focus()) { CD_Clifor_Requisitante.Focus(); this.modoBotoes(this.vTP_Modo, true, false, true, false, true, false, false); } } else { pd_Consulta.LimparRegistro(); BS_LanCMP_Requisicao.Clear(); this.modoBotoes(this.vTP_Modo, true, false, false, false, false, true, false); } } if (tcCentral.SelectedTab.Equals(tpPadrao)) { this.modoBotoes(this.vTP_Modo, true, false, true, false, true, false, false); } }
private void ImportarDominio() { if (string.IsNullOrEmpty(CD_Empresa.Text)) { MessageBox.Show("Obrigatorio informar empresa.", "Mensagem", MessageBoxButtons.OK, MessageBoxIcon.Information); CD_Empresa.Focus(); return; } if (string.IsNullOrEmpty(path_arquivo.Text)) { MessageBox.Show("Obrigatorio informar path para gerar arquivo.", "Mensagem", MessageBoxButtons.OK, MessageBoxIcon.Information); path_arquivo.Focus(); return; } using (TFImportDominio fImport = new TFImportDominio()) { if (fImport.ShowDialog() == DialogResult.OK) { try { CamadaNegocio.Fiscal.IDominio.TCN_ImportDominio.GerarArquivo(CD_Empresa.Text, new DateTime(int.Parse(cbAno.Text), int.Parse(cbMes.SelectedValue.ToString()), 1), new DateTime(int.Parse(cbAno.Text), int.Parse(cbMes.SelectedValue.ToString()), DateTime.DaysInMonth(int.Parse(cbAno.Text), int.Parse(cbMes.SelectedValue.ToString()))), path_arquivo.Text, fImport.St_cliente, fImport.St_fornecedor, fImport.St_remetdest); MessageBox.Show("Arquivo gerado com sucesso.", "Mensagem", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { MessageBox.Show(ex.Message.Trim(), "Erro", MessageBoxButtons.OK, MessageBoxIcon.Error); } } } }
private void panelDados1_Leave(object sender, EventArgs e) { if (TPModo == TTpModo.tm_Insert) { CD_Empresa.Focus(); } }
private void ConsultaPreco() { rProg = null; if ((CD_Produto.Text.Trim() != string.Empty) && (CD_Empresa.Trim() != string.Empty) && (CD_TabelaPreco.Trim() != string.Empty)) { if (!string.IsNullOrEmpty(Cd_clifor)) { //Vefiricar se existe programacao especial de venda rProg = CamadaNegocio.Faturamento.ProgEspecialVenda.TCN_ProgEspecialVenda.BuscarProg(CD_Empresa, Cd_clifor, CD_Produto.Text, CD_TabelaPreco, null); if (rProg != null) { if (rProg.Tp_preco.Trim().ToUpper().Equals("C"))//Preco de Custo { Vl_Unitario.Value = CamadaNegocio.Estoque.TCN_LanEstoque.BuscarVlEstoqueUltimaCompra(CD_Empresa, CD_Produto.Text, null); Vl_Unitario.Enabled = CD_TabelaPreco.Trim().Equals(string.Empty) || Vl_Unitario.Value.Equals(decimal.Zero); return; } } } Vl_Unitario.Value = TCN_LanPrecoItem.Busca_ConsultaPreco(CD_Empresa, CD_Produto.Text, CD_TabelaPreco, null); VL_Total.Value = Vl_Unitario.Value - VL_Desconto.Value + vl_acrescimo.Value; Vl_Unitario.Enabled = CD_TabelaPreco.Trim().Equals(string.Empty) || Vl_Unitario.Value.Equals(decimal.Zero); } }
private void afterBusca() { if (string.IsNullOrEmpty(CD_Empresa.Text)) { MessageBox.Show("Obrigatorio informar empresa.", "Mensagem", MessageBoxButtons.OK, MessageBoxIcon.Information); CD_Empresa.Focus(); return; } if (string.IsNullOrEmpty(placa.Text.Replace("-", "").Trim())) { MessageBox.Show("Obrigatorio informar placa.", "Mensagem", MessageBoxButtons.OK, MessageBoxIcon.Information); placa.Focus(); return; } bsVendaCombustivel.DataSource = CamadaNegocio.PostoCombustivel.TCN_VendaCombustivel.Buscar(string.Empty, CD_Empresa.Text, string.Empty, string.Empty, string.Empty, string.Empty, dt_ini.Text, dt_fin.Text, string.Empty, string.Empty, false, string.Empty, placa.Text, "a.dt_abastecimento desc", null); }
public override void afterNovo() { if (tcCentral.SelectedIndex.Equals(0)) { if ((vTP_Modo == TTpModo.tm_busca) || (vTP_Modo == TTpModo.tm_Standby)) { bsTpPesagem.AddNew(); } base.afterNovo(); if (!tp_pesagem.Focus()) { nm_tppesagem.Focus(); } } else { if ((vTP_Modo == TTpModo.tm_busca) || (vTP_Modo == TTpModo.tm_Standby)) { bsSeq.AddNew(); base.afterNovo(); CD_Empresa.Focus(); (bsSeq.Current as TRegistro_CFGSeqPesagem).Tp_pesagem = (bsTpPesagem.Current as TRegistro_CadTpPesagem).Tp_pesagem; (bsSeq.Current as TRegistro_CFGSeqPesagem).Nm_tppesagem = (bsTpPesagem.Current as TRegistro_CadTpPesagem).Nm_tppesagem; bsSeq.ResetCurrentItem(); } } }
private void afterBusca() { if (string.IsNullOrEmpty(CD_Empresa.Text)) { MessageBox.Show("Obrigatorio informar empresa.", "Mensagem", MessageBoxButtons.OK, MessageBoxIcon.Information); CD_Empresa.Focus(); return; } bsFatura.DataSource = CamadaNegocio.Financeiro.Cartao.TCN_FaturaCartao.Buscar(string.Empty, CD_Empresa.Text, nr_cartao.Text, id_bandeira.Text, id_maquina.Text, string.Empty, rbDebito.Checked ? "D" : rbCredito.Checked ? "C" : string.Empty, rbPagar.Checked ? "P" : "R", string.Empty, string.Empty, cd_domiciliobancario.Text, rbFatura.Checked ? "F" : string.Empty, DT_Inicial.Text, DT_Final.Text, decimal.Zero, decimal.Zero, true, "A", "a.dt_vencto", null); sd_quitar.Text = (bsFatura.List as CamadaDados.Financeiro.Cartao.TList_FaturaCartao).Sum(p => p.Vl_Saldoquitar).ToString("N2", new System.Globalization.CultureInfo("pt-BR")); dt_quitacao.Focus(); }
public override void afterAltera() { if (tcCentral.SelectedIndex == 0) { base.afterAltera(); if (vTP_Modo == TTpModo.tm_Edit) { DS_SerieNf.Focus(); } } else { if (BS_Sequencia.Count > 0) { base.afterAltera(); if (vTP_Modo == TTpModo.tm_Edit) { CD_Empresa.Focus(); } } else { afterNovo(); } } }
private void LimparFiltros() { CD_Empresa.Clear(); CD_Clifor.Clear(); id_folha.Clear(); cbAberto.Checked = false; cbProcessado.Checked = false; }
public DataTable MostrarEmpresa() { objEmpresa = new CD_Empresa(); DataTable dtbl = new DataTable(); dtbl = objEmpresa.MostrarEmpresa(); return(dtbl); }
private void afterNovo() { CD_Empresa.Clear(); nm_empresa.Clear(); cd_tabelapreco.Clear(); ds_tabelapreco.Clear(); path_arquivo.Clear(); CD_Empresa.Focus(); }
private void LimparFiltros() { id_inventario.Clear(); CD_Empresa.Clear(); dt_fin.Clear(); dt_ini.Clear(); st_aberto.Checked = false; st_processado.Checked = false; }
private void LimparFiltros() { id_provisao.Clear(); CD_Empresa.Clear(); cd_produto.Clear(); dt_ini.Clear(); dt_fin.Clear(); st_provsaldo.Checked = false; }
private void afterGrava() { if (string.IsNullOrEmpty(CD_Empresa.Text)) { MessageBox.Show("Obrigatorio informar empresa.", "Mensagem", MessageBoxButtons.OK, MessageBoxIcon.Information); CD_Empresa.Focus(); return; } DialogResult = DialogResult.OK; }
private void LimparFiltros() { id_solicitacao.Clear(); CD_Empresa.Clear(); cd_clifor.Clear(); DT_Inicial.Clear(); DT_Final.Clear(); vl_ini.Value = vl_ini.Minimum; vl_fin.Value = vl_fin.Minimum; }
public override void afterAltera() { base.afterAltera(); if (this.vTP_Modo == TTpModo.tm_Edit) { if (!CD_Empresa.Focus()) { CD_Empresa.Focus(); } } }
public override void afterNovo() { if ((vTP_Modo == TTpModo.tm_busca) || (vTP_Modo == TTpModo.tm_Standby)) { BS_CadLocalArm_X_Empresa.AddNew(); base.afterNovo(); if (!CD_Empresa.Focus()) { CD_Local.Focus(); } } }
public override void afterNovo() { if ((vTP_Modo == TTpModo.tm_busca) || (vTP_Modo == TTpModo.tm_Standby)) { bsParamZera.AddNew(); base.afterNovo(); if (!CD_Empresa.Focus()) { CD_Empresa.Focus(); } } }
public override void afterAltera() { if (tcCentral.SelectedTab.Equals(tpPadrao)) { base.afterAltera(); if (vTP_Modo == TTpModo.tm_Edit) { CD_Empresa.Focus(); } QTD_Aprovada.Enabled = false; } }
private void BB_Alterar_Click(object sender, EventArgs e) { TPModo = TTpModo.tm_Edit; tabControl_op.SelectedTab = tabPage_Lancamento; PreparaBotoes(TPModo); HabilitarPaineis(true); Tp_Movimento.Enabled = false; Nr_Pedido.Enabled = false; Nr_Pedido.ReadOnly = true; dataGridNavegador.Enabled = false; CD_Empresa.Focus(); }
public Boolean ActualizarEmpresa(int id, string ruc, string nombre, string telefono, string direccion) { try { objEmpresa = new CD_Empresa(); objEmpresa.ActualizarEmpresa(id, ruc, nombre, telefono, direccion); return(true); } catch (Exception) { } return(false); }
public Boolean EliminarEmpresa(int id) { try { objEmpresa = new CD_Empresa(); objEmpresa.EliminarEmpresa(id); return(true); } catch (Exception) { } return(false); }
private void afterBusca() { if (CD_Empresa.Text.Trim().Equals(string.Empty)) { MessageBox.Show("Obrigatorio informar empresa.", "Mensagem", MessageBoxButtons.OK, MessageBoxIcon.Information); CD_Empresa.Focus(); return; } if (TP_Ordem.Text.Trim().Equals(string.Empty)) { MessageBox.Show("Obrigatorio informar tipo de ordem.", "Mensagem", MessageBoxButtons.OK, MessageBoxIcon.Information); TP_Ordem.Focus(); return; } if (CD_Clifor.Text.Trim().Equals(string.Empty)) { MessageBox.Show("Obrigatorio informar cliente.", "Mensagem", MessageBoxButtons.OK, MessageBoxIcon.Information); CD_Clifor.Focus(); return; } bsOS.DataSource = CamadaNegocio.Servicos.TCN_LanServico.Buscar(string.Empty, CD_Empresa.Text, CD_Clifor.Text, string.Empty, CD_Produto.Text, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, "A", DT_Inic.Text, DT_Final.Text, "'FE'", string.Empty, false, string.Empty, string.Empty, string.Empty, false, false, false, false, false, 0, string.Empty, string.Empty, null); }