📄 cl_stuland_dal.cs
字号:
using System;
using System.Collections.Generic;
using System.Text;
using Model;
using System.Data;
namespace DAl
{
public class Cl_stuland_DAl
{
public void InsertDataset(Cl_stuland stu)
{
string sqlstr = "intsert into stuland(stuid,password)" +
"values('" + stu.Stuid.ToString() +"','" + stu.Password.ToString() +"')";
Conn MyConn = new Conn();
MyConn.DbConn();
MyConn.Dosql(sqlstr);
MyConn.CloseDB();
}
public bool SelectDataset(Cl_stuland stu)
{
string sqlstr = "select * from stuland where stuid = '" + stu.Stuid +"' and password = '"+ stu.Password +"'";
Conn MyConn = new Conn();
MyConn.DbConn();
DataTable dt = new DataTable();
dt = MyConn.Getdata(sqlstr);
MyConn.CloseDB();
if (dt.Rows.Count > 0)
{
return true;
}
else
{
return false;
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -