private void RedesAdd_Load(object sender, EventArgs e) { this.redesTableAdapter.FillBy(this.igrejafont10DataSet.Redes); this.redesTableAdapter1.Fill(this.igrejafont10DataSet.Redes1); this.igrejasTableAdapter.Fill(this.igrejafont10DataSet.Igrejas); loginInfo login = new loginInfo(); redesBindingSource.Filter = "Igreja = '" + login.GetIgreja() + "'"; igrejaComboBox.SelectedValue = login.GetIgreja(); if (login.GetRole().Equals("Igreja Local")) { igrejaComboBox.Enabled = false; } else if (login.GetRole().Equals("Presidente Estadual")) { igrejasBindingSource.Filter = "Estado = '" + login.GetEstado() + "'"; } cellMembersLabel.Text = dataGridView.RowCount.ToString(); float widthRatio = Screen.PrimaryScreen.Bounds.Width / 1366F; float heightRatio = Screen.PrimaryScreen.Bounds.Height / 768F; SizeF scale = new SizeF(widthRatio, heightRatio); this.Scale(scale); foreach (Control control in this.Controls) { control.Font = new Font("Microsoft Sans Serif", control.Font.SizeInPoints * heightRatio * widthRatio); } }
private void FiltraCelulas() { if (celulaCheckBox.Checked != true) { loginInfo info = new loginInfo(); if (setorComboBox.SelectedValue != null && areaComboBox.SelectedValue != null && distritoComboBox.SelectedValue != null && redeComboBox.SelectedValue != null) { celulasBindingSource.Filter = "Setor = '" + setorComboBox.SelectedValue.ToString() + "'" + "AND Area = '" + areaComboBox.SelectedValue.ToString() + "'" + "AND Distrito = '" + distritoComboBox.SelectedValue.ToString() + "'" + "AND Rede = '" + redeComboBox.SelectedValue.ToString() + "'" + "AND Igreja = '" + info.GetIgreja() + "'"; } else if (areaComboBox.SelectedValue != null && distritoComboBox.SelectedValue != null && redeComboBox.SelectedValue != null) { celulasBindingSource.Filter = "Area = '" + areaComboBox.SelectedValue.ToString() + "'" + "AND Distrito = '" + distritoComboBox.SelectedValue.ToString() + "'" + "AND Rede = '" + redeComboBox.SelectedValue.ToString() + "'" + "AND Igreja = '" + info.GetIgreja() + "'"; } else if (distritoComboBox.SelectedValue != null && redeComboBox.SelectedValue != null) { celulasBindingSource.Filter = "Distrito = '" + distritoComboBox.SelectedValue.ToString() + "'" + "AND Rede = '" + redeComboBox.SelectedValue.ToString() + "'" + "AND Igreja = '" + info.GetIgreja() + "'"; } else if (redeComboBox.SelectedValue != null) { celulasBindingSource.Filter = "Rede = '" + redeComboBox.SelectedValue.ToString() + "'" + "AND Igreja = '" + info.GetIgreja() + "'"; } else { celulasBindingSource.Filter = "Igreja = '" + info.GetIgreja() + "'"; } } }
private void IgrejasAdmin_Load(object sender, EventArgs e) { this.liderCelula1TableAdapter.FillMemberCell(this.igrejafont10DataSet.LiderCelula1); this.liderCelulaTableAdapter.Fill(this.igrejafont10DataSet.LiderCelula); this.celulasTableAdapter.FillBy(this.igrejafont10DataSet.Celulas); this.setoresTableAdapter.FillBy(this.igrejafont10DataSet.Setores); this.areasTableAdapter.FillBy(this.igrejafont10DataSet.Areas); this.distritosTableAdapter.Fill(this.igrejafont10DataSet.Distritos); this.redesTableAdapter.Fill(this.igrejafont10DataSet.Redes); this.igrejasTableAdapter.Fill(this.igrejafont10DataSet.Igrejas); GerenciamentoCelulas.loginInfo login = new loginInfo(); if (login.GetRole().Equals("Igreja Local")) { liderCelula1BindingSource.Filter = "Igreja = '" + igrejaComboBox.SelectedValue.ToString() + "'"; igrejaComboBox.Enabled = false; igrejaComboBox.Text = login.GetIgreja(); } else if (login.GetRole().Equals("Presidente Estadual")) { igrejasBindingSource.Filter = "Estado = '" + login.GetEstado() + "'"; } else { igrejaComboBox.Enabled = true; igrejaComboBox.Text = login.GetIgreja(); } FiltraCheckBox(); cellMembersLabel.Text = dataGridView.RowCount.ToString(); float widthRatio = Screen.PrimaryScreen.Bounds.Width / 1366F; float heightRatio = Screen.PrimaryScreen.Bounds.Height / 768F; SizeF scale = new SizeF(widthRatio, heightRatio); this.Scale(scale); foreach (Control control in this.Controls) { control.Font = new Font("Microsoft Sans Serif", control.Font.SizeInPoints * heightRatio * widthRatio); } }
private void ConvidadoAdmin_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'gerenciaCelulasDataSet.Convidados' table. You can move, or remove it, as needed. this.convidadosTableAdapter.Fill(this.gerenciaCelulasDataSet.Convidados); // TODO: This line of code loads data into the 'gerenciaCelulasDataSet.Celulas' table. You can move, or remove it, as needed. this.celulasTableAdapter.Fill(this.gerenciaCelulasDataSet.Celulas); // TODO: This line of code loads data into the 'gerenciaCelulasDataSet.Setores' table. You can move, or remove it, as needed. this.setoresTableAdapter.Fill(this.gerenciaCelulasDataSet.Setores); // TODO: This line of code loads data into the 'gerenciaCelulasDataSet.Areas' table. You can move, or remove it, as needed. this.areasTableAdapter.Fill(this.gerenciaCelulasDataSet.Areas); // TODO: This line of code loads data into the 'gerenciaCelulasDataSet.Distritos' table. You can move, or remove it, as needed. this.distritosTableAdapter.Fill(this.gerenciaCelulasDataSet.Distritos); // TODO: This line of code loads data into the 'gerenciaCelulasDataSet.Redes' table. You can move, or remove it, as needed. this.redesTableAdapter.Fill(this.gerenciaCelulasDataSet.Redes); // TODO: This line of code loads data into the 'gerenciaCelulasDataSet.Igrejas' table. You can move, or remove it, as needed. this.igrejasTableAdapter.Fill(this.gerenciaCelulasDataSet.Igrejas); // TODO: This line of code loads data into the 'gerenciaCelulasDataSet.Membros' table. You can move, or remove it, as needed. this.membrosTableAdapter.Fill(this.gerenciaCelulasDataSet.Membros); loginInfo login = new loginInfo(); if (login.GetRole().Equals("Igreja Local")) { igrejaComboBox.SelectedValue = login.GetIgreja(); igrejaComboBox.Enabled = false; } redesBindingSource.Filter = ""; redeComboBox.SelectedIndex = -1; redeComboBox.Enabled = false; distritosBindingSource.Filter = ""; distritoComboBox.SelectedIndex = -1; distritoComboBox.Enabled = false; distritoCheckBox.Checked = true; areasBindingSource.Filter = ""; areaComboBox.SelectedIndex = -1; areaComboBox.Enabled = false; areaCheckBox.Checked = true; setoresBindingSource.Filter = ""; setorComboBox.SelectedIndex = -1; setorComboBox.Enabled = false; setorCheckBox.Checked = true; FiltraMembros(); this.dataGridView.Columns[0].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; this.dataGridView.Columns[2].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; this.dataGridView.Columns[3].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; this.dataGridView.Columns[4].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; this.dataGridView.Columns[5].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; }
private void ReportDizimos_Load(object sender, EventArgs e) { this.membrosTableAdapter.Fill(this.igrejafont11DataSet.Membros); this.controleIndividualTableAdapter.FillBy(this.igrejafont11DataSet.ControleIndividual1); this.igrejasTableAdapter.FillBy(this.igrejafont11DataSet.Igrejas); loginInfo info = new loginInfo(); if (info.GetRole() == "Igreja Local") { reportDizimoComboBox.Visible = false; label1.Visible = false; membrosBindingSource.Filter = "Igreja = '" + info.GetIgreja() + "'"; controleIndividualBindingSource.Filter = "Igreja = '" + info.GetIgreja() + "'"; } else { FillIgrejasDropDown(); membrosBindingSource.Filter = "Igreja = '" + reportDizimoComboBox.SelectedValue.ToString() + "'"; } FillDataGridView(); }
private void enterContribNameTextBox_TextChanged(object sender, EventArgs e) { loginInfo info = new loginInfo(); if (info.GetRole() == "Igreja Local") { membrosBindingSource.Filter = "Igreja = '" + info.GetIgreja() + "' AND Nome like '%" + enterContribNameTextBox.Text + "%'"; } else { membrosBindingSource.Filter = "Igreja = '" + enterContribComboBox.SelectedValue.ToString() + "' AND Nome like '%" + enterContribNameTextBox.Text + "%'"; } }
private void AddMember() { igrejafont11DataSetTableAdapters.MembrosTableAdapter adapter = new igrejafont11DataSetTableAdapters.MembrosTableAdapter(); loginInfo info = new loginInfo(); if (membersListCodeTextBox.Text.Equals("")) { TesourariaIFV.igrejafont11DataSet.MembrosRow newRow = igrejafont11DataSet.Membros.NewMembrosRow(); newRow.Nome = membersListNameTextBox.Text; if (membersListComboBox.Visible) { newRow.Igreja = membersListComboBox.Text; } else { newRow.Igreja = info.GetIgreja(); } try { membrosBindingSource.EndEdit(); igrejafont11DataSet.Membros.AddMembrosRow(newRow); adapter.Update(igrejafont11DataSet.Membros); membersListCodeTextBox.Enabled = false; //membersListNameTextBox.Enabled = false; membersListCodeTextBox.Text = ""; membersListNameTextBox.Text = ""; } catch { MessageBox.Show("Adição Falhou!"); } } else { try { membersListDataGridView.CurrentRow.Cells[1].Value = membersListNameTextBox.Text; membrosBindingSource.EndEdit(); adapter.Update(igrejafont11DataSet.Membros); membersListCodeTextBox.Enabled = false; //membersListNameTextBox.Enabled = false; membersListCodeTextBox.Text = ""; membersListNameTextBox.Text = ""; } catch { MessageBox.Show("Edição Falhou!"); } } }
private void RedesAdd_Load(object sender, EventArgs e) { this.membrosTableAdapter.FillBy(this.igrejafont10DataSet.Membros); this.celulasTableAdapter.FillBy(this.igrejafont10DataSet.Celulas); this.setoresTableAdapter.FillBy(this.igrejafont10DataSet.Setores); this.areasTableAdapter.FillBy(this.igrejafont10DataSet.Areas); this.distritosTableAdapter.Fill(this.igrejafont10DataSet.Distritos); this.redesTableAdapter1.Fill(this.igrejafont10DataSet.Redes); this.igrejasTableAdapter1.Fill(this.igrejafont10DataSet.Igrejas); loginInfo login = new loginInfo(); igrejaComboBox.SelectedValue = login.GetIgreja(); if (login.GetRole().Equals("Igreja Local")) { igrejaComboBox.SelectedValue = login.GetIgreja(); igrejaComboBox.Enabled = false; } else if (login.GetRole().Equals("Presidente Estadual")) { igrejasBindingSource.Filter = "Estado = '" + login.GetEstado() + "'"; } FiltraCheckBox(); LockFields(); float widthRatio = Screen.PrimaryScreen.Bounds.Width / 1366F; float heightRatio = Screen.PrimaryScreen.Bounds.Height / 768F; SizeF scale = new SizeF(widthRatio, heightRatio); this.Scale(scale); foreach (Control control in this.Controls) { control.Font = new Font("Microsoft Sans Serif", control.Font.SizeInPoints * heightRatio * widthRatio); } }
private void MembersAdminForm_Load(object sender, EventArgs e) { this.igrejasTableAdapter.FillBy(this.igrejafont11DataSet.Igrejas); this.membrosTableAdapter.Fill(this.igrejafont11DataSet.Membros); loginInfo info = new loginInfo(); if (info.GetRole() == "Igreja Local") { membersListComboBox.Visible = false; label1.Visible = false; membrosBindingSource.Filter = "Igreja = '" + info.GetIgreja() + "'"; } else { FillIgrejasDropDown(); membrosBindingSource.Filter = "Igreja = '" + membersListComboBox.SelectedValue.ToString() + "'"; } }
private void FiltraDistritoPorRede() { loginInfo info = new loginInfo(); if (distritoCheckBox.Checked == false) { if (redeComboBox.SelectedValue != null) { distritosBindingSource.Filter = "Rede = '" + redeComboBox.SelectedValue.ToString() + "'" + "AND Igreja = '" + info.GetIgreja() + "'"; } else { distritosBindingSource.Filter = "Igreja = '" + info.GetIgreja() + "'"; } } else { FiltraCelulas(); } }
private void FiltraAreaPorDistrito() { loginInfo info = new loginInfo(); if (areaCheckBox.Checked == false) { if (distritoComboBox.SelectedValue != null && redeComboBox.SelectedValue != null) { areasBindingSource.Filter = "Distrito = '" + distritoComboBox.SelectedValue.ToString() + "'" + "AND Rede = '" + redeComboBox.SelectedValue.ToString() + "'" + "AND Igreja = '" + info.GetIgreja() + "'"; } else if (redeComboBox.SelectedValue != null) { areasBindingSource.Filter = "Rede = '" + redeComboBox.SelectedValue.ToString() + "'" + "AND Igreja = '" + info.GetIgreja() + "'"; } else { areasBindingSource.Filter = "Igreja = '" + info.GetIgreja() + "'"; } } else { FiltraCelulas(); } }
private void createReportCaixaBanco() { loginInfo info = new loginInfo(); DateTime dataInicialMonth = new DateTime(reportCaixaMonthDateTimePicker.Value.Year, reportCaixaMonthDateTimePicker.Value.Month, 01); DateTime dataFinalMonth = new DateTime(reportCaixaMonthDateTimePicker.Value.Year, reportCaixaMonthDateTimePicker.Value.Month, DateTime.DaysInMonth(reportCaixaMonthDateTimePicker.Value.Year, reportCaixaMonthDateTimePicker.Value.Month)); DateTime dataInicial = new DateTime(reportCaixaInitialDateTimePicker.Value.Year, reportCaixaInitialDateTimePicker.Value.Month, reportCaixaInitialDateTimePicker.Value.Day); DateTime dataFinal = new DateTime(reportCaixaFinalDateTimePicker.Value.Year, reportCaixaFinalDateTimePicker.Value.Month, reportCaixaFinalDateTimePicker.Value.Day); if (info.GetRole() == "Igreja Local") { if (reportCaixaMonthRadioButton.Checked == true) { TesourariaIFV.Forms.ReportForms.ReportLivroCaixaBanco report = new ReportForms.ReportLivroCaixaBanco(dataInicialMonth, dataFinalMonth, info.GetIgreja(), CalculaSaldoInicialGeral(info.GetIgreja(), dataInicialMonth)); report.Show(); } else if (reportCaixaPeriodRadioButton.Checked == true) { TesourariaIFV.Forms.ReportForms.ReportLivroCaixaBanco report = new ReportForms.ReportLivroCaixaBanco(dataInicial, dataFinal, info.GetIgreja(), CalculaSaldoInicialGeral(info.GetIgreja(), dataInicial)); report.Show(); } else { MessageBox.Show("Por favor, selecione Mês/Ano ou Período.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); } } else { if (reportCaixaMonthRadioButton.Checked == true) { TesourariaIFV.Forms.ReportForms.ReportLivroCaixaBanco report = new ReportForms.ReportLivroCaixaBanco(dataInicialMonth, dataFinalMonth, formReportCaixaComboBox.SelectedValue.ToString(), CalculaSaldoInicialGeral(formReportCaixaComboBox.SelectedValue.ToString(), dataInicialMonth)); report.Show(); } else if (reportCaixaPeriodRadioButton.Checked == true) { TesourariaIFV.Forms.ReportForms.ReportLivroCaixaBanco report = new ReportForms.ReportLivroCaixaBanco(dataInicial, dataFinal, formReportCaixaComboBox.SelectedValue.ToString(), CalculaSaldoInicialGeral(formReportCaixaComboBox.SelectedValue.ToString(), dataInicial)); report.Show(); } else { MessageBox.Show("Por favor, selecione Mês/Ano ou Período.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); } } }
private void FiltraRedePorIgreja() { loginInfo info = new loginInfo(); redesBindingSource.Filter = "Igreja = '" + info.GetIgreja() + "'"; }
private void ConvidadoAddOkButton_Click(object sender, EventArgs e) { GerenciamentoCelulas.Igrejafont10DataSet.MembrosRow newmember = igrejafont10DataSet.Membros.NewMembrosRow(); Igrejafont10DataSetTableAdapters.MembrosTableAdapter adapter = new Igrejafont10DataSetTableAdapters.MembrosTableAdapter(); loginInfo login = new loginInfo(); if (ConvidadoAddCodeTextBox.Text == "") { newmember.Aniversario = ConvidadoAddAniversarioDateTimePicker.Value; newmember.Ativo = 1; newmember.Bairro = ConvidadoAddBairroTextBox.Text; newmember.Celular = ConvidadoAddCel1TextBox.Text; newmember.CEP = CEPTextBox.Text; newmember.Cidade = ConvidadoAddCidadeTextBox.Text; newmember.Complemento = ConvidadoAddCompTextBox.Text; newmember.Discipulador = discipCode; newmember.Email = ConvidadoAddEmailTextBox.Text; if (ConvidadoAddEstadoCivilComboBox.SelectedItem != null) { if (ConvidadoAddEstadoCivilComboBox.SelectedItem.ToString().Equals("Outro")) { newmember.EstadoCivil = ConvidadoAddEstadoCivilTextBox.Text; } else { newmember.EstadoCivil = ConvidadoAddEstadoCivilComboBox.SelectedItem.ToString(); } } else { newmember.EstadoCivil = ""; } newmember.Igreja = login.GetIgreja(); newmember.Nome = ConvidadoAddNomeTextBox.Text; newmember.Num = ConvidadoAddNumTextBox.Text; if (ConvidadoAddOp1ComboBox.SelectedItem != null) { newmember.Operadora = ConvidadoAddOp1ComboBox.SelectedItem.ToString(); } else { newmember.Operadora = ""; } newmember.Rua = ConvidadoAddRuaRextBox.Text; if (ConvidadoAddMRadioButton.Checked == true) { newmember.Sexo = "M"; } else { newmember.Sexo = "F"; } newmember.UF = ConvidadoAddEstadoComboBox.SelectedValue.ToString(); if (redeComboBox.SelectedValue != null) { newmember.Rede = redeComboBox.SelectedValue.ToString(); } else { newmember.Rede = ""; } if (distritoComboBox.SelectedValue != null) { newmember.Distrito = distritoComboBox.SelectedValue.ToString(); } else { newmember.Distrito = ""; } if (areaComboBox.SelectedValue != null) { newmember.Area = areaComboBox.SelectedValue.ToString(); } else { newmember.Area = ""; } if (setorComboBox.SelectedValue != null) { newmember.Setor = setorComboBox.SelectedValue.ToString(); } else { newmember.Setor = ""; } if (celulaComboBox.SelectedValue != null) { newmember.Celula = celulaComboBox.SelectedValue.ToString(); } else { newmember.Celula = ""; } igrejafont10DataSet.Membros.Rows.Add(newmember); MessageBox.Show("Novo Convidado Adicionado!", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { System.Data.DataRow[] newrow; newrow = igrejafont10DataSet.Membros.Select("Codigo = " + toUpdate.ToString()); newrow[0]["Aniversario"] = ConvidadoAddAniversarioDateTimePicker.Value; newrow[0]["Ativo"] = 1; newrow[0]["Bairro"] = ConvidadoAddBairroTextBox.Text; newrow[0]["Celular"] = ConvidadoAddCel1TextBox.Text; newrow[0]["CEP"] = CEPTextBox.Text; newrow[0]["Cidade"] = ConvidadoAddCidadeTextBox.Text; newrow[0]["Complemento"] = ConvidadoAddCompTextBox.Text; newrow[0]["Discipulador"] = discipCode; newrow[0]["Email"] = ConvidadoAddEmailTextBox.Text; if (ConvidadoAddEstadoCivilComboBox.SelectedItem != null) { if (ConvidadoAddEstadoCivilComboBox.SelectedItem.ToString().Equals("Outro")) { newrow[0]["EstadoCivil"] = ConvidadoAddEstadoCivilTextBox.Text; } else { newrow[0]["EstadoCivil"] = ConvidadoAddEstadoCivilComboBox.SelectedItem.ToString(); } } else { newrow[0]["EstadoCivil"] = ""; } newrow[0]["Igreja"] = login.GetIgreja(); newrow[0]["Nome"] = ConvidadoAddNomeTextBox.Text; newrow[0]["Num"] = ConvidadoAddNumTextBox.Text; if (ConvidadoAddOp1ComboBox.SelectedItem != null) { newrow[0]["Operadora"] = ConvidadoAddOp1ComboBox.SelectedItem.ToString(); } else { newrow[0]["Operadora"] = ""; } newrow[0]["Rua"] = ConvidadoAddRuaRextBox.Text; if (ConvidadoAddMRadioButton.Checked == true) { newrow[0]["Sexo"] = "M"; } else { newrow[0]["Sexo"] = "F"; } newrow[0]["UF"] = ConvidadoAddEstadoComboBox.SelectedValue.ToString(); if (redeComboBox.SelectedValue != null) { newrow[0]["Rede"] = redeComboBox.SelectedValue.ToString(); } else { newrow[0]["Rede"] = ""; } if (distritoComboBox.SelectedValue != null) { newrow[0]["Distrito"] = distritoComboBox.SelectedValue.ToString(); } else { newrow[0]["Distrito"] = ""; } if (areaComboBox.SelectedValue != null) { newrow[0]["Area"] = areaComboBox.SelectedValue.ToString(); } else { newrow[0]["Area"] = ""; } if (setorComboBox.SelectedValue != null) { newrow[0]["Setor"] = setorComboBox.SelectedValue.ToString(); } else { newrow[0]["Setor"] = ""; } if (celulaComboBox.SelectedValue != null) { newrow[0]["Celula"] = celulaComboBox.SelectedValue.ToString(); } else { newrow[0]["Celula"] = ""; } } adapter.Update(igrejafont10DataSet.Membros); CleanFields(); }
private void reportTotalsOkButton_Click(object sender, EventArgs e) { loginInfo info = new loginInfo(); DateTime dataInicialMonth = new DateTime(reportTotalsMonthDateTimePicker.Value.Year, reportTotalsMonthDateTimePicker.Value.Month, 01); DateTime dataFinalMonth = new DateTime(reportTotalsMonthDateTimePicker.Value.Year, reportTotalsMonthDateTimePicker.Value.Month, DateTime.DaysInMonth(reportTotalsMonthDateTimePicker.Value.Year, reportTotalsMonthDateTimePicker.Value.Month)); DateTime dataInicial = new DateTime(reportTotalsInitialDateTimePicker.Value.Year, reportTotalsInitialDateTimePicker.Value.Month, reportTotalsInitialDateTimePicker.Value.Day); DateTime dataFinal = new DateTime(reportTotalsFinalDateTimePicker.Value.Year, reportTotalsFinalDateTimePicker.Value.Month, reportTotalsFinalDateTimePicker.Value.Day); if (info.GetRole() == "Igreja Local") { if (reportTotalsMonthRadioButton.Checked == true) { TesourariaIFV.Forms.ReportForms.ReportTotalsFinal report = new ReportForms.ReportTotalsFinal(dataInicialMonth, dataFinalMonth, info.GetIgreja()); report.Show(); } else if (reportTotalsPeriodRadioButton.Checked == true) { TesourariaIFV.Forms.ReportForms.ReportTotalsFinal report = new ReportForms.ReportTotalsFinal(dataInicial, dataFinal, info.GetIgreja()); report.Show(); } else { MessageBox.Show("Por favor, selecione Mês/Ano ou Período.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); } } else { if (reportTotalsMonthRadioButton.Checked == true) { TesourariaIFV.Forms.ReportForms.ReportTotalsFinal report = new ReportForms.ReportTotalsFinal(dataInicialMonth, dataFinalMonth, reportTotalsComboBox.SelectedValue.ToString()); report.Show(); } else if (reportTotalsPeriodRadioButton.Checked == true) { TesourariaIFV.Forms.ReportForms.ReportTotalsFinal report = new ReportForms.ReportTotalsFinal(dataInicial, dataFinal, reportTotalsComboBox.SelectedValue.ToString()); report.Show(); } else { MessageBox.Show("Por favor, selecione Mês/Ano ou Período.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); } } }
private void MemberAdmin_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'igrejafont10DataSet.FrequenciaCelula11' table. You can move, or remove it, as needed. this.frequenciaCelula11TableAdapter.FillByDistinct(this.igrejafont10DataSet.FrequenciaCelula11); this.frequenciaCelula1TableAdapter.FillBy(this.igrejafont10DataSet.FrequenciaCelula1); this.celulasTableAdapter.FillBy(this.igrejafont10DataSet.Celulas); this.setoresTableAdapter.FillBy(this.igrejafont10DataSet.Setores); this.areasTableAdapter.FillBy(this.igrejafont10DataSet.Areas); this.distritosTableAdapter.Fill(this.igrejafont10DataSet.Distritos); this.redesTableAdapter.Fill(this.igrejafont10DataSet.Redes); this.igrejasTableAdapter.Fill(this.igrejafont10DataSet.Igrejas); this.membrosTableAdapter.FillBy(this.igrejafont10DataSet.Membros); loginInfo login = new loginInfo(); igrejaComboBox.SelectedValue = login.GetIgreja(); if (login.GetRole().Equals("Igreja Local")) { igrejaComboBox.SelectedValue = login.GetIgreja(); igrejaComboBox.Enabled = false; } else if (login.GetRole().Equals("Presidente Estadual")) { igrejasBindingSource.Filter = "Estado = '" + login.GetEstado() + "'"; } redesBindingSource.Filter = ""; redeComboBox.SelectedIndex = -1; redeComboBox.Enabled = false; distritosBindingSource.Filter = ""; distritoComboBox.SelectedIndex = -1; distritoComboBox.Enabled = false; distritoCheckBox.Checked = true; areasBindingSource.Filter = ""; areaComboBox.SelectedIndex = -1; areaComboBox.Enabled = false; areaCheckBox.Checked = true; setoresBindingSource.Filter = ""; setorComboBox.SelectedIndex = -1; setorComboBox.Enabled = false; setorCheckBox.Checked = true; celulasBindingSource.Filter = ""; celulaComboBox.SelectedIndex = -1; celulaComboBox.Enabled = false; celulaCheckBox.Checked = true; FiltraMembros(); this.dataGridView.Columns[0].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; this.dataGridView.Columns[2].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; this.dataGridView.Columns[3].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; this.dataGridView.Columns[4].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; this.dataGridView.Columns[5].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; float widthRatio = Screen.PrimaryScreen.Bounds.Width / 1366F; float heightRatio = Screen.PrimaryScreen.Bounds.Height / 768F; SizeF scale = new SizeF(widthRatio, heightRatio); this.Scale(scale); foreach (Control control in this.Controls) { control.Font = new Font("Microsoft Sans Serif", control.Font.SizeInPoints * heightRatio * widthRatio); } }
private void finControlFormOkButton_Click(object sender, EventArgs e) { loginInfo userInfo = new loginInfo(); if (caixaBcoRadioButton.Checked == true) { if (valorTextBox.Text.Length != 0) { TesourariaIFV.igrejafont11DataSet.TesourariaGeralRow newRow = igrejafont11DataSet.TesourariaGeral.NewTesourariaGeralRow(); TesourariaIFV.igrejafont11DataSet.TesourariaGeralRow newRow1 = igrejafont11DataSet.TesourariaGeral.NewTesourariaGeralRow(); igrejafont11DataSetTableAdapters.TesourariaGeralTableAdapter tableAdapter = new igrejafont11DataSetTableAdapters.TesourariaGeralTableAdapter(); newRow.Data = finControlFormDateTimePicker.Value; newRow.NumDocumento = finControlFormDocNumberTextBox.Text; newRow.Descricao = finControlFormDescTextBox.Text; newRow.Conta = "Transferência Caixa/Banco"; newRow.Igreja = userInfo.GetIgreja(); newRow.Valor = GetOut(); newRow.Obs = finControlFormObsTextBox.Text; newRow.Origem = "Caixa"; newRow.Natureza = "Débito"; newRow.Usuario = userInfo.GetNome(); newRow.DataLanc = DateTime.Now; igrejafont11DataSet.TesourariaGeral.Rows.Add(newRow); tableAdapter.Update(igrejafont11DataSet.TesourariaGeral); newRow1.Data = finControlFormDateTimePicker.Value; newRow1.NumDocumento = finControlFormDocNumberTextBox.Text; newRow1.Descricao = finControlFormDescTextBox.Text; newRow1.Conta = "Transferência Caixa/Banco"; newRow1.Igreja = userInfo.GetIgreja(); newRow1.Valor = GetEntry(); newRow1.Obs = finControlFormObsTextBox.Text; newRow1.Origem = "Banco"; newRow1.Natureza = "Crédito"; newRow1.Usuario = userInfo.GetNome(); newRow1.DataLanc = DateTime.Now; igrejafont11DataSet.TesourariaGeral.Rows.Add(newRow1); tableAdapter.Update(igrejafont11DataSet.TesourariaGeral); } } else { if (valorTextBox.Text.Length != 0) { TesourariaIFV.igrejafont11DataSet.TesourariaGeralRow newRow = igrejafont11DataSet.TesourariaGeral.NewTesourariaGeralRow(); TesourariaIFV.igrejafont11DataSet.TesourariaGeralRow newRow1 = igrejafont11DataSet.TesourariaGeral.NewTesourariaGeralRow(); igrejafont11DataSetTableAdapters.TesourariaGeralTableAdapter tableAdapter = new igrejafont11DataSetTableAdapters.TesourariaGeralTableAdapter(); newRow.Data = finControlFormDateTimePicker.Value; newRow.NumDocumento = finControlFormDocNumberTextBox.Text; newRow.Descricao = finControlFormDescTextBox.Text; newRow.Conta = "Transferência Banco/Caixa"; newRow.Igreja = userInfo.GetIgreja(); newRow.Valor = GetOut(); newRow.Obs = finControlFormObsTextBox.Text; newRow.Origem = "Banco"; newRow.Natureza = "Débito"; newRow.Usuario = userInfo.GetNome(); newRow.DataLanc = DateTime.Now; igrejafont11DataSet.TesourariaGeral.Rows.Add(newRow); tableAdapter.Update(igrejafont11DataSet.TesourariaGeral); newRow1.Data = finControlFormDateTimePicker.Value; newRow1.NumDocumento = finControlFormDocNumberTextBox.Text; newRow1.Descricao = finControlFormDescTextBox.Text; newRow1.Conta = "Transferência Banco/Caixa"; newRow1.Igreja = userInfo.GetIgreja(); newRow1.Valor = GetEntry(); newRow1.Obs = finControlFormObsTextBox.Text; newRow1.Origem = "Caixa"; newRow1.Natureza = "Crédito"; newRow1.Usuario = userInfo.GetNome(); newRow1.DataLanc = DateTime.Now; igrejafont11DataSet.TesourariaGeral.Rows.Add(newRow1); tableAdapter.Update(igrejafont11DataSet.TesourariaGeral); } } CleanForm(); }