用vs编译网站报错:找不到类型或命名空间名称“DataBase”(是否缺少 using 指令或程序集引用?)怎么回事?
usingSystem;usingSystem.Configuration;usingSystem.Data;usingSystem.Web;usingSystem.We...
using System;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
/// <summary>
/// AdminOper 的摘要说明
/// </summary>
public class AdminOper
{
public AdminOper()
{
//
// TODO: 在此处添加构造函数逻辑
//
}
//取当前用户名
public static string getCurrUserName()
{
string retValue = "";
if (HttpContext.Current.Session["name"] != null)
{
retValue = HttpContext.Current.Session["name"].ToString();
}
return retValue;
}
//取当前用户机构
public static string getCurrUsercom()
{
string retValue = "";
if (HttpContext.Current.Session["com"] != null)
{
retValue = HttpContext.Current.Session["com"].ToString();
}
return retValue;
}
//查看用户名是否已经存在
public static bool checkUsercodeIfEnable(string usercode)
{
string sqlStr = "select count(*) from dx_usertab where [usercode]='"+usercode+"'";
DataBase db = new DataBase();
if (db.GetRecordCount(sqlStr) > 0)
{
return false;
}
else
{
return true;
}
}
} 展开
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
/// <summary>
/// AdminOper 的摘要说明
/// </summary>
public class AdminOper
{
public AdminOper()
{
//
// TODO: 在此处添加构造函数逻辑
//
}
//取当前用户名
public static string getCurrUserName()
{
string retValue = "";
if (HttpContext.Current.Session["name"] != null)
{
retValue = HttpContext.Current.Session["name"].ToString();
}
return retValue;
}
//取当前用户机构
public static string getCurrUsercom()
{
string retValue = "";
if (HttpContext.Current.Session["com"] != null)
{
retValue = HttpContext.Current.Session["com"].ToString();
}
return retValue;
}
//查看用户名是否已经存在
public static bool checkUsercodeIfEnable(string usercode)
{
string sqlStr = "select count(*) from dx_usertab where [usercode]='"+usercode+"'";
DataBase db = new DataBase();
if (db.GetRecordCount(sqlStr) > 0)
{
return false;
}
else
{
return true;
}
}
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询