// CBase.cs
//
namespace learn.cs
{
using System;
using System.Configuration;
/// <summary>
/// CBase 的摘要说明。
/// </summary>
//----------------------------------基础类CBase-----------------------------------
public class CBase
{
/// <summary>
/// Creates a new instance of CBase
/// </summary>
public int ISDebug =1;
protected string strConnectString;
protected string strLastError;
protected int strRETURN_VALUE;
//构造函数
public CBase()
{
if (System.Web.HttpContext.Current.Application["ConnectString"]!=null)
{
strConnectString=System.Web.HttpContext.Current.Application["ConnectString"].ToString();
}
else
{
strConnectString = ConfigurationSettings.AppSettings["test"];
}
}
public string ConnectionString
{
set
{
if(value !=null)
this.strConnectString=value;
}
get
{
return strConnectString;
}
}
public string LastError
{
get{return strLastError;}
}
public void ErrorLog(string ErrorMessage,string FunctionName )
{
}
public int RETURN_VALUE
{
get{return strRETURN_VALUE;}
set{strRETURN_VALUE=value;}
}
}
//---------------------------------CBase类结束--------------------------------------------------
}