设置回房间可用 [英] setting Room back to available

查看:91
本文介绍了设置回房间可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我和我的预订系统的问题。表中的房间我有一个名为isAvailable与数据类型位列。当Registereduser书籍从GridView的一间带此列设置为0,其中选定的索引。一切工作正常,但现在我有一个员工用户删除选中的预约时更新表。我的想法是节省删除行的索引阵列和比较表和房间预订表的索引。如果指数没有找到套isAvailable回1从而使它可用。它是一个好主意吗?

i have a problem with my booking system. in the table rooms i have a column named isAvailable with datatype bit. when the Registereduser books a room from gridview with selected index this column is set to 0 where. all that works fine but now i have to update the table when a staff user deletes a selected booking. my idea is saving index of deleted row in array and compares index of table Rooms and table Bookings. if index is not found sets the isAvailable back to 1 thus making it available. is it a good idea?

推荐答案

为什么不创建一个新的标志和集合到请将isDeleted真的吗?有两个标志这种方式,你可以看到,如果房间已被删除时,可用或删除时不可用,并让您对您的工作人员更多的审计数据。

Why not create a new flag and set IsDeleted to true? That way having two flags you can see if the Room was deleted when Available or Deleted when Unavailable and give you more auditing data over your staff.

这篇关于设置回房间可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆