protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { LoadStrings(); if (!string.IsNullOrEmpty(Page.Request.Params["uid"])) { currentFolder = Message.eFolder.Inbox; } else { LoadMessages(); // btnDelete.Attributes.Add("onclick", // String.Format("javascript: return confirm('{0}')", // Lang.Trans("Do you really want to delete selected messages?"))); } } }
private void lnkTrash_Click(object sender, EventArgs e) { pnlMailBox.Visible = true; pnlReceivedEcards.Visible = false; if (sender != null) gridMessages.CurrentPageIndex = 0; currentFolder = Message.eFolder.Trash; LargeBoxStart1.Title = Lang.Trans("Trash"); Results.Messages = Message.Search(0, null, Message.eFolder.None, CurrentUserSession.Username, Message.eFolder.Trash, 0, true, true, false, null); CurrentPage = 1; bindMessages(); }
private void scriptManager_Navigate(object sender, HistoryEventArgs e) { if (!pnlMailBox.Visible) return; int historyPage = 0; try { historyPage = Convert.ToInt32(e.State["page"] ?? "1"); } catch (FormatException) { } if (historyPage < 0 || historyPage > Results.GetTotalPages(10)) historyPage = 0; updateHistory = false; CurrentPage = historyPage; if (e.State["currentFolder"] != null) currentFolder = (Message.eFolder)Convert.ToInt32(e.State["currentFolder"]); bindMessages(); }
protected void Page_Load(object sender, EventArgs e) { lblError.Text = ""; permission = CurrentUserSession.CanReadEmail(); if (!Page.IsPostBack) { LoadStrings(); if (Page.Request.Params["sel"] == "recec") lnkReceivedEcards_Click(null, null); else if (Page.Request.Params["sel"] == "sentec") lnkSentEcards_Click(null, null); else if (!string.IsNullOrEmpty(Page.Request.Params["uid"])) { currentFolder = Message.eFolder.Inbox; txtSearchMail.Text = Page.Request.Params["uid"]; pnlReceivedEcards.Visible = false; btnFilter_Click(null, null); } else { lnkInbox_Click(null, null); btnDelete.Attributes.Add("onclick", String.Format("javascript: return confirm('{0}')", Lang.Trans("Do you really want to delete selected messages?"))); } } ScriptManager scriptManager = ScriptManager.GetCurrent(Page); if (scriptManager != null) scriptManager.Navigate += scriptManager_Navigate; }