Пример #1
0
        //注册,添加登录信息
        public bool addLoginInfo(loginInfo g)
        {
            string sql = "insert into LoginInfo values('" + g.Lid + "','" + g.Laccount + "','" + g.Lpassword + "')";
            int    num = DatabaseLink.UpdateData(sql);

            if (num > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Пример #2
0
        //删除酒店信息
        public bool deleteHotelInfo(string id /*酒店编号*/)
        {
            string sql = "delete from HotelInfo where Hid='" + id + "'";
            int    num = DatabaseLink.UpdateData(sql);

            if (num > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Пример #3
0
        //修改账号绑定的手机号
        public bool updateLoginAccount(string newTelephone /*新手机号*/, string id /*身份证号*/)
        {
            string sql = "update LoginInfo set Laccount='" + newTelephone + "' where Lid='" + id + "'";
            int    num = DatabaseLink.UpdateData(sql);

            if (num > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Пример #4
0
        //添加个人信息
        public bool addUserInfo(userInfo s /*个人信息对象*/)
        {
            string sql = "insert into UserInfo values('" + s.Uid + "','" + s.Uname + "','" + s.Usex + "','" + s.Ubirthday + "','" + s.Uemail + "')";
            int    num = DatabaseLink.UpdateData(sql);

            if (num > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Пример #5
0
        //修改个人基本信息
        public bool updateUserInfo(userInfo s, string id /*根据登录名查询的身份证号*/)
        {
            string sql = "update UserInfo set Uname='" + s.Uname + "',Usex='" + s.Usex + "',Ubirthday='" + s.Ubirthday + "',Uemail='" + s.Uemail + "' where Uid='" + id + "'";
            int    num = DatabaseLink.UpdateData(sql);

            if (num > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Пример #6
0
        //删除客房类型信息
        public bool deleteRoomType(string id /*客房类型编号*/)
        {
            string sql = "delete from RoomType where Tid='" + id + "'";
            int    num = DatabaseLink.UpdateData(sql);

            if (num > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Пример #7
0
        //修改密码
        public bool updatePassword(string newPassword /*新密码*/, string id /*身份证号*/)
        {
            string sql = "update LoginInfo set Lpassword='******' where Lid='" + id + "'";
            int    num = DatabaseLink.UpdateData(sql);

            if (num > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Пример #8
0
        //修改空房数量
        public bool updateVacantNum(int vacantNum /*当前空房数量*/, string id /*酒店客房编号*/)
        {
            string sql = "update HotelRoomInfo set RvacantNum=" + vacantNum + "  where Rid='" + id + "'";
            int    num = DatabaseLink.UpdateData(sql);

            if (num > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Пример #9
0
        //添加酒店信息
        public bool addHotelInfo(hotelInfo h /*酒店信息对象*/)
        {
            string sql = "insert into HotelInfo values('" + h.Hid + "','" + h.Hname + "','" + h.Hprovince + "','" + h.Haddress
                         + "'," + h.Hprice + ",'" + h.Hcontact + "','" + h.Hintroduce + "','" + h.HimageUrl + "')";
            int num = DatabaseLink.UpdateData(sql);

            if (num > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Пример #10
0
        //添加个人订单
        public bool addOrderInfo(orderInfo d /*个人订单对象*/)
        {
            string sql = "insert into UserOrderInfo values('" + d.Oid + "','" + d.OorderDate + "'," + d.Uid + ",'" + d.Hid + "','"
                         + d.Tid + "','" + d.Onumber + "','" + d.OcheckInDate + "','" + d.OstayDuration + "','" + d.Oprice + "')";
            int num = DatabaseLink.UpdateData(sql);

            if (num > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Пример #11
0
        //添加客房类型
        public bool addRoomType(roomType t /*客房类型对象*/)
        {
            string sql = "insert into RoomType values('" + t.Tid + "','" + t.Ttype + "'," + t.TbedNum + ",'" + t.TairConditioning
                         + "','" + t.Ttelevision + "','" + t.ThairDrier + "','" + t.Tlandline + "','" + t.Twifi + "','" + t.Tremark + "')";
            int num = DatabaseLink.UpdateData(sql);

            if (num > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Пример #12
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);
            }
        }
Пример #13
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);
            }
        }
Пример #14
0
        //修改酒店信息
        public bool updateHotelInfo(hotelInfo h, string id /*酒店编号*/)
        {
            string sql = "update HotelInfo set Hname='" + h.Hname + "',Hprovince='" + h.Hprovince + "',Haddress='" + h.Haddress
                         + "',Hprice=" + h.Hprice + ",Hcontact='" + h.Hcontact + "',Hintroduce='" + h.Hintroduce + "',HimageUrl='" + h.HimageUrl
                         + "'  where Hid='" + id + "'";
            int num = DatabaseLink.UpdateData(sql);

            if (num > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Пример #15
0
        //修改客房类型信息
        public bool updateRoomType(roomType t, string id /*客房类型编号*/)
        {
            string sql = "update RoomType set Ttype='" + t.Ttype + "',TbedNum=" + t.TbedNum + ",TairConditioning='" + t.TairConditioning
                         + "',Ttelevision='" + t.Ttelevision + "',ThairDrier='" + t.ThairDrier + "',Tlandline='" + t.Tlandline + "',Twifi='" + t.Twifi
                         + "',Tremark='" + t.Tremark + "' where Tid='" + id + "'";
            int num = DatabaseLink.UpdateData(sql);

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