using Common; using Dao; using System; using System.Data; using System.Text; using System.Web; using System.Web.Profile; using System.Web.SessionState; using System.Web.UI; public partial class TableSpace : Page, IRequiresSessionState { protected void Page_Load(object sender, EventArgs e) { } public string RenderTableSpaceTable() { using (GwUtilityDao gwUtilityDao = new GwUtilityDao()) { StringBuilder stringBuilder = new StringBuilder(); DataTable tableSpaceStatis = gwUtilityDao.GetTableSpaceStatis(); stringBuilder.AppendFormat(" 表空间总大小已使用已使用百分比"); foreach (DataRow row in (InternalDataCollectionBase)tableSpaceStatis.Rows) { DataRowReader dataRowReader = new DataRowReader(row); string str = dataRowReader.GetString("tablespace_name"); if (str == "SMGWDAT" || str == "SMGWLOG") str = "" + str + ""; stringBuilder.AppendFormat("{0}{1}MB{2}MB{3}%", (object)str, (object)dataRowReader.GetInt("total_mb"), (object)dataRowReader.GetString("used_mb"), (object)dataRowReader.GetDecimal("used_pct")); } return stringBuilder.ToString(); } } }