Exemplo n.º 1
0
        //修改酒店客房信息
        public bool updateHotelRoomInfo(hotelRoom hr, string id /*酒店客房编号*/)
        {
            string sql = "update HotelRoomInfo set RhotelId='" + hr.Hid + "',RtypeId='" + hr.Tid + "',Rnumber=" + hr.Rnumber + ",Rprice=" + hr.Rprice
                         + ",Rremark='" + hr.Rremark + "',RvacantNum=" + hr.RvacantNum + ",RimageUrl='" + hr.RimageUrl + "'  where Rid='" + id + "'";
            int num = DatabaseLink.UpdateData(sql);

            if (num > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemplo n.º 2
0
        //添加酒店客房信息
        public bool addHotelRoomInfo(hotelRoom hr /*酒店客房信息对象*/)
        {
            string sql = "insert into HotelRoomInfo values('" + hr.Rid + "','" + hr.Hid + "','" + hr.Tid + "'," + hr.Rnumber
                         + "," + hr.Rprice + ",'" + hr.Rremark + "'," + hr.RvacantNum + ",'" + hr.RimageUrl + "')";
            int num = DatabaseLink.UpdateData(sql);

            if (num > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }