Esempio n. 1
0
        /// <summary>
        /// method to update an existing ski run
        /// </summary>
        /// <param name="skiRun">ski run object</param>
        public async void UpdateSkiRun(SkiRun skiRun)
        {
            DeleteSkiRun(skiRun.ID);
            InsertSkiRun(skiRun);

            await SkiRunsDataServiceXml.SaveObjectToXml(_skiRuns, "SkiRuns.xml");
        }
Esempio n. 2
0
        /// <summary>
        /// method to return a ski run object given the ID
        /// </summary>
        /// <param name="ID">int ID</param>
        /// <returns>ski run object</returns>
        public SkiRun GetSkiRunByID(int ID)
        {
            SkiRun skiRun = null;

            skiRun = _skiRuns[GetSkiRunByIndex(ID)];

            return(skiRun);
        }
Esempio n. 3
0
        /// <summary>
        /// method to add a new ski run
        /// </summary>
        /// <param name="_skiRun"></param>
        public async void InsertSkiRun(SkiRun skiRun)
        {
            _skiRuns.Add(skiRun);

            await SkiRunsDataServiceXml.SaveObjectToXml(_skiRuns, "SkiRuns.xml");
        }