📄 class1.cs
字号:
using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Model;
using DAL;
using IDal;
namespace BLL
{
public class RoomOperation
{
public static List<Room> GetRooms()
{
IDAL dal = DBFactory.GetDB();
DataSet ds = dal.SelectSQL("select id,name from room");
List<Room> rooms = new List<Room>();
foreach (DataRow row in ds.Tables[0].Rows)
{
Room r = new Room();
r.RoomID = (int)row["id"];
r.RoomName = row["name"].ToString();
rooms.Add(r);
}
return rooms;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -