protected void Inbox1_OnRowSelected(object sender, InBox.RowSelectedEventArgs e) { if (!WebMailClientManager.AccountIsValid()) { AccountInvalidated(); } if (!e.UId.IsNullOrWhiteSpace()) { if (!(WebMailClientManager.CurrentMailExist() && e.UId.Trim() == WebMailClientManager.CurrentMailGet().Uid)) { // string folder = e.CurrentFolder.Parse(0); // MailFolder mailFolder = (MailFolder)folder; WebMailClientManager.CurrentFolderSet(e.CurrentFolder); WebMailClientManager.ParentFolderSet(e.ParentFolder); if (e.Dimension < int.Parse(ConfigurationManager.AppSettings["MaxMemoryDimensionForMailViewer"])) { MailViewer1.Initialize(e.UId, e.CurrentRating, e.CurrentFolder, e.ParentFolder); } else { Message msg = new Message(); MailViewer1.hfUIDMailValue = msg.Uid = e.UId; msg.Size = e.Dimension; WebMailClientManager.CurrentMailSet(msg); MailViewer1.Initialize(e.UId, e.CurrentRating, WebMailClientManager.CurrentFolderGet(), WebMailClientManager.ParentFolderGet()); pnlMail.Update(); } } } }
protected void MailViewer1_OnRequireAction(object sender, MailActionEventArgs e) { switch (e.Action) { case MailActions.ACQUIRE: throw new NotImplementedException(); case MailActions.REPLY_ALL: throw new NotImplementedException(); case MailActions.FORWARD: case MailActions.REPLY_TO: case MailActions.RE_SEND: ucSendMail.Visible = true; if (WebMailClientManager.AccountIsValid()) { ucSendMail.LoginVisibile(false); } ucSendMail.Initialize(e.Action); break; case MailActions.SEND: ucSendMail.Visible = true; if (WebMailClientManager.AccountIsValid()) { ucSendMail.LoginVisibile(false); } ucSendMail.Initialize(MailActions.SEND, false); break; } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { if (WebMailClientManager.AccountIsValid()) { BindDataViews(false); } } }
protected void Page_PreRender(object sender, EventArgs e) { if (WebMailClientManager.AccountIsValid()) { MailUser m = WebMailClientManager.getAccount(); Account = m.Casella; //if (m.IsPec) Pec = true; Json = createJson(); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { if (WebMailClientManager.AccountIsValid()) { MailComposer1.Initialize(SendType, this.SottoTitolo); } } }
protected void Page_PreRender(object sender, EventArgs e) { if (WebMailClientManager.AccountIsValid()) { MailUser m = WebMailClientManager.getAccount(); hfCurrentFolder.Value = "1"; hfPFolder.Value = "I"; JsonCartella = createJsonCartella(m.IsManaged); JsonStatus = createJsonStatus(); } }
public void Initialize() { if (WebMailClientManager.AccountIsValid()) { this.Visible = true; Initialize(false); } else { this.Visible = false; } }
//protected void ucPaging_Init(object sender, EventArgs e) //{ // this.ucPaging = sender as UCPaging; //} protected void BindDataViews(bool refresh) { if (WebMailClientManager.AccountIsValid()) { MailUser user = WebMailClientManager.getAccount(); this.Visible = true; } else { this.Visible = false; } }
protected void Initialize(bool refresh) { if (WebMailClientManager.AccountIsValid()) { this.Visible = WebMailClientManager.AccountIsValid(); if (this.Visible) { BindDataViews(true); } } else { this.Visible = false; } }
private void calcVisibility() { if (WebMailClientManager.AccountIsValid()) { this.CurrentMail = WebMailClientManager.getAccount().Casella; IbLogOff.Visible = true; panLogin.Visible = false; } else { this.CurrentMail = "Login"; IbLogOff.Visible = false; panLogin.Visible = true; ManagedAccount.Checked = true; } }
protected void mailTreeViewer_MailSelected(object sender, EventArgs e) { if (!WebMailClientManager.AccountIsValid()) { AccountInvalidated(); } string idMail = MailViewer1.hfIdMailValue; if (!idMail.IsNullOrWhiteSpace()) { long id = idMail.Parse(-1); if (id == -1) { this.info.AddMessage("Impossibile caricare il messaggio", Com.Delta.Messaging.MapperMessages.LivelloMessaggio.ERROR); } else { MailViewer1.Initialize(); } } }
protected void Page_Load(object sender, EventArgs e) { MailUser mailuser = WebMailClientManager.getAccount(); if (!(WebMailClientManager.AccountIsValid())) { (this.Page as BasePage).info.AddMessage("Account non più valido. Ripetere la selezione della casella di posta", Com.Delta.Messaging.MapperMessages.LivelloMessaggio.INFO); } if (Page.IsPostBack) { string test = HidHtml.Value; if (!(string.IsNullOrEmpty(test))) { SessionManager <string> .set(SessionKeys.TESTO_MAIL, test); } } else { SessionManager <string> .del(SessionKeys.TESTO_MAIL); } }
// Testare bene todo modificare mailmove protected void MailViewer1_OnRequireAction(object sender, MailActionEventArgs action, string parentFolder) { switch (action.Action) { case MailActions.ACQUIRE: if (WebMailClientManager.CurrentMailExist() && WebMailClientManager.AccountIsValid()) { MailUser muser = WebMailClientManager.getAccount(); Message msg = WebMailClientManager.CurrentMailGet(); while (msg.Container != null) { msg = msg.Container; WebMailClientManager.CurrentMailRemove(); } if (!WebMailClientManager.CurrentMailExist()) { WebMailClientManager.CurrentMailSet(msg); } if (!String.IsNullOrEmpty(msg.HeaderFields["x-trasporto"]) && msg.HeaderFields["x-trasporto"].Equals("posta-certificata", StringComparison.InvariantCultureIgnoreCase)) { string uid = msg.Uid; int id = msg.Id; msg = msg.SubMessages[0]; msg.Uid = uid; msg.Id = id; } try { //TODO:ACQUISIOZNE MAIL INIT BEAKPONT - ALBERTO if (msg.Uid == null) { msg.Uid = MailViewer1.hfUIDMailValue; } //Richiesta req = FaxPec.ServiceContracts.ServiceLocator.GetServiceFactory().RichiestaService.ProcessMail(muser, msg, parentFolder); //if (req != null) //{ // List<string> uids = new List<string>(); // uids.Add(msg.Uid); // string utente = Com.Delta.Anag.Security.MySecurityProvider.CurrentPrincipalName; // ServiceLocator.GetServiceFactory().getMailServerFacade(muser).MailMove(uids, MailStatus.LETTA, "1", utente, parentFolder); // FaxPec.Caching.Session.SessionManager<Richiesta>.set(FaxPec.Caching.Session.SessionKeys.FAXPEC_RICHIESTA, req); //} } catch (ManagedException bex) { if (bex.GetType() != typeof(ManagedException)) { ManagedException mEx = new ManagedException(bex.Message, "ERR_G043", string.Empty, string.Empty, bex); ErrorLogInfo er = new ErrorLogInfo(mEx); log.Error(er); } ((BasePage)Page).info.AddMessage(bex, Com.Delta.Messaging.MapperMessages.LivelloMessaggio.ERROR); return; } // Response.Redirect("~/pages/Istruz/IstruzioneRichiesta.aspx?m=m"); } break; case MailActions.FORWARD: case MailActions.REPLY_TO: case MailActions.RE_SEND: ucSendMail.Visible = true; if (WebMailClientManager.AccountIsValid()) { ucSendMail.LoginVisibile(false); } ucSendMail.Initialize(action.Action); break; case MailActions.SEND: throw new NotImplementedException(); } }