Example #1
0
        private void btn_financas_Click(object sender, EventArgs e)
        {
            FinancasView2 f = new FinancasView2();

            f.Show();
            this.Hide();
        }
Example #2
0
        public GraficosView()
        {
            InitializeComponent();

            try
            {
                this.pedidoController   = new PedidoController();
                this.financasController = new FinancasController();

                preencheComboBox();
            }
            catch (Exception e)
            {
                enviaMsg(e.Message, "erro");

                FinancasView2 f = new FinancasView2();
                f.Show();
                this.Close();
            }
        }
Example #3
0
        private void cb_pesquisaData_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                if (cb_pesquisaAno.SelectedItem != null)
                {
                    escolhePeriodoGraficos();

                    if (gf_entrada.Series[0].Points.Count == 0)
                    {
                        throw new Exception("Dados insuficientes para exibir gráficos");
                    }

                    if (gf_lucro.Series[0].Points.Count == 0)
                    {
                        throw new Exception("Dados insuficientes para exibir gráficos");
                    }

                    if (gf_saida.Series[0].Points.Count == 0)
                    {
                        throw new Exception("Dados insuficientes para exibir gráficos");
                    }

                    if (gf_pedido.Series[0].Points.Count == 0)
                    {
                        throw new Exception("Dados insuficientes para exibir gráficos");
                    }
                }
            }
            catch (Exception e1)
            {
                enviaMsg(e1.Message, "aviso");

                FinancasView2 f = new FinancasView2();
                f.Show();
                this.Close();
            }
        }