private void DGridDraft_Bind(int iNewPage) { MailManage mailManage = new MailManage(); DataTable draftMail = mailManage.GetDraftMail(this._strSenderCode); this.DGridDraft.PageSize = Convert.ToInt32(this.Session["mailPageSize"].ToString()); this.DGridDraft.DataSource = draftMail.DefaultView; if (draftMail.Rows.Count > 0 && iNewPage == (draftMail.Rows.Count + this.DGridDraft.PageSize - 1) / this.DGridDraft.PageSize) { this.DGridDraft.CurrentPageIndex = iNewPage - 1; } this.DGridDraft.DataBind(); this.LabMail.Text = "草稿箱邮件<FONT color=\"#ff0000\"><B>" + draftMail.Rows.Count + "</B></FONT>封"; }