/// <summary> /// Get the first day of the week an allocation occurs on and return it. /// This is considered the day of the allocation as a majority of cases a unit allocation /// will only fall on a single day of the week. /// </summary> /// <returns> /// The day of the week which the allocation falls on /// </returns> public static string DayOfWeek(this Allocation obj) { if (obj == null) { return("Invalid Allocation"); } return(obj.Schedule.DaysOfWeek.First().Day); }
/// <summary> /// Using XMLDocument process the timetable payload into usable /// Allocation objects /// </summary> /// <param name="data">The XML string</param> /// <returns></returns> private static void ProcessTimetableDump(string data) { XDocument doc = XDocument.Parse(data); _allocations = new List <Allocation>(); var allocations = doc.Root.Elements("allocation"); foreach (var a in allocations) { Allocation temp = new Allocation(); temp.Import(a.ToString()); _allocations.Add(temp); } }
public AllocationCard(Allocation allocation) { _vm = new AllocationViewModel(allocation); _content = new CardAllocation(_vm); }
public AllocationViewModel(Allocation allocation) { _allocation = allocation; }