예제 #1
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            Estudiantes ObjEstudiante = new Estudiantes();

            try
            {
                ObjEstudiante.IdentificacionEst = int.Parse(Session["IdentificacionEst"].ToString());
                ObjEstudiante.IdentificacionAcu = int.Parse(TextBox1.Text);

                bool respuestasql = ObjEstudiante.AsignarAcu();

                if (respuestasql == true)
                {
                    MessageBox.alert("Se ha asignado el acudiente correctamente");
                }
                else
                {
                    MessageBox.alert("Este acudiente no existe en la base de datos");
                }
            }
            catch (Exception Ex) { MessageBox.alert("Este acudiente no existe en la base de datos"); }
        }