本文来源:网站建设-网站制作|网络营销专家慧云科技-抢滩登陆2009-7-16 15:55:29
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using System.Text.RegularExpressions;
using System.Security.Cryptography;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Collections.Specialized;
using BoyunBase;
///
/// SiteTodo 的摘要说明
///
public static class SiteTodo
{
/*public static bool ReadSetting( UserControl uc, StateBag vs )
{
try {
string pagePath = uc.Page.AppRelativeVirtualPath;
string CtrlId = uc.ID;
if( pagePath == "" || CtrlId == "" ) return false;
PartAccess pa = new PartAccess( uc );
if( !pa.IsReady ) return false;
if( !pa.FillSettingTo( vs ) ) return false;
vs["PagePath"] = pagePath;
vs["CtrlId"] = CtrlId;
return true;
} catch( Exception ex ) {
OutputDebugString( "为部件‘" + uc.ID + "‘读取设置出现异常:" + ex.Message );
return false;
}
}*/
private static NameValueCollection ReadSetting( UserControl uc )
{
try {
string pagePath = uc.Page.AppRelativeVirtualPath;
string CtrlId = uc.ID;
if( pagePath == "" || CtrlId == "" ) return null;
PartAccess pa = new PartAccess( uc );
if( !pa.IsReady ) return null;
NameValueCollection nvCol = pa.FillSettingTo();
if( nvCol == null ) return null;
nvCol["PagePath"] = pagePath;
nvCol["CtrlId"] = CtrlId;
return nvCol;
} catch( Exception ex ) {
Todo.DebugOut( "为部件‘" + uc.ID + "‘读取设置出现异常:" + ex.Message );
return null;
}
}