Пример #1
0
        /// <summary>
        /// 为房间表插入一行数据并返回,需要提供房间对象
        /// </summary>
        /// <param name="room">插入的房间信息</param>
        /// <returns></returns>
        public DataTable RoomInsert(RoomSchedules room)
        {
            DataRow dr = HotelData.Data.Tables["RoomSchedules"].NewRow();

            dr["RoomNumber"] = room.RoomNumber;
            dr["Floor"]      = room.Floor;
            dr["RoomType"]   = room.RoomType.No;
            dr["RoomStatus"] = room.RoomStatus.No;

            HotelData.Data.Tables["RoomSchedules"].Rows.Add(dr);
            HotelData.UploadData();

            return(HotelData.Data.Tables["RoomSchedules"]);
        }
Пример #2
0
 /// <summary>
 /// 数据上传
 /// </summary>
 public void UploadData()
 {
     HotelData.UploadData();
 }