Example #1
0
 protected void BtnReenviar(object sender, EventArgs e)
 {
     try
     {
         string idIventure = ((ImageButton)sender).CommandArgument;
         FacadeDao.EnviarIventureEmail(Convert.ToInt32(idIventure.Trim()), Session["Logo"]);
         string script = "alert('Se ha enviado el mail correctamente');";
         ClientScript.RegisterStartupScript(this.GetType(), DateTime.Now.ToFileTime().ToString(), script);
     }
     catch
     {
         string script = "alert('Hubo un problema al enviar el mail');";
         ClientScript.RegisterStartupScript(this.GetType(), DateTime.Now.ToFileTime().ToString(), script);
     }
 }
Example #2
0
 protected void btnMail_Click(object sender, EventArgs e)
 {
     Page.Validate();
     if (Page.IsValid)
     {
         if (Grabar() == 1)
         {
             try
             {
                 FacadeDao.EnviarIventureEmail(Convert.ToInt32(txtIdIventure.Text.Trim()), Session["Logo"]);
                 string script = "alert('Se ha enviado el mail correctamente');";
                 ClientScript.RegisterStartupScript(this.GetType(), DateTime.Now.ToFileTime().ToString(), script);
             }
             catch
             {
                 string script = "alert('Hubo un problema al enviar el mail');";
                 ClientScript.RegisterStartupScript(this.GetType(), DateTime.Now.ToFileTime().ToString(), script);
             }
         }
     }
 }