public virtual void EmailAction() { if (ActiveItem == null) { return; } PgMng.Reset(3, 1, Face.Resources.Messages.OPENING_EMAIL_CLIENT, this); MailParams mail = new MailParams(); mail.To = ActiveItem.Email; try { PgMng.Grow(); EMailSender.MailTo(mail); } catch { PgMng.ShowInfoException(moleQule.Face.Resources.Messages.NO_EMAIL_CLIENT); } finally { PgMng.FillUp(); } }
public override void EmailLinkAction() { if (ActiveItem == null) { return; } PgMng.Reset(5, 1, Face.Resources.Messages.RETRIEVING_DATA, this); ClienteInfo cliente = ClienteInfo.Get(ActiveItem.OidCliente, false); PgMng.Grow(); CompanyInfo empresa = CompanyInfo.Get(AppContext.ActiveSchema.Oid); PgMng.Grow(); MailParams mail = new MailParams(); string url = empresa.Url + String.Format(Library.Invoice.ModuleController.GetFacturaWebScript(), ActiveItem.Link); mail.To = cliente.Email; mail.Body = String.Format(Library.Invoice.Resources.Messages.FACTURA_EMAIL_LINK_BODY, url, empresa.Name); mail.Subject = Library.Invoice.Resources.Messages.FACTURA_EMAIL_SUBJECT; try { PgMng.Grow(moleQule.Face.Resources.Messages.OPENING_EMAIL_CLIENT, string.Empty); EMailSender.MailTo(mail); OutputInvoiceInfo item = OutputInvoiceInfo.Get(ActiveOID, true); PgMng.Grow(); if (item.EEstado == EEstado.Abierto) { ChangeStateAction(EEstadoItem.Emitido); } } catch { PgMng.ShowInfoException(moleQule.Face.Resources.Messages.NO_EMAIL_CLIENT); } finally { PgMng.FillUp(); } }
protected void SendMailAction() { PgMng.Reset(3, 1, moleQule.Face.Resources.Messages.OPENING_EMAIL_CLIENT, this); MailParams mail = new MailParams(); mail.To = EntityInfo.Email; try { PgMng.Grow(); EMailSender.MailTo(mail); PgMng.Grow(); } catch { MessageBox.Show(moleQule.Face.Resources.Messages.NO_EMAIL_CLIENT); } finally { PgMng.FillUp(); } }