酒店管理Hotel源码

  • O9_540569
    了解作者
  • 230.7KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-05-11 10:08
    上传日期
酒店管理系统,vs2005+sql2005!
Hotel.rar
  • Hotel
  • HotelManagerBLL
  • Properties
  • AssemblyInfo.cs
    1.3KB
  • RoomTypeManager.cs
    4.3KB
  • RoomStateManager.cs
    1.1KB
  • HotelManagerBLL.csproj.user
    249B
  • RoomMessageManager.cs
    3.3KB
  • HotelManagerBLL.csproj
    2.4KB
  • HotelManagerUI
  • Properties
  • Settings.settings
    249B
  • Resources.Designer.cs
    2.8KB
  • AssemblyInfo.cs
    1.2KB
  • Settings.Designer.cs
    1.1KB
  • Resources.resx
    5.5KB
  • FrmRoomTypeSet.resx
    12.9KB
  • FrmRoomMessage.Designer.cs
    23.5KB
  • FrmRoomMessage.resx
    12.9KB
  • Program.cs
    512B
  • FrmRoomTypeSet.cs
    6.7KB
  • FrmMain.cs
    1.4KB
  • HotelManagerUI.csproj
    4.3KB
  • FrmRoomMessage.cs
    9.6KB
  • FrmRoomTypeSet.Designer.cs
    18.4KB
  • FrmMain.resx
    6KB
  • HotelManagerUI.csproj.user
    249B
  • FrmMain.Designer.cs
    5.3KB
  • HotelManager
  • Properties
  • AssemblyInfo.cs
    1.3KB
  • HotelManagerDAL.csproj.user
    249B
  • RoomStateServer.cs
    1.9KB
  • RoomTypeServer.cs
    5.5KB
  • DBHelp.cs
    3.5KB
  • HotelManagerDAL.csproj
    2.3KB
  • RoomMessageServer.cs
    5.9KB
  • HotelManagerBDL
  • Properties
  • AssemblyInfo.cs
    1.3KB
  • RoomState.cs
    759B
  • RoomType.cs
    1.6KB
  • HotelManagerBDL.csproj
    2KB
  • RoomMessage.cs
    1.8KB
  • SQLQuery1.sql
    468B
  • HotelManager.sql
    4KB
  • HotelManager.suo
    46KB
  • HotelManager.sln
    2.4KB
  • HotelManager_data.mdf
    5MB
  • HotelManager_log.ldf
    2MB
内容介绍
--创建库 create database HotelManager on primary ( name='HotelManager_data', filename='d:\C#\HotelManager\HotelManager_data.mdf', size=5mb, filegrowth=10% ) log on ( name='HotelManager_log', filename='d:\C#\HotelManager\HotelManager_log.ldf', size=2mb, filegrowth=10% ) go --房间信息表 create table RoomMessage ( RoomId int identity(1,1) primary key, Number varchar(20) not null, BedNumber int not null, Description varchar(200) not null, State int not null, GuestNumber int not null, TypeId int not null ) go --房间类型表 create table RoomType ( TypeId int identity(1,1) primary key, TypeName varchar(50) not null, TypePrice money not null, IsAddBed varchar(10) not null, AddBedPrice money not null, Remark varchar(50) not null ) go --房间状态表 create table RoomState ( RoomStateId int identity(1,1) primary key, StateDescription varchar(10) not null ) go alter table RoomMessage add constraint fk_State foreign key(State) references RoomState(RoomStateId) go alter table RoomMessage add constraint fk_TypeId foreign key(TypeId) references RoomType(TypeId) go alter table RoomType add constraint ck_TypePrice check(TypePrice>=0) go alter table RoomType add constraint ck_AddBedPrice check(AddBedPrice>=0) go select * from RoomType insert into RoomState values ('维修') insert into RoomType values ('上下铺',880,'是',100,'设备豪华') insert into roommessage values ('1-2',2,'两张床',2,0,2) create proc roomTypes as select * from roomtype go create proc AddRoomType @typename varchar(10), @typePrice money, @isAddBed varchar(10), @addBedPrice money, @remark varchar(50) as insert into roomtype values(@typename,@typePrice,@isAddBed,@addBedPrice,@remark) AddRoomType '1212',12,'是',23,'232323' drop proc deleteRoomType create proc deleteRoomType @typeId int as if exists(select * from roommessage where typeid=@typeId) begin raiserror('已有该类型的房间存在,因此无法删除此类型!',16,1) return end delete from roomType where typeid=@typeId select * from roomtype deleteRoomType 1 create proc UpdateroomType @typeId int, @typename varchar(10), @typePrice money, @isAddBed varchar(10), @addBedPrice money, @remark varchar(50) as update roomtype set typename=@typename,typePrice=@typePrice,isAddBed=@isAddBed,addbedprice=@addBedPrice,remark=@remark where typeid=@typeId select * from roommessage select * from roomtype create proc GetAllRoomStates as select * from roomState drop proc AddRoom create proc AddRoom @number varchar(10), @bedNumber int, @description varchar(10), @state int, @guestNumber int, @typeId int as if exists(select * from roommessage where number=@number) begin raiserror ('该房间已存在,无法重复添加!',16,1) return end insert into roommessage values(@number,@bedNumber,@description,@state,@guestNumber,@typeId) drop proc SelectPriceByType create proc SelectPriceByType @typeName varchar(10) as select * from roomtype where typename=@typeName go create proc DeleteRoom @roomId int as delete from roommessage where roomid=@roomId drop proc UpdateRoomMessage create proc UpdateRoomMessage @roomId int, @number varchar(10), @bedNumber int, @description varchar(10), @stateId int, @guestNumber int, @typeId int as declare @numbers int set @numbers=0 begin transaction update roomMessage set number=@number,bedNumber=@bedNumber,description=@description,state=@stateId,guestNumber=@guestNumber,typeId=@typeId where roomid=@roomId select @numbers=count(*) from roomMessage where number= @number if @numbers>1 begin rollback transaction raiserror ('不能修改为已存在的房间名',16,1) end else commit transaction select * from roomstate UpdateRoomMessage 10,102,1,'444',2,0,1 go create proc SelectByRoomNumber @number varchar(10) as select * from roomMessage where number=@number SelectByRoomNumber 102 go select * from roommessage create proc SelectByRoomTypeId @typeId int as select * from roommessage where typeId=@typeId SelectByRoomTypeId 3
评论
    相关推荐
    • sql
      sql 在edX上参加IBM数据科学SQL课程时编译了一些ipython笔记本和sql脚本( )
    • sql
      sql主要sql来自: :
    • SQL Monitor
      SQL Monitor 是一款界面简洁、绿色小巧的sql活动监视器,它能够帮助用户对 SQL Server 运行进程和Job进行实时监视,您可以查看当前执行的SQL/命令并终止。
    • SQL 语言
      SQL语言基础 SQL语法介绍 ppt
    • sql search
      非常好用的sql server 搜索工具。sql search sql search
    • Sql Prompt
      SQLPromptBundle.zip 中的sqlprompt3setup.exe 为安装文件。 压缩包解压开之后,执行Initialize.bat即可。
    • sqlexplorer
      sql2000数据加密查看工具sql2000数据加密查看工具sql2000数据加密查看工具sql2000数据加密查看工具
    • sql sql sql
      sql学习 sql sql sql sql sql sql sql
    • ConnectSQL
      VC连接SQL VC连接SQL VC连接SQL VC连接SQL VC连接SQL VC连接SQL VC连接SQL VC连接SQL
    • SQL学习
      关于SQL一些的资料总结,我也是从网上找的 谢谢了 是TXT格式的