Пример #1
0
        private void btNovo_Click(object sender, EventArgs e)
        {
            DespesaManutencao form = new DespesaManutencao(new Despesa());

            form.ShowDialog();

            btPesquisar_Click(null, null);
        }
Пример #2
0
        private void VisualizarDespesa()
        {
            int linhaGrid = 0;

            if (gvDespesas.RowCount == 0)
            {
                return;
            }

            linhaGrid = gvDespesas.SelectedCells[0].RowIndex;

            Despesa despesa = new Despesa()
            {
                idDespesa = int.Parse(gvDespesas[0, linhaGrid].Value.ToString()),
                Descricao = gvDespesas[1, linhaGrid].Value.ToString(),
                gastoFixo = gvDespesas[2, linhaGrid].Value.ToString() == "Sim" ? 1 : 0
            };

            DespesaManutencao form = new DespesaManutencao(despesa);

            form.ShowDialog();

            btPesquisar_Click(null, null);
        }