📄 roomdestinedb.cs
字号:
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using HotelManageDAL;
using HotelManageMDL;
namespace HotelManageDBL
{
public class RoomDestineDB
{
HotelManageDA hda = new HotelManageDA();
RoomDestine rd = new RoomDestine();
DataSet ds = null;
/// <summary>
/// 查找所有的方法
/// </summary>
/// <returns></returns>
public DataSet SelectRoomDes()
{
string selSql = "select * from ListManage";
try
{
ds = hda.Select(selSql);
}
catch { throw; }
if(ds != null)
{
return ds;
}
else
{
return null;
}
}
public DataSet SelectByListID(int id)
{
string selSql = "select * from ListManage where id="+id+"";
try
{
ds = hda.Select(selSql);
if (ds != null)
{
return ds;
}
return null;
}
catch { throw; }
}
/// <summary>
/// 添加预订客房信息的方法
/// </summary>
/// <param name="rd"></param>
/// <returns></returns>
public bool InsertRoomDes(RoomDestine rd)
{
string insertSql = "insert into ListManage values('"+rd.BeginTime
+"','"+rd.EndTime
+"',"+rd.RoomNum
+",'"+rd.Currency
+ "','" + rd.Leaveword
+ "',"+rd.Telephone+")";
try{
bool flag = hda.Exec(insertSql);
if (flag)
{
return true;
}
else
{
return false;
}
}catch{throw;}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -