protected void Unnamed_Click(object sender, EventArgs e) { int id = int.Parse(((Button)sender).CommandArgument.ToString()); DALSolicitacao_carteira dal = new DALSolicitacao_carteira(); DALEstudante dal_e = new DALEstudante(); Modelo.Solicitacao_carteira solicitacao = dal.Select(id); Modelo.Estudante estudante = dal_e.Select(dal.SelectEstudante(solicitacao.id)); Modal_id.Text = id.ToString(); Modal_data.Text = solicitacao.data.ToShortDateString(); Modal_estudante.Text = estudante.nome; string nome_arquivo = estudante.cpf + ".jpg"; Image1.ImageUrl = "~/Imagens/" + nome_arquivo; modalContainer.Style.Add("visibility", "visible"); }
protected void btnSendForm_Click(object sender, EventArgs e) { if (cbTerm.Checked) { int id = int.Parse(Session["userid"].ToString()); DALEstudante dal = new DALEstudante(); Modelo.Estudante estudante = dal.Select(id); if (estudante.status == 0) { estudante.carteira_status = 1; dal.Update(estudante); DALSolicitacao_carteira dals = new DALSolicitacao_carteira(); dals.Insert(id); Response.Redirect("~/TelaPrincipalEstudante.aspx"); } } }