예제 #1
0
        //need an OnAppearing for Scoring sheet to be set up in database and ID returned.
        protected override void OnAppearing()
        {
            DateTime tdy = DateTime.Today;

            date = tdy.ToString("d");
            string type = "Practice";

            if (PracID == -1)               //set to -1 in App constructor so that this does not refire a new save
            {
                Model.PracticeModel.rT = 0; //resets running total
                Model.DetailsModel details = new Model.DetailsModel();
                dtlIDPrac = details.SetDetails(date);


                Model.ScoringSheetModel scoringSheet = new Model.ScoringSheetModel();

                PracID = scoringSheet.SetScoringSheet(dtlIDPrac, type); // sets ID to the scoring sheet ID
                int p = PracID;                                         //seems to stop PracID being -1.
            }
        }
예제 #2
0
        //need an OnAppearing for Scoring sheet to be set up in database and ID returned.
        protected override void OnAppearing()
        {
            DateTime tdy = DateTime.Today;

            date = tdy.ToString("d");
            string type = "720Competition";

            if (ID == -1)                   //set to -1 in App constructor so that this does not refire on a back or refresh
            {
                Model.calcRTComp.curRT = 0; //resets running total

                Model.DetailsModel details = new Model.DetailsModel();
                dtlID = details.SetDetails(date);


                Model.ScoringSheetModel scoringSheet = new Model.ScoringSheetModel();
                // ID = App.Database.InsertScoringSheet(dtlID, type); // sets ID to the scoring sheet ID
                ID = scoringSheet.SetScoringSheet(dtlID, type);// sets ID to the scoring sheet ID
            }
        }