在 MYQQBAL:数据层(代码)
namespace MYQQDAl
{
public class Login
{
public object Login(int num,string pwd)
{
SqlConnection con = new SqlConnection("server=.;database=MYQQ;integrated security=true");
con.Open();
string comm = string.Format("select * from Users where {0}'{1}'", num, pwd);
SqlCommand sqlcomm = new SqlCommand(comm,con);
object res=sqlcomm.ExecuteScalar();
return res;
con.Close();
}
}
}
业务层:添加了应用;也using MYQQBAl
怎么实例化的时候 点不出来 Login
namespace MYQQDAl
{
public class Login
{
public object Login(int num,string pwd)
{
SqlConnection con = new SqlConnection("server=.;database=MYQQ;integrated security=true");
con.Open();
string comm = string.Format("select * from Users where {0}'{1}'", num, pwd);
SqlCommand sqlcomm = new SqlCommand(comm,con);
object res=sqlcomm.ExecuteScalar();
return res;
con.Close();
}
}
}
业务层:添加了应用;也using MYQQBAl
怎么实例化的时候 点不出来 Login
解决方案 »
- 一个很简单的小问题
- 修改后的数据集怎么保存到数据源中?
- 怎样重载运算符==和!=?
- C#调用C写的DLL的相关问题...
- 为什么多态中父类不能访问子类的shadows方法??
- AE开发,怎么求由出发点经过多个点后到达目标点的最短路径
- 如何实现开机自动启动一个Windows服务(服务为手动启动),类似于SqlServer服务控制器上的“当启动OS时自动启动服务”?
- 我提问的关于百度或Google搜索的问题~~
- C#程序打包后怎么启动 ASP.Net Development Server 调试过程中能自己启动 打包之后显示无法连接端口
- 调了webservice后inetinfo,和aspnet_wp中两个东西一直在我的内存中,听了IIS也不行,连注销windows也不行,一定杨重启才行,有什么办法
- 新手有疑问,请进来判断一下~
- 如何计算字符串“2008-01-01”到“2008-01-20”之间的天数差
你类名 修饰符和方法都是Public 没道理点不出来的
return res;
con.Close(); 这两句 conClose()应该放在 return 一句前面好点。虽然编译器不会报错。但肯定会有警告!