Files
BeWoPlaner/BeWoPlanerMobil/Models/DevelopmentModel.cs
2020-12-30 12:30:33 +01:00

49 lines
1.7 KiB
C#

using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web.WebPages.Html;
using BeWoPlanerMobil.Controllers;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
using BS.Shared.Extensions;
namespace BeWoPlanerMobil.Models
{
public class DevelopmentModel : AbstractModel
{
public List<UserRightGroup> UserRightGroups { get; set; } = new List<UserRightGroup>();
public List<CompactCustomerDC> AllCustomers { get; set; } = new List<CompactCustomerDC>();
public List<CompactEmployeeDC> AllEmployees { get; set; } = new List<CompactEmployeeDC>();
[Display(Name = "Ersteller")]
public long? SelectedEmployeeOid { get; set; }
public List<SelectListItem> AvailableEmployees { get; set; } = new List<SelectListItem>();
public List<SelectListItem> AvailableCostbearerRelations { get; set; } = new List<SelectListItem>();
public List<CompactCustomerDC> SelectedCustomers { get; set; } = new List<CompactCustomerDC>();
public List<SelectListItem> AvailableCustomers { get; set; } = new List<SelectListItem>();
public List<ResourceDC> SelectedResources { get; set; } = new List<ResourceDC>();
public Dictionary<ValueListEntryDC, List<ResourceDC>> ResourceCategories2Resources { get; set; } = new Dictionary<ValueListEntryDC, List<ResourceDC>>();
public List<ResourceDC> AvailableResources
{
get
{
var result = new List<ResourceDC>();
ResourceCategories2Resources.DoForEach(rc2R =>
{
result.AddRangeIfElementsNotIn(rc2R.Value);
});
return result;
}
}
}
}