Example #1
0
        private void reportPlanoDeContasOkButton_Click(object sender, EventArgs e)
        {
            if (checkBox3.Checked == true)
            {
                if (reportPlanoDeContasMonthRadioButton.Checked == true)
                {
                    DateTime dataInicial = new DateTime(reportPlanoDeContasMonthDateTimePicker.Value.Year, reportPlanoDeContasMonthDateTimePicker.Value.Month, 01);
                    DateTime dataFinal   = new DateTime(reportPlanoDeContasMonthDateTimePicker.Value.Year, reportPlanoDeContasMonthDateTimePicker.Value.Month, DateTime.DaysInMonth(reportPlanoDeContasMonthDateTimePicker.Value.Year, reportPlanoDeContasMonthDateTimePicker.Value.Month));

                    TesourariaIFV.Forms.ReportForms.ManagementReport.ReportForms.ESIgreja report = new ReportForms.ESIgreja(dataInicial, dataFinal, reportPlanoDeContasComboBox.SelectedValue.ToString());
                    report.Show();
                }
                else
                if (reportPlanoDeContasPeriodRadioButton.Checked == true)
                {
                    TesourariaIFV.Forms.ReportForms.ManagementReport.ReportForms.ESIgreja report = new ReportForms.ESIgreja(reportPlanoDeContasInitialDateTimePicker.Value, reportPlanoDeContasFinalDateTimePicker.Value, reportPlanoDeContasComboBox.SelectedValue.ToString());
                    report.Show();
                }

                else
                {
                    MessageBox.Show("Por favor, selecione Mês/Ano ou Período.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            else if (checkBox2.Checked == true)
            {
                if (reportPlanoDeContasMonthRadioButton.Checked == true)
                {
                    DateTime dataInicial = new DateTime(reportPlanoDeContasMonthDateTimePicker.Value.Year, reportPlanoDeContasMonthDateTimePicker.Value.Month, 01);
                    DateTime dataFinal   = new DateTime(reportPlanoDeContasMonthDateTimePicker.Value.Year, reportPlanoDeContasMonthDateTimePicker.Value.Month, DateTime.DaysInMonth(reportPlanoDeContasMonthDateTimePicker.Value.Year, reportPlanoDeContasMonthDateTimePicker.Value.Month));

                    TesourariaIFV.Forms.ReportForms.ManagementReport.ReportForms.ESEstadoPorIgreja report = new ReportForms.ESEstadoPorIgreja(dataInicial, dataFinal, comboBox2.SelectedValue.ToString());
                    report.Show();
                }
                else
                if (reportPlanoDeContasPeriodRadioButton.Checked == true)
                {
                    TesourariaIFV.Forms.ReportForms.ManagementReport.ReportForms.ESEstadoPorIgreja report = new ReportForms.ESEstadoPorIgreja(reportPlanoDeContasInitialDateTimePicker.Value, reportPlanoDeContasFinalDateTimePicker.Value, comboBox2.SelectedValue.ToString());
                    report.Show();
                }

                else
                {
                    MessageBox.Show("Por favor, selecione Mês/Ano ou Período.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            else if (checkBox1.Checked == true)
            {
                if (reportPlanoDeContasMonthRadioButton.Checked == true)
                {
                    DateTime dataInicial = new DateTime(reportPlanoDeContasMonthDateTimePicker.Value.Year, reportPlanoDeContasMonthDateTimePicker.Value.Month, 01);
                    DateTime dataFinal   = new DateTime(reportPlanoDeContasMonthDateTimePicker.Value.Year, reportPlanoDeContasMonthDateTimePicker.Value.Month, DateTime.DaysInMonth(reportPlanoDeContasMonthDateTimePicker.Value.Year, reportPlanoDeContasMonthDateTimePicker.Value.Month));

                    TesourariaIFV.Forms.ReportForms.ManagementReport.ReportForms.ESRegiaoPorIgreja report = new TesourariaIFV.Forms.ReportForms.ManagementReport.ReportForms.ESRegiaoPorIgreja(dataInicial, dataFinal, comboBox1.SelectedItem.ToString());
                    report.Show();
                }
                else
                if (reportPlanoDeContasPeriodRadioButton.Checked == true)
                {
                    TesourariaIFV.Forms.ReportForms.ManagementReport.ReportForms.ESRegiaoPorIgreja report = new TesourariaIFV.Forms.ReportForms.ManagementReport.ReportForms.ESRegiaoPorIgreja(reportPlanoDeContasInitialDateTimePicker.Value, reportPlanoDeContasFinalDateTimePicker.Value, comboBox1.SelectedItem.ToString());
                    report.Show();
                }

                else
                {
                    MessageBox.Show("Por favor, selecione Mês/Ano ou Período.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            else
            {
                if (reportPlanoDeContasMonthRadioButton.Checked == true)
                {
                    DateTime dataInicial = new DateTime(reportPlanoDeContasMonthDateTimePicker.Value.Year, reportPlanoDeContasMonthDateTimePicker.Value.Month, 01);
                    DateTime dataFinal   = new DateTime(reportPlanoDeContasMonthDateTimePicker.Value.Year, reportPlanoDeContasMonthDateTimePicker.Value.Month, DateTime.DaysInMonth(reportPlanoDeContasMonthDateTimePicker.Value.Year, reportPlanoDeContasMonthDateTimePicker.Value.Month));

                    TesourariaIFV.Forms.ReportForms.ManagementReport.ReportForms.ESPaisPorIgreja report = new ReportForms.ESPaisPorIgreja(dataInicial, dataFinal);
                    report.Show();
                }
                else
                if (reportPlanoDeContasPeriodRadioButton.Checked == true)
                {
                    TesourariaIFV.Forms.ReportForms.ManagementReport.ReportForms.ESPaisPorIgreja report = new TesourariaIFV.Forms.ReportForms.ManagementReport.ReportForms.ESPaisPorIgreja(reportPlanoDeContasInitialDateTimePicker.Value, reportPlanoDeContasFinalDateTimePicker.Value);
                    report.Show();
                }

                else
                {
                    MessageBox.Show("Por favor, selecione Mês/Ano ou Período.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
        }
        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 (reportCaixaMonthRadioButton.Checked == true)
            {
                TesourariaIFV.Forms.ReportForms.ManagementReport.ReportForms.ESIgreja report = new ReportForms.ESIgreja(dataInicialMonth, dataFinalMonth, formReportCaixaComboBox.SelectedValue.ToString());//, CalculaSaldoInicialGeral(formReportCaixaComboBox.SelectedValue.ToString(), dataInicialMonth));
                report.Show();
            }
            else
            {
                if (reportCaixaPeriodRadioButton.Checked == true)
                {
                    TesourariaIFV.Forms.ReportForms.ManagementReport.ReportForms.ESIgreja report = new ReportForms.ESIgreja(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);
                }
            }
        }