/// <summary>
        /// ENVIA UN EMAIL
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnAceptar_Click(object sender, EventArgs e)
        {
            try
            {
                //ILogicaEmails le = FabricaLogica.getLogicaEmails();
                ServiceWebMail sm = new ServiceWebMail();

                SiteAlumno m = Master;
                if (m != null && m.USUARIO_LOGUEADO != null)
                {
                    Alumno a = (Alumno)m.USUARIO_LOGUEADO;

                    refServiceWebMail.Email newEmail = new refServiceWebMail.Email
                                                   {
                                                       CUERPO = txtContenido.Text,
                                                       FECHA = DateTime.Now,
                                                       ASUNTO = txtAsunto.Text
                                                   };
                    Alumno destinatario = new Alumno {NOMBRE_USUARIO = txtPara.Text};

                    //le.AgregarEmail(txtAsunto.Text, txtContenido.Text, a, txtPara.Text);
                    //le.AgregarEmail(newEmail, a, destinatario);
                    sm.AgregarEmail(newEmail, a, destinatario);
                    Response.Redirect("~/AdminAlumno/home.aspx");
                }
            }
            catch (Exception ex)
            {
                lblInfo.Text = ex.Message;
            }
        }
 /// <remarks/>
 public void NuevoAlumnoAsync(Alumno a) {
     this.NuevoAlumnoAsync(a, null);
 }
 public void NuevoAlumno(Alumno a) {
     this.Invoke("NuevoAlumno", new object[] {
                 a});
 }
 /// <remarks/>
 public void getAlumnoAsync(Alumno a) {
     this.getAlumnoAsync(a, null);
 }
 public Alumno getAlumno(Alumno a) {
     object[] results = this.Invoke("getAlumno", new object[] {
                 a});
     return ((Alumno)(results[0]));
 }
        /// <summary>
        /// INSERTA O ACTUALIZA UN NUEVO USUARIO DEL SISTEMA
        /// </summary>
        /// <param name="update"></param>
        private void Registrar(bool update)
        {
            try
            {
                string result = Validaciones();
                if (String.IsNullOrEmpty(result))
                {
                    //ILogicaUsuario lu = FabricaLogica.getLogicaUsuario();
                    ServiceWebMail sm = new ServiceWebMail();

                    Alumno a;
                    if (update)
                        a = (Alumno)Session["EditarUsuario"];
                    else
                        a = new Alumno();

                    a.APELLIDO = txtApellido.Text;
                    a.CI = Convert.ToInt32(txtDocumento.Text);
                    a.NOMBRE_USUARIO = txtUserName.Text;
                    a.NOMBRE = txtNombre.Text;
                    a.FOTO = Convert.ToString(a.CI) + "." + UCPicture.GetFileNameExtension;
                    a.PASS = txtContraseña.Text;
                    a.ACTIVO = true;

                    //GUARDO LA FOTO EN UNA CARPETA
                    //-----------------------------
                    UCPicture.GuardarFotos(Convert.ToString(a.CI));

                    if (update)
                    {
                        //lu.ModificarAlumno(a);
                        sm.ModificarAlumno(a);
                        lblInfo.Text = "Informacion actualizada";
                        Response.Redirect("~/AdminDocente/ListarAlumnos.aspx", false);
                    }
                    else
                    {
                        //lu.NuevoAlumno(a);
                        sm.NuevoAlumno(a);

                        lblInfo.Text =
                            "Sabelo!!, fuiste registrado. Valida tu usuario y password para ingresar al sistema";
                        ClearForm();
                    }
                    //}
                    //else
                    //{
                    //    lblInfo.Text = "Tipo de usuario a registrar/actualizar no valido";
                    //}
                }
                else
                {
                    lblInfo.Text = result;
                }
            }
            //catch (ErrorUsuarioYaExiste ex)
            //{
            //    lblInfo.Text = "Error: El usuario con documento " + txtDocumento.Text + " o nombre de usuario " + txtUserName.Text + " ya se encuentra registrado.";
            //}
            catch (Exception ex)
            {
                lblInfo.Text = ex.Message;
            }
        }
 /// <remarks/>
 public void ModificarAlumnoAsync(Alumno a) {
     this.ModificarAlumnoAsync(a, null);
 }
 /// <remarks/>
 public void ActualizarStatusAlumnoAsync(Alumno a, bool setActiveStatus, object userState) {
     if ((this.ActualizarStatusAlumnoOperationCompleted == null)) {
         this.ActualizarStatusAlumnoOperationCompleted = new System.Threading.SendOrPostCallback(this.OnActualizarStatusAlumnoOperationCompleted);
     }
     this.InvokeAsync("ActualizarStatusAlumno", new object[] {
                 a,
                 setActiveStatus}, this.ActualizarStatusAlumnoOperationCompleted, userState);
 }
 /// <remarks/>
 public void getInboxFolderAsync(Alumno a, object userState) {
     if ((this.getInboxFolderOperationCompleted == null)) {
         this.getInboxFolderOperationCompleted = new System.Threading.SendOrPostCallback(this.OngetInboxFolderOperationCompleted);
     }
     this.InvokeAsync("getInboxFolder", new object[] {
                 a}, this.getInboxFolderOperationCompleted, userState);
 }
 /// <remarks/>
 public void getInboxFolderAsync(Alumno a) {
     this.getInboxFolderAsync(a, null);
 }
 public Carpeta getInboxFolder(Alumno a) {
     object[] results = this.Invoke("getInboxFolder", new object[] {
                 a});
     return ((Carpeta)(results[0]));
 }
 /// <remarks/>
 public void ListarCarpetasAsync(Alumno a, object userState) {
     if ((this.ListarCarpetasOperationCompleted == null)) {
         this.ListarCarpetasOperationCompleted = new System.Threading.SendOrPostCallback(this.OnListarCarpetasOperationCompleted);
     }
     this.InvokeAsync("ListarCarpetas", new object[] {
                 a}, this.ListarCarpetasOperationCompleted, userState);
 }
 /// <remarks/>
 public void ListarCarpetasAsync(Alumno a) {
     this.ListarCarpetasAsync(a, null);
 }
 public Carpeta[] ListarCarpetas(Alumno a) {
     object[] results = this.Invoke("ListarCarpetas", new object[] {
                 a});
     return ((Carpeta[])(results[0]));
 }
 public void ActualizarStatusAlumno(Alumno a, bool setActiveStatus) {
     this.Invoke("ActualizarStatusAlumno", new object[] {
                 a,
                 setActiveStatus});
 }
 /// <remarks/>
 public void ActualizarStatusAlumnoAsync(Alumno a, bool setActiveStatus) {
     this.ActualizarStatusAlumnoAsync(a, setActiveStatus, null);
 }
 public void AgregarEmail(Email newEmail, Alumno remitente, Alumno destinatario) {
     this.Invoke("AgregarEmail", new object[] {
                 newEmail,
                 remitente,
                 destinatario});
 }
 public void ModificarAlumno(Alumno a) {
     this.Invoke("ModificarAlumno", new object[] {
                 a});
 }
 /// <remarks/>
 public void AgregarEmailAsync(Email newEmail, Alumno remitente, Alumno destinatario) {
     this.AgregarEmailAsync(newEmail, remitente, destinatario, null);
 }
 /// <remarks/>
 public void ModificarAlumnoAsync(Alumno a, object userState) {
     if ((this.ModificarAlumnoOperationCompleted == null)) {
         this.ModificarAlumnoOperationCompleted = new System.Threading.SendOrPostCallback(this.OnModificarAlumnoOperationCompleted);
     }
     this.InvokeAsync("ModificarAlumno", new object[] {
                 a}, this.ModificarAlumnoOperationCompleted, userState);
 }
 /// <remarks/>
 public void AgregarEmailAsync(Email newEmail, Alumno remitente, Alumno destinatario, object userState) {
     if ((this.AgregarEmailOperationCompleted == null)) {
         this.AgregarEmailOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAgregarEmailOperationCompleted);
     }
     this.InvokeAsync("AgregarEmail", new object[] {
                 newEmail,
                 remitente,
                 destinatario}, this.AgregarEmailOperationCompleted, userState);
 }