private void Emprestimo() { tb_emprestimo emprestimo = new tb_emprestimo(); emprestimo.bt_devolvido = false; emprestimo.dt_emprestimo = DateTime.Now; emprestimo.nm_funcionario = txtFuncionario.Text; emprestimo.dt_devolucao = Convert.ToDateTime(dtpDevolucao.Text); emprestimo.tb_livro_id_livro = Convert.ToInt32(cboLivro.SelectedValue); EmprestimoBusiness emprestimos = new EmprestimoBusiness(); emprestimos.CadastroNovoEmprestimo(emprestimo, txtRA.Text, txtEmail.Text); }
private void Emprestimo() { tb_emprestimo emprestimo = new tb_emprestimo(); emprestimo.bt_devolvido = false; emprestimo.dt_emprestimo = DateTime.Now; emprestimo.nm_funcionario = txtFuncionario.Text; emprestimo.dt_devolucao = Convert.ToDateTime(dtpDevolucao.Text); emprestimo.tb_livro_id_livro = Convert.ToInt32(cboLivro.SelectedValue); tb_locatario prof = new tb_locatario(); prof.nm_locatario = txtNome.Text; prof.nu_celular = txtCelular.Text; prof.nu_cpf = txtCPF.Text; prof.ds_email = txtEmail.Text; EmprestimoBusiness emprestimos = new EmprestimoBusiness(); cad = emprestimos.CadastroNovoEmprestimo(emprestimo, prof); }