コード例 #1
0
        protected void ddlFolders_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                //ILogicaEmails le = FabricaLogica.getLogicaEmails();
                ServiceWebMail sm = new ServiceWebMail();

                Carpeta current = (Carpeta)Session["Carpeta"];
                if (current != null)
                {
                    //le.MoverEmail(Convert.ToInt32(Session["EmailId"]), current.NUMERO_CARPETA, Convert.ToInt32(ddlFolders.SelectedValue));

                    refServiceWebMail.Email email = new refServiceWebMail.Email();
                    email.NUMERO_EMAIL = Convert.ToInt32(Session["EmailId"]);
                    Carpeta cdestino = new Carpeta {NUMERO_CARPETA = Convert.ToInt32(ddlFolders.SelectedValue)};
                    //le.MoverEmail(email, current, cdestino);
                    sm.MoverEmail(email, current, cdestino);
                    lblInfo.Text = "El email se movio a la carpeta " + ddlFolders.SelectedItem.Text;
                }

            }
            catch (Exception ex)
            {
                lblInfo.Text = ex.Message;
            }
        }
コード例 #2
0
        protected void btnNuevaCarpeta_Click(object sender, EventArgs e)
        {
            try
            {
                if (!String.IsNullOrEmpty(txtNuevaCarpetaNombre.Text))
                {
                    //ILogicaCarpetas lc = FabricaLogica.getLogicaCarpetas();
                    ServiceWebMail sm = new ServiceWebMail();

                    Carpeta c = new Carpeta();
                    SiteAlumno master = (SiteAlumno)Master;
                    c.NOMBRE_CARPETA = txtNuevaCarpetaNombre.Text;
                    c.USUARIO = master.USUARIO_LOGUEADO;
                    //lc.AgregarCarpeta(c);
                    sm.AgregarCarpeta(c);
                    RefreshFolders();
                    lblInfo.Text = "Carpeta creada";
                    txtNuevaCarpetaNombre.Text = "";
                }
                else
                {
                    lblInfo.Text = "Ingrese un nombre de carpeta";
                }
            }
            catch (Exception ex)
            {
                lblInfo.Text = ex.Message;
            }
        }
コード例 #3
0
        protected void FolderListRepeater_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            try
            {
                //ILogicaCarpetas lc = FabricaLogica.getLogicaCarpetas();
                ServiceWebMail sm = new ServiceWebMail();

                if (e.CommandName.ToUpper() == "CONSULTAR")
                {
                    //TRAEMOS TODOS LOS EMAILS DE ESA CARPETA
                    //---------------------------------------
                    //Carpeta currentFolder = lc.GetCarpeta(Convert.ToInt32(e.CommandArgument),((Alumno) Session["Usuario"]).CI);
                    Carpeta c = new Carpeta
                                    {
                                        NUMERO_CARPETA = Convert.ToInt32(e.CommandArgument),
                                        USUARIO = ((Alumno) Session["Usuario"])
                                    };
                    //Carpeta currentFolder = lc.GetCarpeta(c);
                    Carpeta currentFolder = sm.GetCarpeta(c);

                    ConsultaCarpeta.CARPETA = currentFolder;
                }
                else if (e.CommandName.ToUpper() == "ELIMINAR")
                {

                    //ELIMINAMOS LA CARPETA SELECCIONADA
                    //----------------------------------
                    Carpeta c = new Carpeta();
                    c.NUMERO_CARPETA = Convert.ToInt32(e.CommandArgument);
                    //lc.EliminarCarpeta(Convert.ToInt32(e.CommandArgument));
                    //lc.EliminarCarpeta(c);
                    sm.EliminarCarpeta(c);

                    lblInfo.Text = "Carpeta Eliminada";
                    RefreshFolders();
                }
            }
            catch (Exception ex)
            {
                lblInfo.Text = ex.Message;
            }
        }
コード例 #4
0
 public void EliminarEmail(Email e, Carpeta carpeta) {
     this.Invoke("EliminarEmail", new object[] {
                 e,
                 carpeta});
 }
コード例 #5
0
 /// <remarks/>
 public void ListarEmailAsync(Carpeta c, object userState) {
     if ((this.ListarEmailOperationCompleted == null)) {
         this.ListarEmailOperationCompleted = new System.Threading.SendOrPostCallback(this.OnListarEmailOperationCompleted);
     }
     this.InvokeAsync("ListarEmail", new object[] {
                 c}, this.ListarEmailOperationCompleted, userState);
 }
コード例 #6
0
 /// <remarks/>
 public void ListarEmailAsync(Carpeta c) {
     this.ListarEmailAsync(c, null);
 }
コード例 #7
0
 /// <remarks/>
 public void MoverEmailAsync(Email e, Carpeta carpetaActual, Carpeta carpetaDestino) {
     this.MoverEmailAsync(e, carpetaActual, carpetaDestino, null);
 }
コード例 #8
0
 /// <remarks/>
 public void MarcarEmailLeidoAsync(Email e, Carpeta c, object userState) {
     if ((this.MarcarEmailLeidoOperationCompleted == null)) {
         this.MarcarEmailLeidoOperationCompleted = new System.Threading.SendOrPostCallback(this.OnMarcarEmailLeidoOperationCompleted);
     }
     this.InvokeAsync("MarcarEmailLeido", new object[] {
                 e,
                 c}, this.MarcarEmailLeidoOperationCompleted, userState);
 }
コード例 #9
0
 public void MarcarEmailLeido(Email e, Carpeta c) {
     this.Invoke("MarcarEmailLeido", new object[] {
                 e,
                 c});
 }
コード例 #10
0
 /// <remarks/>
 public void IsCarpetaSistemaAsync(Carpeta c) {
     this.IsCarpetaSistemaAsync(c, null);
 }
コード例 #11
0
 public bool IsCarpetaSistema(Carpeta c) {
     object[] results = this.Invoke("IsCarpetaSistema", new object[] {
                 c});
     return ((bool)(results[0]));
 }
コード例 #12
0
 /// <remarks/>
 public void EliminarCarpetaAsync(Carpeta c) {
     this.EliminarCarpetaAsync(c, null);
 }
コード例 #13
0
 public void EliminarCarpeta(Carpeta c) {
     this.Invoke("EliminarCarpeta", new object[] {
                 c});
 }
コード例 #14
0
 /// <remarks/>
 public void AgregarCarpetaAsync(Carpeta c) {
     this.AgregarCarpetaAsync(c, null);
 }
コード例 #15
0
 public void AgregarCarpeta(Carpeta c) {
     this.Invoke("AgregarCarpeta", new object[] {
                 c});
 }
コード例 #16
0
 /// <remarks/>
 public void EliminarEmailAsync(Email e, Carpeta carpeta) {
     this.EliminarEmailAsync(e, carpeta, null);
 }
コード例 #17
0
 /// <remarks/>
 public void EliminarEmailAsync(Email e, Carpeta carpeta, object userState) {
     if ((this.EliminarEmailOperationCompleted == null)) {
         this.EliminarEmailOperationCompleted = new System.Threading.SendOrPostCallback(this.OnEliminarEmailOperationCompleted);
     }
     this.InvokeAsync("EliminarEmail", new object[] {
                 e,
                 carpeta}, this.EliminarEmailOperationCompleted, userState);
 }
コード例 #18
0
 public Carpeta GetCarpeta(Carpeta c) {
     object[] results = this.Invoke("GetCarpeta", new object[] {
                 c});
     return ((Carpeta)(results[0]));
 }
コード例 #19
0
 /// <remarks/>
 public void MarcarEmailLeidoAsync(Email e, Carpeta c) {
     this.MarcarEmailLeidoAsync(e, c, null);
 }
コード例 #20
0
 /// <remarks/>
 public void GetCarpetaAsync(Carpeta c) {
     this.GetCarpetaAsync(c, null);
 }
コード例 #21
0
 public void MoverEmail(Email e, Carpeta carpetaActual, Carpeta carpetaDestino) {
     this.Invoke("MoverEmail", new object[] {
                 e,
                 carpetaActual,
                 carpetaDestino});
 }
コード例 #22
0
 /// <remarks/>
 public void GetCarpetaAsync(Carpeta c, object userState) {
     if ((this.GetCarpetaOperationCompleted == null)) {
         this.GetCarpetaOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetCarpetaOperationCompleted);
     }
     this.InvokeAsync("GetCarpeta", new object[] {
                 c}, this.GetCarpetaOperationCompleted, userState);
 }
コード例 #23
0
 /// <remarks/>
 public void MoverEmailAsync(Email e, Carpeta carpetaActual, Carpeta carpetaDestino, object userState) {
     if ((this.MoverEmailOperationCompleted == null)) {
         this.MoverEmailOperationCompleted = new System.Threading.SendOrPostCallback(this.OnMoverEmailOperationCompleted);
     }
     this.InvokeAsync("MoverEmail", new object[] {
                 e,
                 carpetaActual,
                 carpetaDestino}, this.MoverEmailOperationCompleted, userState);
 }
コード例 #24
0
 public Email[] ListarEmail(Carpeta c) {
     object[] results = this.Invoke("ListarEmail", new object[] {
                 c});
     return ((Email[])(results[0]));
 }