📄 roledal.cs
字号:
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using BLL;
using BLL.interfaces;
using Model;
namespace DAL
{
public class RoleDal
{
public List<UserRoles> sel()
{
string sqlStr = "select * from userroles";
List<UserRoles> list = new List<UserRoles>();
using(SqlDataReader read=DBHelp.Sel(sqlStr))
{
while(read.Read())
{
UserRoles role = new UserRoles();
role.Id=int.Parse(read["id"].ToString());
role.Name = read["name"].ToString();
list.Add(role);
}
return list;
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -