public Caixa() { InitializeComponent(); comboBoxigreja.Items.Clear(); IgrejaNegocio igreja = new IgrejaNegocio(); igreja.Obterigrejas().ForEach(delegate (string nome) { comboBoxigreja.Items.Add(nome); }); }
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(); }
public Registrar_Entrada() { IgrejaNegocio igreja = new IgrejaNegocio(); InitializeComponent(); tipo_TelaRegistrarEntrada_textbox.Items.Add("DÍZIMO"); tipo_TelaRegistrarEntrada_textbox.Items.Add("OFERTA"); tipo_TelaRegistrarEntrada_textbox.Items.Add("DOAÇÃO"); tipo_TelaRegistrarEntrada_textbox.Items.Add("VENDA"); igreja.Obterigrejas().ForEach(delegate (string nome) { igreja_TelaRegistrarEntrada_Textbox.Items.Add(nome); }); }
public Cadastrar_Evento() { InitializeComponent(); dataate.Value = DateTime.Today.Date; Datade.Value = DateTime.Today.Date; recorrencia_TelaCadastarEvento_textbox.Items.Add(recorrencias.Anual); recorrencia_TelaCadastarEvento_textbox.Items.Add(recorrencias.Mensal); recorrencia_TelaCadastarEvento_textbox.Items.Add(recorrencias.Bisemanal); recorrencia_TelaCadastarEvento_textbox.Items.Add(recorrencias.Semanal); recorrencia_TelaCadastarEvento_textbox.Items.Add(recorrencias.Diário); IgrejaNegocio igreja = new IgrejaNegocio(); igreja.Obterigrejas().ForEach(delegate (string nome) { comboBoxigreja.Items.Add(nome); }); }
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"); } }
private void salvar_TelaRegistrarSaida_botao_Click(object sender, EventArgs e) { if (fornecedor_TelaRegistrarSaida_Textbox.Text == "" || igreja_TelaRegistrarSaida_Textbox.Text == "" || valor_TelaRegistrarSaida_textbox.Text == "" ||tiposaidacombobox.Text == "") { MessageBox.Show("Por favor, preencha todos os dados!"); } else { IgrejaNegocio igreja = new IgrejaNegocio(); FornecedorNegocio fornec = new FornecedorNegocio(); SaidaNegocio saida = new SaidaNegocio(); CaixaNegocio caixa = new CaixaNegocio(); saida.Insert(saida.montarsaida(fornec.Buscar(fornecedor_TelaRegistrarSaida_Textbox.Text.ToString()).Cod_Fornecedor1, igreja.Buscar(igreja_TelaRegistrarSaida_Textbox.Text.ToString()).Cod_igreja1, float.Parse(valor_TelaRegistrarSaida_textbox.Text.ToString()), tiposaidacombobox.Text.ToString(), DateTime.Today.Date)); caixa.Insert_saida(igreja.Buscar(igreja_TelaRegistrarSaida_Textbox.Text).Cod_igreja1, float.Parse(valor_TelaRegistrarSaida_textbox.Text),caixa.Buscarvalorcorrente(igreja.Buscar(igreja_TelaRegistrarSaida_Textbox.Text).Cod_igreja1), DateTime.Today.Date); limparcampos(); MessageBox.Show("Saída Inserida com sucesso!"); } }
public Registrar_Saida() { InitializeComponent(); tiposaidacombobox.Items.Add("PAGAMENTO DE CONTAS"); tiposaidacombobox.Items.Add("DOAÇÃO"); tiposaidacombobox.Items.Add("PAGAMENTO DE SALÁRIO"); tiposaidacombobox.Items.Add("COMPRA DE MERCADORIA"); tiposaidacombobox.Items.Add("COMPRA DE BENS"); IgrejaNegocio igreja = new IgrejaNegocio(); FornecedorNegocio fornecedor = new FornecedorNegocio(); igreja.Obterigrejas().ForEach(delegate (string nome) { igreja_TelaRegistrarSaida_Textbox.Items.Add(nome); }); fornecedor.Retornafornecedores().ForEach(delegate (string nome) { fornecedor_TelaRegistrarSaida_Textbox.Items.Add(nome); }); }
public ChurchAdmin___Camada_de_Negocio.Entidades_Negocio.MunicipioNegocio membro; //deve usar camada de negocio #endregion Fields #region Constructors public Cadastro_Membro() { InitializeComponent(); sexo_TelaCadastrarMembro_texbox.Items.Add("Masculino"); sexo_TelaCadastrarMembro_texbox.Items.Add("Feminino"); dtcadastro_TelaCadastrarMembro_texbox.Text = DateTime.Today.ToString("dd-MM-yyyy"); dt_batismo.Value = DateTime.Today.Date; CargoNegocio cargos = new CargoNegocio(); IgrejaNegocio igreja = new IgrejaNegocio(); igreja.Obterigrejas().ForEach(delegate (string nome) { comboBoxIgreja.Items.Add(nome); }); cargos.Obtercargos().ForEach(delegate (string nome) { comboboxCargo.Items.Add(nome); }); }
private void salvar_TelaCadastrarMembro_botao_Click(object sender, EventArgs e) { if (cpf_TelaCadastrarMembro_texbox.Text == string.Empty || nome_TelaCadastrarMembro_texbox.Text == string.Empty || sexo_TelaCadastrarMembro_texbox.Text == string.Empty ||rg_TelaCadastrarMembro_texbox.Text == string.Empty || telefone_TelaCadastrarMembro_texbox.Text == string.Empty || comboboxCargo.Text == string.Empty || logradouro_TelaCadastrarMembro_textbox.Text == string.Empty|| comboBoxbairro.Text == string.Empty || comboBoxCidade.Text == string.Empty || comboBoxestado.Text == string.Empty||comboBoxpais.Text == string.Empty || cep_TelaCadastrarMembro_textbox.Text == string.Empty|| numero_TelaCadastrarMembro_texbox.Text == string.Empty|| comboBoxIgreja.Text == string.Empty) { MessageBox.Show("Favor preencher todos os dados"); } else { this.Cursor = Cursors.WaitCursor; BairroNegocio bairro = new BairroNegocio(); EnderecoNegocio endereco = new EnderecoNegocio(); CargoNegocio cargo = new CargoNegocio(); MembroNegocio membro = new MembroNegocio(); IgrejaNegocio igreja = new IgrejaNegocio(); long cpf = Convert.ToInt64(cpf_TelaCadastrarMembro_texbox.Text.ToString()); long telefone = Convert.ToInt64(telefone_TelaCadastrarMembro_texbox.Text.ToString()); if (membro.confereCPFexistente(cpf) == true) { endereco.Insert(endereco.alt_end(bairro.Buscar(comboBoxbairro.Text.ToString()).Cod_Bairro, 2, logradouro_TelaCadastrarMembro_textbox.Text.ToString(), numero_TelaCadastrarMembro_texbox.Text.ToString(), Convert.ToInt32(cep_TelaCadastrarMembro_textbox.Text.ToString()))); membro.Insert(cargo.Buscar(comboboxCargo.Text.ToString()), endereco.BuscarComBairro(logradouro_TelaCadastrarMembro_textbox.Text.ToString(), bairro.Buscar(comboBoxbairro.Text.ToString()).Cod_Bairro), nome_TelaCadastrarMembro_texbox.Text.ToString(), dt_nascimento.Value.Date, cpf, Convert.ToInt32(rg_TelaCadastrarMembro_texbox.Text.ToString()), DateTime.Today.Date, dt_batismo.Value.Date, telefone, 1, sexo_TelaCadastrarMembro_texbox.Text.ToString()); igreja.associamembro(igreja.Buscar(comboBoxIgreja.Text.ToString()).Cod_igreja1, membro.buscaporcpf(Convert.ToInt64(cpf_TelaCadastrarMembro_texbox.Text.ToString())).Cod_Membro1); this.Cursor = Cursors.Default; limparTextBoxes(); MessageBox.Show("Cadastro Realizado!"); } else { MessageBox.Show("CPF já cadastrado no sistema!"); } } }