Exemple #1
0
 void button_Click(object sender, EventArgs e)
 {
     try
     {
         int ScoreVal = Convert.ToInt32(etScoreNumber.Text);
         double CourseRating = Convert.ToDouble(etRating.Text);
         int CourseSlope = Convert.ToInt32(etSlope.Text);
         var dbC = new DbCommands(this);
         dbC.AddScore(ScoreVal, DateTime.Now, CourseRating, CourseSlope);
         IList<Score> allScores = dbC.GetAllScores();
         string outPut = "Total Records: " + allScores.Count.ToString();
         tvOutputVal.Text = outPut;
     }
     catch (System.Exception sysExc)
     {
         Toast.MakeText(this, sysExc.Message, ToastLength.Long);
     }
 }
Exemple #2
0
        }        // OnCreate

        void button_Click(object sender, EventArgs e)
        {
            try
            {
                int    ScoreVal     = Convert.ToInt32(etScoreNumber.Text);
                double CourseRating = Convert.ToDouble(etRating.Text);
                int    CourseSlope  = Convert.ToInt32(etSlope.Text);
                var    dbC          = new DbCommands(this);
                dbC.AddScore(ScoreVal, DateTime.Now, CourseRating, CourseSlope);
                IList <Score> allScores = dbC.GetAllScores();
                string        outPut    = "Total Records: " + allScores.Count.ToString();
                tvOutputVal.Text = outPut;
            }
            catch (System.Exception sysExc)
            {
                Toast.MakeText(this, sysExc.Message, ToastLength.Long);
            }
        }