We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Want to develop a meeting room reservation system

Thread ID:

Created:

Updated:

Platform:

Replies:

144904 May 28,2019 08:19 AM UTC Jan 9,2020 10:26 AM UTC ASP.NET MVC - EJ 2 5
loading
Tags: Schedule
Phonchai Sakunchinnasee
Asked On May 28, 2019 08:19 AM UTC

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.

Vinitha Devi Murugan [Syncfusion]
Replied On 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. 


Phonchai Sakunchinnasee
Replied On 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

Vinitha Devi Murugan [Syncfusion]
Replied On 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.  
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 


Phonchai Sakunchinnasee
Replied On January 8, 2020 03:48 AM UTC

i use   not EJ2


Vengatesh Maniraj [Syncfusion]
Replied On 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  


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon