跪求c#.net宾馆客房管理系统毕业设计的开题报告
如题,开题报告中包括:一、课题的目的与意义;二、课题发展现状和前景展望;三、课题主要内容和要求;四、研究方法、步骤和措施。跪求跪求,十万火急啊!...
如题,开题报告中包括:一、课题的目的与意义;二、课题发展现状和前景展望;三、课题主要内容和要求;四、研究方法、步骤和措施。跪求跪求,十万火急啊!
展开
4个回答
展开全部
这个内容可以有的。
/// <summary>
/// 得到所有的房间信息
/// </summary>
/// <returns></returns>
public static List<Room> GetAllRooms()
{
List<Room> list = new List<Room>();
string sql = "select * from Room";
DataTable table = DBHelper.GetDataSet(sql);
foreach (DataRow rows in table.Rows)
{
Room room = new Room();
room.RommId = (int)rows["RoomId"];
room.Number = (string)rows["Number"];
room.BedNumber = (int)rows["BedNumber"];
room.Description = (string)rows["Description"];
room.State = (string)rows["State"];
room.GuestNumber = (int)rows["GuestNumber"];
room.RoomType = RoomTypeServer.GetRoomTypeById(Convert.ToInt32(rows["TypeID"]));
list.Add(room);
}
return list;
}
/// <summary>
/// 得到所有的房间通过类型编号
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public static List<Room> GetAllRoomsByTypeId(int id)
{
List<Room> list = new List<Room>();
string sql = "select * from Room where TypeID="+id;
DataTable table = DBHelper.GetDataSet(sql);
foreach (DataRow rows in table.Rows)
{
Room room = new Room();
room.RommId = (int)rows["RoomId"];
room.Number = (string)rows["Number"];
room.BedNumber = (int)rows["BedNumber"];
room.Description = (string)rows["Description"];
room.State = (string)rows["State"];
room.GuestNumber = (int)rows["GuestNumber"];
room.RoomType = RoomTypeServer.GetRoomTypeById(Convert.ToInt32(rows["TypeID"]));
list.Add(room);
}
return list;
}
/// <summary>
/// 通过RoomId查询Room信息
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public static Room GetRoomByRoomId(int id)
{
string sql = "select * from Room where RoomID=@Id";
DataTable table = DBHelper.GetDataSet(sql, new SqlParameter("@Id", id));
Room room = new Room();
foreach (DataRow rows in table.Rows)
{
room.RommId = (int)rows["RoomId"];
room.Number = (string)rows["Number"];
room.BedNumber = (int)rows["BedNumber"];
room.Description = (string)rows["Description"];
room.State = (string)rows["State"];
room.GuestNumber = (int)rows["GuestNumber"];
room.RoomType = RoomTypeServer.GetRoomTypeById(Convert.ToInt32(rows["TypeID"]));
}
return room;
}
/// <summary>
/// 根据房间编号删除房间信息
/// </summary>
/// <param name="id">房间编号</param>
/// <returns>删除结果</returns>
public static void DeleteRoomByRoomId(int id)
{
string sql = "delete from Room where RoomID=@Id";
DBHelper.GetScalar(sql, new SqlParameter("@Id", id));
}
/// <summary>
/// 修改房间信息
/// </summary>
/// <param name="room">实体</param>
public static void UpdateRoom(Room room)
{
string sql = "update dbo.Room set TypeID=@TypeID,State=@State,BedNumber=@BedNumber,GuestNumber=@GuestNumber,Description=@Description where RoomID=@RoomID";
try
{
SqlParameter[] para = new SqlParameter[]
{new SqlParameter("@TypeID", room.RoomType.TypeId),
new SqlParameter("@State", room.State),
new SqlParameter("@BedNumber", room.BedNumber),
new SqlParameter("@GuestNumber", room.GuestNumber),
new SqlParameter("@Description", room.Description),
new SqlParameter("@RoomID", room.RommId)
};
DBHelper.ExecuteCommand(sql, para);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
卓导
2024-11-20 广告
2024-11-20 广告
在设计同系统建设时,北京卓导科技有限公司注重系统的高效性、稳定性与安全性。我们采用先进的设计理念,确保系统架构灵活且易于扩展,满足未来业务增长需求。通过深度分析用户需求,定制化开发功能模块,提升用户体验。同时,我们强化数据加密与备份机制,保...
点击进入详情页
本回答由卓导提供
展开全部
结合SQL SERVER是可以实现的,把详细需要的功能要细说下才可以做
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
这个开题我写过的,有的
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
报告? 具体要什么功能 亲
追问
就是个开题报告,今天之前要交的,我昨天走拼西凑了一篇,交了上去。
追答
嗯好的亲 ~~~
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询