//===================================== // PerformanceIndicatorForm: unassigned Performance Indicator select public static List <PerformanceIndicator.Extend> UnassignedPerformanceIndicatorList(Guid PIFID, Guid GCAItemID) { LinqMicajahDataContext dc = new LinqMicajahDataContext(); Guid?refGCAId = null; if (GCAItemID != Guid.Empty) { refGCAId = GCAItemID; } ISingleResult <Sp_SelectUnassignedPerformanceIndicatorResult> result = dc.Sp_SelectUnassignedPerformanceIndicator(LinqMicajahDataContext.InstanceId, PIFID, refGCAId); List <PerformanceIndicator.Extend> lPI = new List <PerformanceIndicator.Extend>(); foreach (Sp_SelectUnassignedPerformanceIndicatorResult i in result) { PerformanceIndicator.Extend pi = new PerformanceIndicator.Extend(); pi.InstanceId = i.InstanceId == null ? Guid.Empty : (Guid)i.InstanceId; pi.PerformanceIndicatorID = i.PerformanceIndicatorID == null ? Guid.Empty : (Guid)i.PerformanceIndicatorID; pi.Name = i.Name.TrimEnd(); pi.Description = i.Description; pi.Code = i.Code; pi.GroupCategoryAspectID = i.GroupCategoryAspectID; pi.Status = i.Status; pi.Created = (DateTime)i.Created; pi.Updated = i.Updated; pi.SectorID = i.SectorID; pi.Help = i.Help; pi.RequirementID = i.RequirementID; pi.SectorName = i.Sector; pi.RequirementName = i.Requirement; pi.GCAName = i.GCA; lPI.Add(pi); } return(lPI); }