protected void btnAsignarTaller(object sender, EventArgs e)
        {
            var prof   = ddlNombreProfesor.SelectedValue;
            var taller = ddlNombreTaller.SelectedValue;

            TblAsignacionProfesor asignacion = new TblAsignacionProfesor();

            asignacion.idProfesor = int.Parse(prof);
            asignacion.idTaller   = int.Parse(taller);
            ControllerAsignarProfesor ctrlAsig = new ControllerAsignarProfesor();

            ctrlAsig.InsertarAsigProfe(asignacion);
            this.Response.Redirect("./AsignarProfesor.aspx", true);
        }
Beispiel #2
0
        public bool InsertarAsigProfe(TblAsignacionProfesor _TBL_ASIGTALLLER)
        {
            bool respuesta = false;

            try
            {
                contexto.TblAsignacionProfesor.InsertOnSubmit(_TBL_ASIGTALLLER);
                contexto.SubmitChanges();
                respuesta = true;
            }
            catch (Exception ex)
            {
                System.Console.WriteLine(ex.ToString());
                respuesta = false;
            }
            return(respuesta);
        }