예제 #1
0
        private void btnEmprestimo1_Click(object sender, EventArgs e)
        {
            //panel1.BackColor = Color.Red;
            frmEmprestimo novoEmprestimo = new frmEmprestimo();

            novoEmprestimo.ShowDialog();
        }
예제 #2
0
        private void dtgEmprestimoTelaPrincipal_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            frmEmprestimo novoEmprestimo = new frmEmprestimo();

            novoEmprestimo.idUsuario = Convert.ToInt16(dtgEmprestimoTelaPrincipal.CurrentRow.Cells["ID_USUARIO"].Value);
            novoEmprestimo.salaAluno = dtgEmprestimoTelaPrincipal.CurrentRow.Cells["USUARIO_ANO"].Value.ToString();
            novoEmprestimo.nomeAluno = dtgEmprestimoTelaPrincipal.CurrentRow.Cells["NOME_USUARIO"].Value.ToString();

            novoEmprestimo.idLivro   = Convert.ToInt16(dtgEmprestimoTelaPrincipal.CurrentRow.Cells["ID_LIVRO"].Value);
            novoEmprestimo.NomeLivro = dtgEmprestimoTelaPrincipal.CurrentRow.Cells["NOME_LIVRO"].Value.ToString();
            novoEmprestimo.Genero    = dtgEmprestimoTelaPrincipal.CurrentRow.Cells["GENERO"].Value.ToString();
            novoEmprestimo.dataSaida = Convert.ToDateTime(dtgEmprestimoTelaPrincipal.CurrentRow.Cells["DATASAIDA1"].Value);

            novoEmprestimo.idEmprestimo = Convert.ToInt16(dtgEmprestimoTelaPrincipal.CurrentRow.Cells["ID_EMPRESTIMO"].Value);
            novoEmprestimo.idLocal      = Convert.ToInt16(dtgEmprestimoTelaPrincipal.CurrentRow.Cells["idLocal1"].Value);

            novoEmprestimo.ShowDialog();
        }