protected void BtnGuardar_Click(object sender, EventArgs e) { ComentarioServices comentarioServices = new ComentarioServices(); ASA.Models.Comentario comentario = new ASA.Models.Comentario(); comentario.Descripcion = TboxDescripcion.Text; comentario.Nota = DlistNota.SelectedItem.Text; comentarioServices.Agregar(comentario, Convert.ToInt64(Session["IdComision" + Session.SessionID]), Convert.ToInt64(Session["IdComision-Instancia" + Session.SessionID]), Convert.ToInt64(Session["IdComision-Alumno" + Session.SessionID])); Response.Redirect("List-Alumnos.aspx?valor=" + Convert.ToInt64(Session["IdComision-Instancia" + Session.SessionID])); }
protected void BtnGuardarEnviarMail_Click(object sender, EventArgs e) { ComentarioServices comentarioServices = new ComentarioServices(); ASA.Models.Comentario comentario = new ASA.Models.Comentario(); comentario.Descripcion = TboxDescripcion.Text; comentarioServices.Agregar(comentario, Convert.ToInt64(Session["IdComision" + Session.SessionID]), Convert.ToInt64(Session["IdComision-Instancia" + Session.SessionID]), Convert.ToInt64(Session["IdComision-Alumno" + Session.SessionID])); AlumnoServices alumnoServices = new AlumnoServices(); ASA.Models.Alumno alumno = new Alumno(); alumno = alumnoServices.BuscarAlumno(Convert.ToInt64((Session["IdComision-Alumno" + Session.SessionID]))); SendMail(alumno, comentario.Descripcion); Response.Redirect("List-Alumnos.aspx?valor=" + (Session["IdComision-Instancia" + Session.SessionID])); }