{
  "$schema": "https://ai.syncfusion.com/schema/registry-item.json",
  "name": "scheduler-external-drag-and-drop",
  "framework": "aspnet-mvc",
  "type": "registry:component",
  "component": "Scheduler",
  "variant": "external-drag-and-drop",
  "dependencies": [
    "Syncfusion.AspNetMvc.Schedule",
    "Syncfusion.AspNetMvc.Navigations"
  ],
  "description": "Scheduler with a waiting list that supports dragging external items into resource timelines.",
  "meta": {
    "essentialStudioRelease": "2026 Volume 3 (v35.1.37)",
    "license": "commercial-or-community",
    "licenseNote": "The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md",
    "requiresLicenseKey": true,
    "requiresServerEndpoint": false,
    "platformIndex": "https://ai.syncfusion.com/aspnet-mvc/llms.txt",
    "skillPack": "syncfusion/aspnetmvc-ui-components-skills",
    "docs": "https://ai.syncfusion.com/gallery/aspnet-mvc/scheduler-external-drag-and-drop.md"
  },
  "files": [
    {
      "target": "src/components/scheduler-external-drag-and-drop/Scheduler.cshtml",
      "content": "@using Syncfusion.EJ2\n@using Syncfusion.EJ2.Schedule\n\n@section ControlsSection{\n    <div class=\"control-section\">\n        <div class=\"content-wrapper\">\n            <div class=\"schedule-container\">\n                <div class=\"title-container\">\n                    <div class=\"title-text\">Doctor's Appointments</div>\n                </div>\n                @Html.EJS().Schedule(\"schedule\").Width(\"100%\").Height(\"650px\").CssClass(\"schedule-drag-drop\").Views(view => { view.Option(View.TimelineDay).Add(); view.Option(View.TimelineMonth).Add(); }).CurrentView(View.TimelineDay).SelectedDate(new DateTime(DateTime.Today.Year, 7, 2)).WorkHours(new ScheduleWorkHours { Highlight = true, Start = \"08:00\", End = \"18:00\" }).Group(group => group.EnableCompactView(false).Resources((string[])ViewData[\"Resources\"])).Resources(res =>\n                    {\n                        res.DataSource(ViewData[\"Departments\"]).Field(\"DepartmentID\").Title(\"Department\").Name(\"Departments\").TextField(\"text\").IdField(\"id\").ColorField(\"color\").Add();\n                        res.DataSource(ViewData[\"Consultants\"]).Field(\"ConsultantID\").Title(\"Consultant\").Name(\"Consultants\").TextField(\"text\").IdField(\"id\").ColorField(\"color\").GroupIDField(\"groupId\").AllowMultiple(false).Add();\n                    }).ResourceHeaderTemplate(\"#resource-template\").ActionBegin(\"OnActionBegin\").EventSettings(e => e.Fields(f => f.Subject(sub => sub.Name(\"Name\").Title(\"Patient Name\")).StartTime(start => start.Name(\"StartTime\").Title(\"From\")).EndTime(end => end.Name(\"EndTime\").Title(\"To\")).Description(des => des.Name(\"Description\").Title(\"Reason\"))).DataSource(ViewData[\"datasource\"])).Render()\n            </div>\n            <div class=\"treeview-container\">\n                <div class=\"title-container\">\n                    <div class=\"title-text\">Waiting List</div>\n                </div>\n                @Html.EJS().TreeView(\"tree\").Fields(fields => fields.DataSource(ViewData[\"treeDataSource\"]).Id(\"Id\").Text(\"Name\")).AllowDragAndDrop(true).NodeDragStop(\"OnTreeDragStop\").NodeDragging(\"onTreeDrag\").NodeDragStart(\"onTreeDragStart\").NodeTemplate(\"#treeTemplate\").DragArea(\".content-wrapper\").CssClass(\"treeview-external-drag\").Render()\n            </div>\n        </div>\n    </div>\n\n    <style>\n        .content-wrapper {\n            display: -ms-flexbox;\n            display: flex;\n        }\n\n        .e-device-hover {\n            background-color: #e0e0e0 !important;\n        }\n\n        .schedule-container {\n            padding-right: 10px;\n            width: 100%;\n        }\n\n        .title-container {\n            padding-bottom: 10px;\n        }\n\n        .title-text {\n            font-size: 18px;\n            margin: 0px;\n            font-weight: bold;\n            text-align: center;\n            line-height: 1.1;\n        }\n\n        .treeview-external-drag #waiting {\n            height: 100%;\n            padding: 0;\n        }\n\n        .treeview-external-drag #waitdetails {\n            width: 95%;\n            float: left;\n            height: 100%;\n            padding: 0;\n        }\n\n        .treeview-external-drag #waitlist {\n            width: 100%;\n            height: 50%;\n            font-weight: bold;\n            font-family: \"Segoe UI\";\n            font-size: 12px;\n            padding: 5px 0 0 10px;\n            overflow: hidden;\n            text-overflow: ellipsis;\n        }\n\n        .treeview-external-drag #waitcategory {\n            height: 50%;\n            font-family: \"Segoe UI\";\n            font-size: 10px;\n            opacity: 0.6;\n            padding-left: 10px;\n            padding-top: 5px;\n            overflow: hidden;\n            text-overflow: ellipsis;\n        }\n\n        .treeview-external-drag .e-list-text,\n        .e-bigger .treeview-external-drag .e-list-text {\n            border: 0.5px solid #E1E7EC;\n            height: 50px;\n            line-height: 15px !important;\n            padding: 0 5px;\n            width: 220px;\n        }\n\n        .treeview-external-drag .e-list-parent,\n        .e-bigger .treeview-external-drag .e-list-parent {\n            height: 100%;\n            padding: 0 2px;\n        }\n\n        .treeview-external-drag .e-list-item,\n        .e-bigger .treeview-external-drag .e-list-item {\n            height: 100%;\n            padding: 0 0 5px 0;\n        }\n\n        .treeview-external-drag .e-fullrow,\n        .e-bigger .treeview-external-drag .e-fullrow {\n            height: 55px;\n        }\n\n        .treeview-external-drag .e-list-item.e-hover > .e-fullrow,\n        .treeview-external-drag .e-list-item.e-active > .e-fullrow,\n        .treeview-external-drag .e-list-item.e-active.e-hover > .e-fullrow,\n        .e-bigger .treeview-external-drag .e-list-item.e-hover > .e-fullrow,\n        .e-bigger .treeview-external-drag .e-list-item.e-active > .e-fullrow,\n        .e-bigger .treeview-external-drag .e-list-item.e-active.e-hover > .e-fullrow {\n            background-color: transparent;\n            border-color: transparent;\n            box-shadow: none !important;\n        }\n\n        .fluent2-highcontrast .treeview-external-drag .e-list-item.e-hover > .e-text-content .e-list-text {\n            color: #fff;\n        }\n\n        .treeview-external-drag .e-text-content,\n        .e-bigger .treeview-external-drag .e-text-content {\n            padding: 0;\n            background-color: inherit;\n        }\n\n        .e-drag-item.e-treeview.treeview-external-drag,\n        .e-bigger .e-drag-item.e-treeview.treeview-external-drag {\n            padding: 0 !important;\n        }\n\n        .e-schedule.schedule-drag-drop .e-timeline-view .e-resource-left-td,\n        .e-schedule.schedule-drag-drop .e-timeline-month-view .e-resource-left-td {\n            width: 160px;\n        }\n\n        .e-schedule.schedule-drag-drop .e-resource-cells.e-parent-node .specialist-category {\n            padding-left: 30px\n        }\n\n        .e-schedule.e-rtl.schedule-drag-drop .e-resource-cells.e-parent-node .specialist-category {\n            padding-right: 30px\n        }\n\n        .e-schedule.schedule-drag-drop .e-resource-cells.e-child-node .specialist-category,\n        .e-schedule.schedule-drag-drop .e-resource-cells.e-child-node .specialist-name {\n            padding: 5px\n        }\n\n        .e-schedule.schedule-drag-drop .e-resource-cells.e-parent-node .specialist-name {\n            padding: 0 10px\n        }\n\n        .e-schedule.schedule-drag-drop .e-resource-cells.e-parent-node .template-wrap {\n            padding: 3px 0px;\n        }\n\n        .e-schedule.schedule-drag-drop .e-resource-cells.e-child-node .specialist-category .specialist-image {\n            width: 45px;\n            height: 40px;\n            float: left;\n            border-radius: 50%;\n            margin-right: 10px;\n        }\n\n        .e-schedule.schedule-drag-drop .specialist-name {\n            font-size: 13px;\n        }\n\n        .e-schedule.schedule-drag-drop .specialist-designation {\n            font-size: 10px;\n        }\n\n        .e-schedule-dialog .e-all-day-time-zone-row,\n        .e-schedule-dialog .e-location-container,\n        .e-bigger .e-schedule-dialog .e-all-day-time-zone-row,\n        .e-bigger .e-schedule-dialog .e-location-container {\n            display: none;\n        }\n\n        .e-schedule-dialog .e-subject-container,\n        .e-bigger .e-schedule-dialog .e-subject-container {\n            padding-right: 0;\n            width: 100%;\n        }\n\n        .e-schedule-dialog.e-rtl .e-subject-container,\n        .e-bigger .e-schedule-dialog.e-rtl .e-subject-container {\n            padding-left: 0;\n        }\n\n        @@media (max-width: 550px) {\n            /* custom code start*/\n            .content-wrapper {\n                display: block;\n            }\n\n            .schedule-container {\n                padding-bottom: 10px\n            }\n            /* custom code end*/\n\n            .treeview-external-drag.e-treeview,\n            .e-bigger .treeview-external-drag.e-treeview {\n                width: 250px;\n            }\n\n                .e-bigger .treeview-external-drag.e-treeview.e-drag-item {\n                    position: relative !important;\n                }\n        }\n        .e-disble-not-allowed {\n            cursor: unset !important;\n        }\n        .e-drag-item.treeview-external-drag .e-icon-expandable {\n            display: none;\n        }\n    </style>\n\n    <!-- Template to render tree node -->\n    <script id=\"treeTemplate\" type=\"text/x-template\">\n        <div id=\"waiting\">\n            <div id=\"waitdetails\">\n                <div id=\"waitlist\">${Name}</div>\n                <div id=\"waitcategory\">${DepartmentName} - ${Description}</div>\n            </div>\n        </div>\n    </script>\n\n    <!-- Resource Header Template -->\n    <script id=\"resource-template\" type=\"text/x-template\">\n        <div class=\"template-wrap\">\n            <div class=\"specialist-category\">\n                ${getConsultantImage(data)}\n                <div class=\"specialist-name\">${getConsultantName(data)}</div>\n                <div class=\"specialist-designation\">${getConsultantDesignation(data)}</div>\n            </div>\n        </div>\n    </script>\n\n    <script type=\"text/javascript\">\n\n        function getConsultantName(value) {\n            return value.resourceData[value.resource.textField];\n        };\n\n        function getConsultantImage(value) {\n            var resourceName = value.resourceData[value.resource.textField];\n            if (resourceName === 'GENERAL' || resourceName === 'DENTAL') {\n                return '';\n            } else {\n                var path = \"@Url.Content(\"~/Content/schedule/images/\")\";\n                var src = path + resourceName.toLowerCase() + \".png\";\n                return '<img class=\"specialist-image\" src=' + src + '></img>';\n            }\n        };\n\n        function getConsultantDesignation(value) {\n            var resourceName = value.resourceData[value.resource.textField];\n            if (resourceName === 'GENERAL' || resourceName === 'DENTAL') {\n                return '';\n            } else {\n                return value.resourceData.designation;\n            }\n        };\n\n        var isTreeItemDropped = false;\n        var draggedItemId = '';\n\n        function onTreeDrag(event) {\n            var scheduleObj = document.querySelector(\".e-schedule\").ej2_instances[0];\n            if (scheduleObj.isAdaptive) {\n                var classElement = scheduleObj.element.querySelector('.e-device-hover');\n                if (classElement) {\n                    classElement.classList.remove('e-device-hover');\n                }\n                if (event.target.classList.contains('e-work-cells')) {\n                    ej.base.addClass([event.target], 'e-device-hover');\n                }\n            }\n        }\n\n        function OnActionBegin(event) {\n            if (event.requestType === 'eventCreate' && isTreeItemDropped) {\n                var treeObj = document.querySelector(\".e-treeview.treeview-external-drag\").ej2_instances[0];\n                var treeViewdata = treeObj.fields.dataSource;\n                var filteredPeople = treeViewdata.filter(function (item) { return item.Id !== parseInt(draggedItemId, 10); });\n                treeObj.fields.dataSource = filteredPeople;\n                var elements = document.querySelectorAll('.e-drag-item.treeview-external-drag');\n                for (var i = 0; i < elements.length; i++) {\n                    remove(elements[i]);\n                }\n            }\n        }\n\n        function OnTreeDragStop(event) {\n            var treeElement = ej.base.closest(event.target, '.e-treeview');\n            var scheduleObj = document.querySelector(\".e-schedule\").ej2_instances[0];\n            var classElement = scheduleObj.element.querySelector('.e-device-hover');\n            if (classElement) {\n                classElement.classList.remove('e-device-hover');\n            }\n            if (!treeElement) {\n                event.cancel = true;\n                var scheduleElement = ej.base.closest(event.target, '.e-content-wrap');\n                if (scheduleElement) {\n                    var treeviewData = this.fields.dataSource;\n                    if (event.target.classList.contains('e-work-cells')) {\n                        var filteredData =\n                            treeviewData.filter(function (item) { return item.Id === parseInt(event.draggedNodeData.id, 10); });\n                        var cellData = scheduleObj.getCellDetails(event.target);\n                        var resourceDetails = scheduleObj.getResourcesByIndex(cellData.groupIndex);\n                        var eventData = {\n                            Name: filteredData[0].Name,\n                            StartTime: cellData.startTime,\n                            EndTime: cellData.endTime,\n                            IsAllDay: cellData.isAllDay,\n                            Description: filteredData[0].Description,\n                            DepartmentID: resourceDetails.resourceData.groupId,\n                            ConsultantID: resourceDetails.resourceData.id\n                        };\n                        scheduleObj.openEditor(eventData, 'Add', true);\n                        isTreeItemDropped = true;\n                        draggedItemId = event.draggedNodeData.id;\n                    }\n                }\n            }\n            document.body.classList.remove('e-disble-not-allowed');\n        }\n        function onTreeDragStart() {\n           document.body.classList.add('e-disble-not-allowed');\n        }\n    </script>\n}"
    },
    {
      "target": "src/components/scheduler-external-drag-and-drop/SchedulerController.cs",
      "content": "using EJ2MVCSampleBrowser.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Web.Mvc;\n\nnamespace EJ2MVCSampleBrowser.Models\n{\n    using EJ2MVCSampleBrowser.Controllers.Schedule;\n\n    public class ResourceDataSourceModel\n    {\n        public string text;\n        public int id;\n        public string color;\n        public int groupId;\n    }\n\n    public class ConsultantDataSourceModel\n    {\n        public string text;\n        public int id;\n        public int groupId;\n        public string color;\n        public string designation;\n    }\n\n    public class ScheduleData\n    {\n        public class ResourceData\n        {\n            public int Id;\n            public string Subject;\n            public DateTime StartTime;\n            public DateTime EndTime;\n            public bool IsAllDay;\n            public string ProjectName;\n            public string CategoryName;\n        }\n\n        public List<ResourceData> GetResourceData()\n        {\n            DateTime today = DateTime.Now.Date;\n            return new List<ResourceData>\n            {\n                new ResourceData { Id = 1, Subject = \"Project Review\",        StartTime = today.AddHours(9),  EndTime = today.AddHours(11),  IsAllDay = false, ProjectName = \"PROJECT 1\", CategoryName = \"Nancy\" },\n                new ResourceData { Id = 2, Subject = \"Sprint Planning\",       StartTime = today.AddHours(11), EndTime = today.AddHours(13),  IsAllDay = false, ProjectName = \"PROJECT 1\", CategoryName = \"Steven\" },\n                new ResourceData { Id = 3, Subject = \"Standup\",               StartTime = today.AddHours(14), EndTime = today.AddHours(15),  IsAllDay = false, ProjectName = \"PROJECT 1\", CategoryName = \"Nancy\" },\n                new ResourceData { Id = 4, Subject = \"Code Review\",           StartTime = today.AddHours(15), EndTime = today.AddHours(17),  IsAllDay = false, ProjectName = \"PROJECT 1\", CategoryName = \"Steven\" },\n                new ResourceData { Id = 5, Subject = \"Design Workshop\",       StartTime = today.AddHours(9),  EndTime = today.AddHours(12),  IsAllDay = false, ProjectName = \"PROJECT 2\", CategoryName = \"Nancy\" },\n                new ResourceData { Id = 6, Subject = \"Testing\",               StartTime = today.AddHours(13), EndTime = today.AddHours(16),  IsAllDay = false, ProjectName = \"PROJECT 2\", CategoryName = \"Steven\" },\n                new ResourceData { Id = 7, Subject = \"Deployment\",            StartTime = today.AddHours(16), EndTime = today.AddHours(18),  IsAllDay = false, ProjectName = \"PROJECT 2\", CategoryName = \"Nancy\" },\n                new ResourceData { Id = 8, Subject = \"Bug Triage\",            StartTime = today.AddHours(10), EndTime = today.AddHours(11),  IsAllDay = false, ProjectName = \"PROJECT 2\", CategoryName = \"Steven\" },\n                new ResourceData { Id = 9, Subject = \"Documentation\",         StartTime = today.AddHours(11), EndTime = today.AddHours(13),  IsAllDay = false, ProjectName = \"PROJECT 2\", CategoryName = \"Nancy\" },\n                new ResourceData { Id = 10,Subject = \"Demo Day\",              StartTime = today.AddHours(15), EndTime = today.AddHours(17),  IsAllDay = false, ProjectName = \"PROJECT 2\", CategoryName = \"Steven\" }\n            };\n        }\n\n        public List<ResourceData> GetTimelineResourceData()\n        {\n            DateTime today = DateTime.Now.Date;\n            return new List<ResourceData>\n            {\n                new ResourceData { Id = 11, Subject = \"Kickoff\",            StartTime = today.AddHours(9),  EndTime = today.AddHours(11),  IsAllDay = false, ProjectName = \"PROJECT 1\", CategoryName = \"Steven\" },\n                new ResourceData { Id = 12, Subject = \"Architecture Review\", StartTime = today.AddHours(11), EndTime = today.AddHours(14),  IsAllDay = false, ProjectName = \"PROJECT 1\", CategoryName = \"Nancy\" },\n                new ResourceData { Id = 13, Subject = \"Sprint Review\",       StartTime = today.AddHours(14), EndTime = today.AddHours(17),  IsAllDay = false, ProjectName = \"PROJECT 1\", CategoryName = \"Steven\" },\n                new ResourceData { Id = 14, Subject = \"Retrospective\",       StartTime = today.AddHours(17), EndTime = today.AddHours(18),  IsAllDay = false, ProjectName = \"PROJECT 1\", CategoryName = \"Nancy\" },\n                new ResourceData { Id = 15, Subject = \"Refinement\",          StartTime = today.AddHours(9),  EndTime = today.AddHours(12),  IsAllDay = false, ProjectName = \"PROJECT 2\", CategoryName = \"Steven\" },\n                new ResourceData { Id = 16, Subject = \"Release Planning\",    StartTime = today.AddHours(12), EndTime = today.AddHours(15),  IsAllDay = false, ProjectName = \"PROJECT 2\", CategoryName = \"Nancy\" },\n                new ResourceData { Id = 17, Subject = \"Customer Sync\",       StartTime = today.AddHours(15), EndTime = today.AddHours(17),  IsAllDay = false, ProjectName = \"PROJECT 2\", CategoryName = \"Steven\" },\n                new ResourceData { Id = 18, Subject = \"Sprint Demo\",         StartTime = today.AddHours(10), EndTime = today.AddHours(12),  IsAllDay = false, ProjectName = \"PROJECT 2\", CategoryName = \"Nancy\" },\n                new ResourceData { Id = 19, Subject = \"Backlog Grooming\",     StartTime = today.AddHours(12), EndTime = today.AddHours(14),  IsAllDay = false, ProjectName = \"PROJECT 2\", CategoryName = \"Steven\" },\n                new ResourceData { Id = 20, Subject = \"Handoff\",              StartTime = today.AddHours(14), EndTime = today.AddHours(16),  IsAllDay = false, ProjectName = \"PROJECT 2\", CategoryName = \"Nancy\" }\n            };\n        }\n\n        public List<AppointmentData> GetWaitingListData()\n        {\n            DateTime today = DateTime.Now.Date;\n            return new List<AppointmentData>\n            {\n                new AppointmentData { Id = 1,  Subject = \"Echocardiogram\",        StartTime = today.AddHours(8),  EndTime = today.AddHours(9),  IsAllDay = false, Department = \"GENERAL\", Consultant = \"Alice\" },\n                new AppointmentData { Id = 2,  Subject = \"Dental Checkup\",        StartTime = today.AddHours(9),  EndTime = today.AddHours(10), IsAllDay = false, Department = \"DENTAL\",  Consultant = \"Nancy\" },\n                new AppointmentData { Id = 3,  Subject = \"Eye Exam\",              StartTime = today.AddHours(10), EndTime = today.AddHours(11), IsAllDay = false, Department = \"GENERAL\", Consultant = \"Alice\" },\n                new AppointmentData { Id = 4,  Subject = \"Blood Test\",            StartTime = today.AddHours(11), EndTime = today.AddHours(12), IsAllDay = false, Department = \"GENERAL\", Consultant = \"Nancy\" },\n                new AppointmentData { Id = 5,  Subject = \"Root Canal\",            StartTime = today.AddHours(12), EndTime = today.AddHours(14), IsAllDay = false, Department = \"DENTAL\",  Consultant = \"Alice\" },\n                new AppointmentData { Id = 6,  Subject = \"Vaccination\",           StartTime = today.AddHours(14), EndTime = today.AddHours(15), IsAllDay = false, Department = \"GENERAL\", Consultant = \"Nancy\" },\n                new AppointmentData { Id = 7,  Subject = \"Follow-up\",             StartTime = today.AddHours(15), EndTime = today.AddHours(16), IsAllDay = false, Department = \"GENERAL\", Consultant = \"Alice\" },\n                new AppointmentData { Id = 8,  Subject = \"Cleaning\",              StartTime = today.AddHours(16), EndTime = today.AddHours(17), IsAllDay = false, Department = \"DENTAL\",  Consultant = \"Nancy\" },\n                new AppointmentData { Id = 9,  Subject = \"Consultation\",          StartTime = today.AddHours(17), EndTime = today.AddHours(18), IsAllDay = false, Department = \"GENERAL\", Consultant = \"Alice\" },\n                new AppointmentData { Id = 10, Subject = \"X-Ray\",                 StartTime = today.AddHours(18), EndTime = today.AddHours(19), IsAllDay = false, Department = \"DENTAL\",  Consultant = \"Nancy\" }\n            };\n        }\n\n        public List<AppointmentData> GetHospitalData()\n        {\n            DateTime today = DateTime.Now.Date;\n            return new List<AppointmentData>\n            {\n                new AppointmentData { Id = 11, Subject = \"Surgery\",            StartTime = today.AddHours(8),  EndTime = today.AddHours(11), IsAllDay = false, Department = \"GENERAL\", Consultant = \"Alice\" },\n                new AppointmentData { Id = 12, Subject = \"Consultation\",      StartTime = today.AddHours(11), EndTime = today.AddHours(13), IsAllDay = false, Department = \"DENTAL\",  Consultant = \"Nancy\" },\n                new AppointmentData { Id = 13, Subject = \"Lab\",               StartTime = today.AddHours(13), EndTime = today.AddHours(15), IsAllDay = false, Department = \"GENERAL\", Consultant = \"Alice\" },\n                new AppointmentData { Id = 14, Subject = \"Therapy\",           StartTime = today.AddHours(15), EndTime = today.AddHours(17), IsAllDay = false, Department = \"GENERAL\", Consultant = \"Nancy\" },\n                new AppointmentData { Id = 15, Subject = \"Orthodontics\",      StartTime = today.AddHours(9),  EndTime = today.AddHours(12), IsAllDay = false, Department = \"DENTAL\",  Consultant = \"Alice\" },\n                new AppointmentData { Id = 16, Subject = \"Checkup\",           StartTime = today.AddHours(12), EndTime = today.AddHours(14), IsAllDay = false, Department = \"GENERAL\", Consultant = \"Nancy\" },\n                new AppointmentData { Id = 17, Subject = \"Procedure\",         StartTime = today.AddHours(14), EndTime = today.AddHours(16), IsAllDay = false, Department = \"DENTAL\",  Consultant = \"Alice\" },\n                new AppointmentData { Id = 18, Subject = \"Recovery\",          StartTime = today.AddHours(16), EndTime = today.AddHours(18), IsAllDay = false, Department = \"GENERAL\", Consultant = \"Nancy\" },\n                new AppointmentData { Id = 19, Subject = \"Suture Removal\",    StartTime = today.AddHours(10), EndTime = today.AddHours(11), IsAllDay = false, Department = \"DENTAL\",  Consultant = \"Alice\" },\n                new AppointmentData { Id = 20, Subject = \"Discharge\",         StartTime = today.AddHours(11), EndTime = today.AddHours(12), IsAllDay = false, Department = \"GENERAL\", Consultant = \"Nancy\" }\n            };\n        }\n\n        public List<AppointmentData> GetRecurrenceData()\n        {\n            DateTime today = DateTime.Now.Date;\n            return new List<AppointmentData>\n            {\n                new AppointmentData { Id = 21, Subject = \"Daily Standup\",  StartTime = today.AddHours(9),  EndTime = today.AddHours(10), IsAllDay = false },\n                new AppointmentData { Id = 22, Subject = \"Weekly Sync\",    StartTime = today.AddDays(1).AddHours(11), EndTime = today.AddDays(1).AddHours(12), IsAllDay = false },\n                new AppointmentData { Id = 23, Subject = \"Monthly Review\", StartTime = today.AddDays(7).AddHours(13), EndTime = today.AddDays(7).AddHours(14), IsAllDay = false },\n                new AppointmentData { Id = 24, Subject = \"Quarterly Plan\", StartTime = today.AddDays(30).AddHours(15), EndTime = today.AddDays(30).AddHours(17), IsAllDay = false },\n                new AppointmentData { Id = 25, Subject = \"Daily Code Review\", StartTime = today.AddDays(1).AddHours(14), EndTime = today.AddDays(1).AddHours(15), IsAllDay = false },\n                new AppointmentData { Id = 26, Subject = \"Bi-weekly Retrospective\", StartTime = today.AddDays(14).AddHours(16), EndTime = today.AddDays(14).AddHours(17), IsAllDay = false },\n                new AppointmentData { Id = 27, Subject = \"Daily Backlog\", StartTime = today.AddDays(2).AddHours(10), EndTime = today.AddDays(2).AddHours(11), IsAllDay = false },\n                new AppointmentData { Id = 28, Subject = \"Weekly Demo\",   StartTime = today.AddDays(5).AddHours(15), EndTime = today.AddDays(5).AddHours(16), IsAllDay = false },\n                new AppointmentData { Id = 29, Subject = \"Daily Testing\", StartTime = today.AddDays(3).AddHours(13), EndTime = today.AddDays(3).AddHours(14), IsAllDay = false },\n                new AppointmentData { Id = 30, Subject = \"Monthly Demo\",  StartTime = today.AddDays(45).AddHours(11), EndTime = today.AddDays(45).AddHours(12), IsAllDay = false }\n            };\n        }\n    }\n}\n\nnamespace EJ2MVCSampleBrowser.Controllers.Schedule\n{\n    public partial class ScheduleController : Controller\n    {\n        public ActionResult ExternalDragDrop()\n        {\n            ViewData[\"treeDataSource\"] = new ScheduleData().GetWaitingListData();\n            ViewData[\"datasource\"] = new ScheduleData().GetHospitalData();\n\n            List<ResourceDataSourceModel> departments = new List<ResourceDataSourceModel>();\n            departments.Add(new ResourceDataSourceModel { text = \"GENERAL\", id = 1, color = \"#bbdc00\" });\n            departments.Add(new ResourceDataSourceModel { text = \"DENTAL\", id = 2, color = \"#9e5fff\" });\n            ViewData[\"Departments\"] = departments;\n\n            List<ConsultantDataSourceModel> consultants = new List<ConsultantDataSourceModel>();\n            consultants.Add(new ConsultantDataSourceModel { text = \"Alice\", id = 1, groupId = 1, color = \"#bbdc00\", designation = \"Cardiologist\" });\n            consultants.Add(new ConsultantDataSourceModel { text = \"Nancy\", id = 2, groupId = 2, color = \"#9e5fff\", designation = \"Orthodontist\" });\n            ViewData[\"Consultants\"] = consultants;\n\n            ViewData[\"Resources\"] = new string[] { \"Departments\", \"Consultants\" };\n            return View(\"~/Views/Home/scheduler/external-drag-and-drop/Scheduler.cshtml\");\n        }\n    }\n}"
    }
  ]
}