public string MailRemind(M_UserInfo mu)
        {
            string    maxSize = "", usedSize = "", surSize = "";
            float     percent = 0;
            DataTable dt      = msgBll.SelMyMail(mu.UserID, 4);

            usedSize = GetFileSize(dt).ToString("0.0");
            if (mu.MailSize == -1)
            {
                maxSize = "无限制";
                surSize = "无限制";
                percent = 0;
            }
            else if (mu.MailSize == 0)
            {
                maxSize = OAConfig.MailSize.ToString();
                surSize = CheckMailSize(mu).ToString();
                percent = (float.Parse(usedSize) / float.Parse(maxSize)) * 100;
            }
            else
            {
                maxSize = mu.MailSize.ToString();
                surSize = CheckMailSize(mu).ToString();
                percent = (float.Parse(usedSize) / float.Parse(maxSize)) * 100;
            }
            return(string.Format("你有{0}M空间,已用{1}M,尚余{2}M", maxSize, usedSize, surSize));
        }
        private void DataBind(string key = "")
        {
            DataTable dt = new DataTable();

            dt = bll.SelMyMail(buser.GetLogin().UserID, 3);
            if (!string.IsNullOrEmpty(key.Trim()))
            {
                dt.DefaultView.RowFilter = "Title Like '%" + key + "%'";
            }
            EGV.DataSource = dt;
            EGV.DataBind();
            Session["UserDT"] = null;
        }
Esempio n. 3
0
        private new void DataBind()
        {
            DataTable dt = new DataTable();

            dt = msgBll.SelMyMail(buser.GetLogin().UserID);
            if (!string.IsNullOrEmpty(SearchKey))
            {
                dt.DefaultView.RowFilter = "Title Like '%" + SearchKey + "%'";
            }
            EGV.DataSource = dt;
            EGV.DataBind();
            Session["UserDT"] = null;
        }
 private void MyBind()
 {
     M_UserInfo mu = buser.GetLogin();
     {
         DataTable dt = mailBll.Sel(10, mu.UserID, 0, 1, "", "");
         Rece_RPT.DataSource = dt;
         Rece_RPT.DataBind();
         Rece_Empty.Visible = dt.Rows.Count < 1;
     }
     {
         DataTable dt = mailBll.Sel(10, mu.UserID, 1, 1, "", "");
         Send_RPT.DataSource = dt;
         Send_RPT.DataBind();
         Send_Empty.Visible = dt.Rows.Count < 1;
     }
     {
         DataTable dt = msgBll.SelMyMail(mu.UserID);
         SiteMail_RPT.DataSource = dt;
         SiteMail_RPT.DataBind();
         SiteMail_Empty.Visible = dt.Rows.Count < 1;
     }
 }