private void comboBoxigreja_SelectedIndexChanged(object sender, EventArgs e) { CaixaNegocio caixa = new CaixaNegocio(); IgrejaNegocio igreja = new IgrejaNegocio(); EntradaNegocio entrada = new EntradaNegocio(); SaidaNegocio saida = new SaidaNegocio(); textBoxcaixa.Text = caixa.Buscarvalorcorrente(igreja.Buscar(comboBoxigreja.Text.ToString()).Cod_igreja1).ToString(); textBoxentrada.Text = entrada.Buscarultimanetrada(igreja.Buscar(comboBoxigreja.Text.ToString()).Cod_igreja1).ToString(); textBoxsaida.Text = saida.Buscarultimasaida(igreja.Buscar(comboBoxigreja.Text.ToString()).Cod_igreja1).ToString(); }
private void salvar_TelaRegistrarEntrada_botao_Click(object sender, EventArgs e) { if (tipo_TelaRegistrarEntrada_textbox.Text == "" || valor_TelaRegistrarEntrada_textbox.Text =="") { MessageBox.Show("Por favor, insira TIPO E VALOR"); } else { IgrejaNegocio igreja = new IgrejaNegocio(); EntradaNegocio entrada = new EntradaNegocio(); CaixaNegocio caixa = new CaixaNegocio(); entrada.Insert(entrada.fromaentrada(tipo_TelaRegistrarEntrada_textbox.Text, float.Parse(valor_TelaRegistrarEntrada_textbox.Text), DateTime.Today.Date, igreja.Buscar(igreja_TelaRegistrarEntrada_Textbox.Text).Cod_igreja1)); caixa.Insert_entrada(igreja.Buscar(igreja_TelaRegistrarEntrada_Textbox.Text).Cod_igreja1,float.Parse(valor_TelaRegistrarEntrada_textbox.Text),caixa.Buscarvalorcorrente(igreja.Buscar(igreja_TelaRegistrarEntrada_Textbox.Text).Cod_igreja1),DateTime.Today.Date); limpacampos(); MessageBox.Show("Entrada Inserida"); } }