Giter Club home page Giter Club logo

ease-resource-allocation-using-the-scheduler-resource-view-in-wpf's Introduction

Ease resource allocation using the scheduler resource view in wpf

You can easily manage and allocate the resources in a calendar view by controlling the project tasks, time sheets, and employee’s availability in a manual approach by using scheduler resource view.

Resource Grouping

You can allocate the tasks to the employees either by date basis with the available resource or resource basis with the available dates by using the ResourceGroupType API in Scheduler class.

Resource sharing

You are free to assign as many resources as you wish to a task by assigning the Id of the resources in ResourceIdCollection API of the ScheduleAppointment class.

Data binding

You can create custom resource model with required field and it can be mapped to the equivalent properties in the ResourceMapping API in scheduler class.

Task reassignment

You can easily create, edit or delete the task dynamically using build in editor support, drag and drop support and appointment resizing support in Scheduler control.

Resource availability

You can easy manage and track the absence and unavailability of the resources by using the SpecialTimeRegions support,

/// <summary>   
/// Represents custom data properties.   
/// </summary> 
public class Employee
{
    public string Name { get; set; }
    public object ID { get; set; }
    public Brush BackgroundBrush { get; set; }
    public Brush ForegroundBrush { get; set; }
}
SpecialTimeRegion timeRegion = new SpecialTimeRegion();
timeRegion.Text = "Casual leave"
timeRegion.StartTime = new DateTime(currentDate.Year, currentDate.Month, currentDate.AddDays(2).Day, 0, 0, 0);
timeRegion.EndTime = new DateTime(currentDate.Year, currentDate.Month, currentDate.AddDays(3).Day, 0, 0, 0);
timeRegion.Background = new SolidColorBrush(Color.FromRgb(245, 245, 245));
timeRegion.ResourceIdCollection = new ObservableCollection<object>() { "1" };
scheduler.DaysViewSettings.SpecialTimeRegions = new ObservableCollection<SpecialTimeRegion>() { timeRegion };
        <syncfusion:SfScheduler ViewType="WorkWeek"
                                ResourceGroupType="Resource"
                                ItemsSource="{Binding Tasks}">
            <syncfusion:SfScheduler.ResourceMapping>
                <syncfusion:ResourceMapping 
                    Id="ID" 
                    Name="Name" 
                    Background="BackgroundBrush" 
                    Foreground="ForegroundBrush"/>
            </syncfusion:SfScheduler.ResourceMapping>
            <syncfusion:SfScheduler.ResourceCollection>
                <local:SchedulerResourceCollection>
                    <local:Employee Name="Sophia" ID="1" ForegroundBrush="White" BackgroundBrush="#9d65c9" />
                    <local:Employee Name="Kinsley Elena" ID="2" ForegroundBrush="White" BackgroundBrush="#f08a5d" />
                    <local:Employee Name="Adeline Ruby" ID="3" ForegroundBrush="White" BackgroundBrush="#679b9b" />
                </local:SchedulerResourceCollection>
            </syncfusion:SfScheduler.ResourceCollection>
        </syncfusion:SfScheduler>

Output

SchedulerResourceView

Customization

Scheduler resource view allows you to create different colors or even different views for resource view by using data templates and data-template selector support with ResourceHeaderTemplate and ResourceHeaderTemplateSelector APIs in scheduler class.

            <syncfusion:SfScheduler.ResourceHeaderTemplate>
                <DataTemplate>
                    <Grid Background="Transparent">
                        <StackPanel VerticalAlignment="Center" Orientation="Vertical">
                            <Border CornerRadius="36" Height="72" Width="72" BorderThickness="4" BorderBrush="{Binding BackgroundBrush}">
                                <Border CornerRadius="36" Height="64" Width="64" BorderThickness="4" BorderBrush="Transparent">
                                    <Image HorizontalAlignment="Center" VerticalAlignment="Center"
                                   Width="55"
                                   Height="55"
                                   Source="{Binding ImageSource}" />
                                </Border>
                            </Border>
                            <TextBlock HorizontalAlignment="Center"
                               VerticalAlignment="Center"
                               FontSize="15"
                               Text="{Binding Name}"/>
                            <TextBlock HorizontalAlignment="Center"
                               VerticalAlignment="Center"
                               FontSize="15"
                               Text="{Binding Designation}"/>
                        </StackPanel>
                    </Grid>
                </DataTemplate>
            </syncfusion:SfScheduler.ResourceHeaderTemplate>

Output

SchedulerTemplatedResourceView

ease-resource-allocation-using-the-scheduler-resource-view-in-wpf's People

Contributors

ganeshamoorthy10 avatar jeyasrivijay avatar sarubala20 avatar vinothkumar-ganesan avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.