protected void BtnAgregar_Click(object sender, EventArgs e)
        {
            try
            {
                Docente         docente         = new Docente();
                DocenteServices docenteServices = new DocenteServices();
                Usuario         usuario         = new Usuario();
                usuario.Docente = new Docente();
                UsuarioServices usuarioServices = new UsuarioServices();
                //Aca es para modificar
                if (Request.QueryString["Legajo"] != "Vacio")
                {
                    AltaDocente(usuario);
                    if (Request.QueryString["IdComision"] != "22041997")
                    {
                        docenteServices.Modificar(usuario);



                        //modificar clkave
                        Response.Redirect("Comisiones.aspx");
                    }
                }

                //Aca para uno nuevo
                else
                {
                    AltaDocente(usuario);
                    Docente Aux = new Docente();
                    Aux = usuario.Docente;
                    if (usuarioServices.BuscarDocenteUsuarioSC(Convert.ToInt64(Aux.Legajo)) == false)
                    {
                        Aux = null;
                        Aux = docenteServices.BuscarDocente(usuario.Docente.Legajo);
                        if (Aux == null)
                        {
                            docenteServices.Nuevo(usuario.Docente);
                            usuarioServices.NuevoUsuario(Convert.ToInt64(TboxLegajo.Text), TboxClave.Text);
                            Response.Redirect("Login.aspx");
                        }
                        else
                        {
                            //if (Request.QueryString["IdComision"] != "22041997")
                            //{
                            //    alumnoServices.Modificar(alumno);
                            //    alumnoServices.NuevoComAlu(Convert.ToInt64((Session["IdComision" + Session.SessionID])), Convert.ToInt64(TboxLegajo.Text));
                            //    Response.Redirect("ABM-Alumno-List.aspx?IdComision=" + (Session["IdComision" + Session.SessionID]));
                            //}
                            //else
                            //{
                            //    int Cont = -1;
                            //    List<Alumno> alumnos = Session["ABMComisionNuevo-ListAlumnos" + Session.SessionID] as List<Alumno>;
                            //    foreach (Alumno alumnoAux in alumnos)
                            //    {
                            //        Cont++;
                            //        if (alumnoAux.Legajo == alumno.Legajo)
                            //        {
                            //            AltaAlumno(alumnos[Cont]);
                            //        }
                            //    }
                            //    alumnos.Add(alumno);
                            //    Session["ABMComisionNuevo-ListAlumnos" + Session.SessionID] = alumnos;
                            //    Response.Redirect("ABM-Alumno-List.aspx?IdComision=" + (Session["IdComision" + Session.SessionID]));
                            //}
                            TboxError.Text      = "Ya existe un Docente con este legajo, si desea modificarlo tiene que inresar al sistema.";
                            TboxNombre.Text     = "";
                            TboxApellido.Text   = "";
                            TboxEmail.Text      = "";
                            TboxTelefono.Text   = "";
                            TboxDirreccion.Text = "";
                            TboxCiudad.Text     = "";
                            TboxCP.Text         = "";
                            TboxClave.Text      = "";
                        }
                    }
                    else
                    {
                        TboxError.Text      = "Ya existe un Docente con este legajo, si desea modificarlo tiene que inresar al sistema.";
                        TboxNombre.Text     = "";
                        TboxApellido.Text   = "";
                        TboxEmail.Text      = "";
                        TboxTelefono.Text   = "";
                        TboxDirreccion.Text = "";
                        TboxCiudad.Text     = "";
                        TboxCP.Text         = "";
                        TboxClave.Text      = "";
                    }
                }
            }
            catch (System.FormatException)
            {
                TboxError.Text = "Complete los Datos antes de agregar";
            }
            catch (System.Threading.ThreadAbortException)
            {
            }
            catch (Exception ex)
            {
                Session["Error" + Session.SessionID] = ex;
                Response.Redirect("Error.aspx");
            }
        }