Multiple Resources in Web Service Example

4 posts, 0 answers
  1. Jahan
    Jahan avatar
    2 posts
    Member since:
    Mar 2013

    Posted 24 Jul 2014 Link to this post

    Hello,
    I've downloaded the telerik scheduler.
    when I use the "RadSchedule Scenario Wizard"  to add Web Service with Customer Provider, everything works fine.
    I would like to make a change to allow Multiple Resources be selected.

    I can see the following code in MyDbSechedulerProvider.cs ... However I cannot select more than 1 teacher and 1 student per appointment


    public override IEnumerable<Resource> GetResourcesByType(RadScheduler owner, string resourceType)
    {
        switch (resourceType)
        {
            case "Teacher":
                return Teachers.Values;
     
            case "Student":
                return Students.Values;
     
            default:
                throw new InvalidOperationException("Unknown resource type: " + resourceType);
        }
    }
     
    public override IDictionary<ResourceType, IEnumerable<Resource>> GetResources(ISchedulerInfo schedulerInfo)
    {
        var resCollection = new Dictionary<ResourceType, IEnumerable<Resource>>();
     
        resCollection.Add(new ResourceType("Teacher", false), Teachers.Values);
        resCollection.Add(new ResourceType("Student", true), Students.Values);
     
        return resCollection;
    }
     
    public override IEnumerable<ResourceType> GetResourceTypes(RadScheduler owner)
    {
        var resourceTypes = new ResourceType[2];
        resourceTypes[0] = new ResourceType("Teacher", false);
        resourceTypes[1] = new ResourceType("Student", true);
     
        return resourceTypes;
    }
  2. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 29 Jul 2014 Link to this post

    Hi Jahan,

    We have used the following project to implement your scenario. Also, we are sending you a sample for a reference.

    Regards,
    Peter Filipov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jahan
    Jahan avatar
    2 posts
    Member since:
    Mar 2013

    Posted 29 Jul 2014 in reply to Peter Filipov Link to this post

    Is there any option to display a large list of resources.
    For example 30 rooms to choose from.

    I've tried to use the checkbox but it will make the advanced appointment screen too large to display (goes off the screen).
    Is there an alternative way of displaying them?

    Thank you
  5. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 01 Aug 2014 Link to this post

    Hello,

    Please find attached a sample project that implements a scenario where the students resource is displayed as RadComboBox with check box support. This allows you to check more than one student per appointment.

    Regards,
    Boyan Dimitrov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top