Ejemplo n.º 1
0
        public void limparCampos()
        {
            clientesController   clienteController    = new clientesController();
            emprestimoController emprestimoController = new emprestimoController();

            //limpando campos
            txtID.Clear();
            txtNome.Clear();
            textNome2.Clear();
            txtValor.Clear();
            txtJuros.Clear();
            txtDia.Clear();
            txtStatus.Clear();
            txtEndereco.Clear();
            maskCEP.Clear();
            txtNome.Focus();                                           //cursor volta ao campo nome
            DGClientes.DataSource   = clienteController.getClientes(); //preenchendo o DataGrid
            DGEmprestimo.DataSource = emprestimoController.getEmprestimo();
            DGDevedor.DataSource    = emprestimoController.getDevedor();
            DGSumario1.DataSource   = emprestimoController.getSumario1();
            DGSumario2.DataSource   = emprestimoController.getSumario2();
        }
Ejemplo n.º 2
0
        public Form1()
        {
            InitializeComponent();
            modoNavegacao(); //iniciando o form com os campos bloqueados
            //preenchendo o DataGrid:
            clientesController clienteController = new clientesController();

            DGClientes.DataSource = clienteController.getClientes();
            emprestimoController emprestimoController = new emprestimoController();

            DGEmprestimo.DataSource = emprestimoController.getEmprestimo();
            emprestimoController emprestimoController1 = new emprestimoController();

            DGDevedor.DataSource = emprestimoController1.getDevedor();
            emprestimoController emprestimoController2 = new emprestimoController();

            DGSumario1.DataSource = emprestimoController2.getSumario1();
            emprestimoController emprestimoController3 = new emprestimoController();

            DGSumario2.DataSource = emprestimoController3.getSumario2();
            emprestimoController emprestimoController4 = new emprestimoController();

            DGGiro.DataSource = emprestimoController3.getGiro();
        }