Beispiel #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this._strSenderCode = this.Session["yhdm"].ToString();
     if (!base.IsPostBack)
     {
         int        num        = 0;
         float      num2       = 0f;
         MailManage mailManage = new MailManage();
         TableRow   tableRow   = new TableRow();
         TableCell  tableCell  = new TableCell();
         tableCell.Text            = "<A href=\"newmail.aspx\">收件箱</A>";
         tableCell.HorizontalAlign = HorizontalAlign.Center;
         tableRow.Cells.Add(tableCell);
         tableCell = new TableCell();
         int num3 = mailManage.GetInMailNumber(this._strSenderCode);
         num                      += num3;
         tableCell.Text            = num3.ToString();
         tableCell.HorizontalAlign = HorizontalAlign.Right;
         tableRow.Cells.Add(tableCell);
         tableCell = new TableCell();
         float num4 = (float)mailManage.GetInMailSize(this._strSenderCode);
         num4                     /= 1048576f;
         num2                     += num4;
         tableCell.Text            = num4.ToString("0.00");
         tableCell.HorizontalAlign = HorizontalAlign.Right;
         tableRow.Cells.Add(tableCell);
         tableRow.Height = Unit.Pixel(20);
         this.TabBox.Rows.Add(tableRow);
         tableRow                  = new TableRow();
         tableCell                 = new TableCell();
         tableCell.Text            = "<A href=\"outbox.aspx\">发件箱</A>";
         tableCell.HorizontalAlign = HorizontalAlign.Center;
         tableRow.Cells.Add(tableCell);
         tableCell                 = new TableCell();
         num3                      = mailManage.GetOutMailNumber(this._strSenderCode);
         num                      += num3;
         tableCell.Text            = num3.ToString();
         tableCell.HorizontalAlign = HorizontalAlign.Right;
         tableRow.Cells.Add(tableCell);
         tableCell                 = new TableCell();
         num4                      = (float)mailManage.GetOutMailSize(this._strSenderCode);
         num4                     /= 1048576f;
         num2                     += num4;
         tableCell.Text            = num4.ToString("0.00");
         tableCell.HorizontalAlign = HorizontalAlign.Right;
         tableRow.Cells.Add(tableCell);
         tableRow.Height = Unit.Pixel(20);
         this.TabBox.Rows.Add(tableRow);
         tableRow                  = new TableRow();
         tableCell                 = new TableCell();
         tableCell.Text            = "<A href=\"draftbox.aspx\">草稿箱</A>";
         tableCell.HorizontalAlign = HorizontalAlign.Center;
         tableRow.Cells.Add(tableCell);
         tableCell                 = new TableCell();
         num3                      = mailManage.GetDraftMailNumber(this._strSenderCode);
         num                      += num3;
         tableCell.Text            = num3.ToString();
         tableCell.HorizontalAlign = HorizontalAlign.Right;
         tableRow.Cells.Add(tableCell);
         tableCell                 = new TableCell();
         num4                      = (float)mailManage.GetDraftMailSize(this._strSenderCode);
         num4                     /= 1048576f;
         num2                     += num4;
         tableCell.Text            = num4.ToString("0.00");
         tableCell.HorizontalAlign = HorizontalAlign.Right;
         tableRow.Cells.Add(tableCell);
         tableRow.Height = Unit.Pixel(20);
         this.TabBox.Rows.Add(tableRow);
         tableRow                  = new TableRow();
         tableCell                 = new TableCell();
         tableCell.Text            = "<A href=\"trashbox.aspx\">垃圾箱</A>";
         tableCell.HorizontalAlign = HorizontalAlign.Center;
         tableRow.Cells.Add(tableCell);
         tableCell                 = new TableCell();
         num3                      = mailManage.GetTrashMailNumber(this._strSenderCode);
         num                      += num3;
         tableCell.Text            = num3.ToString();
         tableCell.HorizontalAlign = HorizontalAlign.Right;
         tableRow.Cells.Add(tableCell);
         tableCell                 = new TableCell();
         num4                      = (float)mailManage.GetTrashMailSize(this._strSenderCode);
         num4                     /= 1048576f;
         num2                     += num4;
         tableCell.Text            = num4.ToString("0.00");
         tableCell.HorizontalAlign = HorizontalAlign.Right;
         tableRow.Cells.Add(tableCell);
         tableRow.Height = Unit.Pixel(20);
         this.TabBox.Rows.Add(tableRow);
         tableRow                  = new TableRow();
         tableCell                 = new TableCell();
         tableCell.Text            = "当前状态";
         tableCell.HorizontalAlign = HorizontalAlign.Center;
         tableRow.Cells.Add(tableCell);
         tableCell                 = new TableCell();
         tableCell.Text            = num.ToString();
         tableCell.HorizontalAlign = HorizontalAlign.Right;
         tableRow.Cells.Add(tableCell);
         tableCell                 = new TableCell();
         tableCell.Text            = num4.ToString("0.00");
         tableCell.HorizontalAlign = HorizontalAlign.Right;
         tableRow.Cells.Add(tableCell);
         tableRow.Height = Unit.Pixel(20);
         this.TabBox.Rows.Add(tableRow);
         DataTable userSet = mailManage.GetUserSet(this._strSenderCode);
         if (userSet.Rows.Count > 0)
         {
             num3                      = int.Parse(userSet.Rows[0]["i_MailNumber"].ToString());
             num4                      = (float)int.Parse(userSet.Rows[0]["i_DiskSpace"].ToString());
             num4                     /= 1048576f;
             tableRow                  = new TableRow();
             tableCell                 = new TableCell();
             tableCell.Text            = "系统设置";
             tableCell.HorizontalAlign = HorizontalAlign.Center;
             tableRow.Cells.Add(tableCell);
             tableCell                 = new TableCell();
             tableCell.Text            = num3.ToString();
             tableCell.HorizontalAlign = HorizontalAlign.Right;
             tableRow.Cells.Add(tableCell);
             tableCell                 = new TableCell();
             tableCell.Text            = num4.ToString("0.00");
             tableCell.HorizontalAlign = HorizontalAlign.Right;
             tableRow.Cells.Add(tableCell);
             this.TabBox.Rows.Add(tableRow);
             tableRow             = new TableRow();
             tableCell            = new TableCell();
             tableCell.Text       = this.ShowWarn();
             tableCell.ColumnSpan = 3;
             tableRow.Cells.Add(tableCell);
             tableRow.Height = Unit.Pixel(20);
             this.TabBox.Rows.Add(tableRow);
         }
     }
 }