Ejemplo n.º 1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            ///Instatiates the required objects to make the Picker view work
            ServerServices services = new ServerServices();

            Siteslist = services.GetSites();
        }
        /// <summary>
        /// if the Survey is vaild it
        /// Packages up the infomation into Bird Survey object, That can then be Transformed into a API readable format and then Posts the API Readable format
        /// and Goes back to the main menu
        /// </summary>

        public void SubmitSurvey()
        {
            var newSurvey = new BirdSurvey((DateTime)BADatePicker.Date, (DateTime)BAStartTImePicker.Date,
                                           (DateTime)BAEndTimePicker.Date, SiteMod.GetItem(SiteMod.Selectedindex), Sightings.ToArray(), BACommentText.Text);

            if (newSurvey.VaildforBirdSurvey())
            {
                ServerServices services = new ServerServices();

                services.SubmitBirdSurvey(newSurvey);

                this.NavigationController.PopViewController(true);
            }
        }