IF EXISTS (SELECT * FROM sysobjects WHERE type = 'V' AND name = 'RoomInfo_value')
BEGIN
PRINT 'Dropping View RoomInfo_value'
DROP View RoomInfo_value
END
GO
/******************************************************************************
** File:
** Name: RoomInfo_value
** Desc: 房间信息
**
** This template can be customized:
Rid,--房间号
stateType,--状态
roomtel,--房间电话
ingroup,--所在区域
ttype,--房间类型
Uname--宾客姓名
OderPrice--预设单价
WorkPrice --折后单价
NdepositMoney--已交押金
totalMoney=--消费金额
ndatetime--进店时间
leaveTime--预离时间
UseTime--已用时间
Remark--备注
**
**
** Auth:
** Date:
*******************************************************************************
** Change History
*******************************************************************************
** Date: Author: Description:
** -------- -------- -------------------------------------------
**
*******************************************************************************/
PRINT 'Creating View RoomInfo_value'
GO
CREATE View RoomInfo_value
as
select
Rid,--房间号
stateType,--状态
roomtel,--房间电话
ingroup,--所在区域
ttype,--房间类型
Aname=(Select Aname from AdminInfo where Aid=(select Naid from newroom where Nrid=rid )),--备注
Uname=case
when(select Uname from userinfo where uid=(select Nuid from Newroom where Nrid=rid ))!=''
then (select Uname from userinfo where uid=(select Nuid from Newroom where Nrid=rid ))
else ''end ,--宾客姓名
OderPrice=--预设单价
(case
when (select Nistimeroom from NewRoom where Nrid=rid)=1
then convert(varchar(20),priceByhour)+'¥/小时'
else convert(varchar(20),pricebyday)+'¥/天' end
),
WorkPrice=--折后单价
(case
when (select Discount from guestsort where gid=(select Ugid from userinfo where uid=(select Nuid from NewRoom where Nrid=rid)))>=0
then case
when (select Nistimeroom from NewRoom where Nrid=rid)=1--如果该该人选择计时则按时间计算折后单价
then convert(varchar(20),(select Discount from guestsort where gid=(select Ugid from userinfo where uid=(select Nuid from NewRoom where Nrid=rid)))*0.1*priceByhour/0.1)+'¥/小时'
else convert(varchar(20),(select Discount from guestsort where gid=(select Ugid from userinfo where uid=(select Nuid from NewRoom where Nrid=rid)))*0.1*pricebyday/0.1)+'¥/天'
end
end
)
,
NdepositMoney=convert(varchar(20),(select NdepositMoney from NewRoom where Nrid=rid))+'¥',--已交押金
RoomMoney=--房间应收金额
convert(varchar(20),
(
case
when (select Nistimeroom from NewRoom where Nrid=rid)=1
then (select Discount from guestsort where gid=(select Ugid from userinfo where uid=(select Nuid from NewRoom where Nrid=rid)))*0.1*priceByhour/0.1*
(select DATEDIFF ( hour , ndatetime , getdate())from newroom where Nrid=rid )--考虑打折钟点房按时计费
else (select Discount from guestsort where gid=(select Ugid from userinfo where uid=(select Nuid from NewRoom where Nrid=rid)))*0.1*pricebyday/0.1*
(select DATEDIFF (day , ndatetime , getdate())from newroom where Nrid=rid )--考虑打折非钟点房按天计费
end
)
)+'¥',
totalMoney=--房间总消费金额
convert(varchar(20),
(
(select (case
when sum(snumber*wprice)>0 then sum(snumber*wprice)
else 0
end
)
from superfluityinfo,wareinfo where superfluityinfo.wid=wareinfo.wid and nid=rid
)--额外消费+房间费
+case
when (select Nistimeroom from NewRoom where Nrid=rid)=1
then (select Discount from guestsort where gid=(select Ugid from userinfo where uid=(select Nuid from NewRoom where Nrid=rid)))*0.1*priceByhour/0.1*
(select DATEDIFF ( hour , ndatetime , getdate())from newroom where Nrid=rid )--考虑打折钟点房按时计费
else (select Discount from guestsort where gid=(select Ugid from userinfo where uid=(select Nuid from NewRoom where Nrid=rid)))*0.1*pricebyday/0.1*
(select DATEDIFF (day , ndatetime , getdate())from newroom where Nrid=rid )--考虑打折非钟点房按天计费
end
)
)+'¥',
ndatetime=(select ndatetime from newroom where Nrid=rid),--进店时间
leaveTime=(select DATEADD ( day , Ndays, Ndatetime )from newroom where Nrid=rid),--预离时间
UseTime=--已用时间
(
case
when (select Nistimeroom from NewRoom where Nrid=rid)=1--钟点房计算时间
then (convert(varchar(20),(select DATEDIFF ( minute , ndatetime , getdate())from newroom where Nrid=rid )/60))+'小时'+(convert(varchar(20),(select DATEDIFF ( minute , ndatetime , getdate())from newroom where Nrid=rid )%60))+'分钟'--已用时间按时间计算
else (convert(varchar(20),(select DATEDIFF ( minute , ndatetime , getdate())from newroom where Nrid=rid )/60/24))+'天'+(convert(varchar(20),(select DATEDIFF ( minute , ndatetime , getdate())from newroom where Nrid=rid )/60%24))+'小时'--已用时间按天计算
end
),
Remark=(select Remark from newroom where Nrid=rid )--备注
from roominfo,roomstate,typeroom where tid=rtid and stateid=rstateid
GO
GRANT SELECT ON RoomInfo_value TO PUBLIC
GO
没有合适的资源?快使用搜索试试~ 我知道了~
C#酒店管理系统,采用3层架构.zip
共404个文件
cs:135个
bmp:46个
xsd:26个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 147 浏览量
2022-04-18
10:04:02
上传
评论
收藏 6.96MB ZIP 举报
温馨提示
net源代码
资源推荐
资源详情
资源评论
收起资源包目录
C#酒店管理系统,采用3层架构.zip (404个子文件)
ft_springs_.bmp 39KB
bg.bmp 35KB
button_springs_.bmp 34KB
f.bmp 18KB
d.bmp 16KB
e.bmp 16KB
g.bmp 16KB
b.bmp 16KB
c.bmp 15KB
h.bmp 15KB
bgs.bmp 14KB
find.bmp 14KB
a.bmp 13KB
add.bmp 12KB
scroll_spring_v.bmp 11KB
scroll_spring_h.bmp 11KB
del.bmp 11KB
edit.bmp 11KB
exit.bmp 11KB
flush.bmp 11KB
Clear.bmp 10KB
LongUse.bmp 10KB
Stop.bmp 9KB
yuding.bmp 9KB
Kegong.bmp 9KB
check.bmp 8KB
Zhanyong.bmp 8KB
radio.bmp 5KB
addtime.bmp 4KB
saveas.bmp 4KB
clear2.bmp 4KB
jsqi.bmp 4KB
fb_springs_.bmp 3KB
help_cherry.bmp 2KB
close_cherry.bmp 2KB
max_cherry.bmp 2KB
min_cherry.bmp 2KB
sizebox_wmp.bmp 1KB
down2.bmp 822B
right2.bmp 822B
left2.bmp 822B
up2.bmp 822B
Up.bmp 802B
Down.bmp 802B
left.bmp 782B
right.bmp 782B
IndexUI.cs 94KB
ConfigUI.cs 70KB
fmOpenGuest.cs 38KB
fmreckoning.cs 33KB
RoomInfoData.cs 32KB
ConsumeInfoData.cs 22KB
TotalRoomInfoData.cs 22KB
EmployeeData.cs 22KB
AddConsume.cs 21KB
ConList.cs 21KB
RoomInfo_configData.cs 19KB
LoadRoomInfoData.cs 19KB
RoomConsume.cs 18KB
WareInfoData.cs 18KB
WareLookupData.cs 17KB
TypeRoomData.cs 17KB
ConsumeData.cs 16KB
NewRoom_DiscountSettingData.cs 15KB
Reckoning_isSuperadditionData.cs 15KB
NewRoom_JugeRoomData.cs 15KB
NewRoom_usableRoomData.cs 15KB
NewRoom_GuestGidData.cs 14KB
ListType.cs 14KB
GuestSortData.cs 14KB
AdminInfoData.cs 14KB
ListNodesData.cs 14KB
ConsumeTypeData.cs 14KB
NewRoom_PaperSortData.cs 14KB
NewRoom_getPID.cs 14KB
Reckoning_Calrecord.cs 13KB
Add.cs 12KB
BackUp_ReplaceUI.cs 12KB
RoomInfoUI.cs 10KB
UpdateRoomtypeUI.cs 9KB
SelfMakeJackMessUI.cs 8KB
AddRoomTypeUI.cs 7KB
AddRoomInfoUI.cs 7KB
LockSystemUI.cs 7KB
LoginUI.cs 7KB
UpdateSelfmessUI.cs 6KB
UpdateAdminInfoUI.cs 6KB
fmreckoningRid.cs 6KB
AddJackMessUI.cs 5KB
fmRoomCoding.cs 5KB
AddAdminInfo.cs 4KB
SystemLogUI.cs 4KB
JackMessageUI.cs 3KB
AboutUI.cs 2KB
ConnectAndAccessingDB.cs 2KB
AssemblyInfo.cs 2KB
AssemblyInfo.cs 2KB
AssemblyInfo.cs 2KB
AssemblyInfo.cs 2KB
NewRoom_OpenAccess.cs 2KB
共 404 条
- 1
- 2
- 3
- 4
- 5
资源评论
programyg
- 粉丝: 161
- 资源: 21万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- c51_2_2.c
- ASCII American Standard Code for Information Interchange
- 一个chm格式的 SQL 函数手册-SQL语言手册文档
- 计算当前月份的天数和剩余天数
- 基于ARM的指令调度和延迟分支
- 基于Vue和TypeScript的极简聊天应用设计源码 - HasChat
- 基于Vue2全家桶和Zcool数据的图片收集网站设计源码 - cool-picture
- 基于C和C++的二维绘制工具设计源码 - DrawPro
- Object.defineProperty 的 IE 补丁object-defineproperty-ie-master.zip
- 整卷预览.mhtml
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功