© 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 for Census Top up Funding

Overview of Example

Just gets the set of appropriate pupil ids.

Example Call

        List<TopUp> tops = SIMSInterface.TopUpFunding.GetTopups();
            json = Newtonsoft.Json.JsonConvert.SerializeObject(tops, Formatting.Indented);
            System.IO.File.WriteAllText(Path.Combine(OutputFolder, "top_ups.json"), json);

Output Class

    public class TopUp
    {
        public int id { get; set; }
        public string name { get; set; }

    }

Code Sample

        public static List<TopUp> GetTopups()
        {
            List<TopUp> list = new List<TopUp>();
            SIMS.Processes.CensusImportTopupFundings ctups = new SIMS.Processes.CensusImportTopupFundings();
            ctups.PopulateMembersforBottomGrid("SPR","24");
            foreach (CensusTopupFundingMember s in ctups.TopupFundingMembersAdded.Value)
            {
                TopUp tu = new TopUp();
                tu.id = s.PersonID;
                tu.name = s.Forename + " " + s.PreferredSurname;
                list.Add(tu);
            }
            return list;

        }

Example Output

[
  {
    "id": 12108,
    "name": "Stephen Ackton"
  },
  {
    "id": 13318,
    "name": "Louie Allen"
  },