© 2018 Capita Business Services Ltd. All rights reserved.

Capita Education Software Solutions is a trading name of Capita Business Services Ltd. Our Registered office is 30 Berners Street, London, W1T 3LR and our registered number is 02299747. Further information about Capita plc can be found in our legal statement.

SIMS 7 - Sample Code - Early Years Pupil Premium

Overview of Example

Obtain a list of early years pupil premium data.

Example Call

            List<PPDetail> popeye= SIMSInterface.PP.GetPP();
            json = Newtonsoft.Json.JsonConvert.SerializeObject(popeye, Formatting.Indented);
            System.IO.File.WriteAllText(Path.Combine(OutputFolder, "PP_Eyears.json"), json);

Output Class

 public class PPDetail
    {
        public int id { get; set; }
        public string name { get; set; }
        public DateTime Start { get; set; }
        public DateTime End { get; set; }

        public string AYFrom { get; set; }
        public string AYTo { get; set; }
        public string Reason { get; set; }


    }

Code Sample

public static List<PPDetail> GetPP()
{
    List<PPDetail> pPDetails = new List<PPDetail>();    
    SIMS.Processes.MaintainPupilPremium mpp 
= new SIMS.Processes.MaintainPupilPremium();
    mpp.LoadPremiumIndicators();
    foreach ( PupilPremiumDetail p in mpp.PupilPremiumDetails.Value)
    {
        if (p.PremiumTypeDes == "Early Years Pupil Premium" )
        {
            PPDetail pDetail = new PPDetail();
            pDetail.Reason = p.PremiumTypeDes;
            pDetail.AYFrom = p.AcadYear1;
            pDetail.AYTo = p.AcadYear2;
            pDetail.id = p.PersonID;
            pDetail.Start = p.PPFYStartDate;
            pDetail.End = p.PPFYEndDate;
            pDetail.name = p.Forename + " " + p.Surname;
            pPDetails.Add(pDetail);
        }
    }
    return pPDetails;
}

Example Output

Only available on Primary data