- Home
- Forum
- ASP.NET MVC - EJ 2
- Want to develop a meeting room reservation system
Want to develop a meeting room reservation system
We tested, used and ordered products.
Want to develop a meeting room reservation system
We study this.
Want to edit to be able to choose to book in the morning(8.00-12.00) and afternoon(13.00-16.00), showing color separation.
No repeat bookings on the same day and time
Send mail to notify the reservation in the system.
There are also examples recommended.
SIGN IN To post a reply.
5 Replies
VD
Vinitha Devi Murugan
Syncfusion Team
May 29, 2019 12:19 PM UTC
Hi Phonchai,
Greetings from Syncfusion.
We have prepared the sample as per your requirements and same can be available in following link.
In the above sample to paint over the cells for AM and PM, the renderCell event is used and to block more than one booking per slot, the isSlotAvailable method is used. Also you can send mail through actionComplete event.
Please refer the below links.
|
<div class="col-lg-12 control-section">
<div class="content-wrapper">
<div class="col-md-12">
@Html.EJS().Schedule("schedule").Width("100%").Height("650px").EventSettings(new ScheduleEventSettings { DataSource = ViewBag.datasource }).SelectedDate(new DateTime(2019, 1, 10)).ActionBegin("onActionBegin").RenderCell("onRenderCell").ActionComplete("onActionComplete").DragStop("onStart").ResizeStop("onStart").Render()
</div>
</div>
</div>
<style>
td.e-work-cells.e-work-hours.paint, td.e-work-cells.e-alternate-cells.paint, td.e-work-cells.paint {
pointer-events: none;
}
td.e-work-cells.e-work-hours.AM, td.e-work-cells.e-alternate-cells.AM, td.e-work-cells.AM {
background: #ecdef1 !important;
}
td.e-work-cells.e-work-hours.PM, td.e-work-cells.e-alternate-cells.PM, td.e-work-cells.PM {
background: #def0f2 !important;
}
</style>
<script>
function onActionComplete(args) {
// you can send mail from here
alert("Event Created");
}
// To paint the AM and PM
function onRenderCell(args) {
if (args.elementType == 'workCells') {
if (args.date.getHours() < 12) {
ej.base.addClass([args.element], 'AM');
}
else if (args.date.getHours() > 12) {
ej.base.addClass([args.element], 'PM');
}
else {
ej.base.addClass([args.element], 'paint');
}
}
}
function onStart(args) {
// To prevent drag and resize on 12Am to 1PM
if (args.data.StartTime.getHours() == 12 || args.data.EndTime.getHours() == 12 || args.data.StartTime.getHours() == 13 || args.data.EndTime.getHours() == 13) {
args.cancel = true;
}
}
// To pervent repeat bookings on the same day and time
function onActionBegin(args) {
if (args.requestType === 'eventCreate' || args.requestType === 'eventChange') {
var data;
if (args.requestType === 'eventCreate') {
data = args.data[0];
} else if (args.requestType === 'eventChange') {
data = args.data;
}
if (!this.isSlotAvailable(data.StartTime, data.EndTime)) {
args.cancel = true;
}
}
}
</script> |
Kindly try the above sample and let us know if you need any further assistance on this.
Regards,
M.Vinitha devi.
PS
Phonchai Sakunchinnasee
December 25, 2019 06:41 AM UTC
We wrote secretly booking a meeting room.
The meeting room is booked from January 1 - January 3.
But can be booked again on 2 January
How to check to prevent duplicate reservations.
or
Scheduled not to book more than one day, such as
To book on January 1
To book on January 2
To book on January 3
Not available for booking January 1-3
How to do?
Please help.
Thank you so much
VD
Vinitha Devi Murugan
Syncfusion Team
December 30, 2019 11:20 AM UTC
Hi Phonchai,
Thanks for your update.
You can check whether the given time range slots are available for event creation or already occupied by other events using isSlotAvilable method. We have prepared sample for your reference.
Sample: https://www.syncfusion.com/downloads/support/forum/144904/ze/Schedule_Mvc_Sample-891260636.zip
Ug Link: https://ej2.syncfusion.com/documentation/schedule/cell-customization/#check-for-cell-availability
Kindly try the above sample and if still the issue persist please make your changes in the same sample and revert us.
Regards,
M.Vinitha devi
VM
Vengatesh Maniraj
Syncfusion Team
January 9, 2020 10:26 AM UTC
Hi Phonchai,
Sorry for the inconvenience.
We have already published the KB for this requirement which is available in below link
Kindly try the above and revert us for further assistance.
Regards,
Vengatesh
SIGN IN To post a reply.
- 5 Replies
- 3 Participants
-
PS Phonchai Sakunchinnasee
- May 28, 2019 08:19 AM UTC
- Jan 9, 2020 10:26 AM UTC