Exemplo n.º 1
0
        private void Button_Click_2(object sender, RoutedEventArgs e)
        {
            try
            {
                bool isNum = int.TryParse(tbGrade.Text.ToString(), out int grade);
                //float fGrade = grade;
                if (isNum == true && grade >= 0 && grade < 4)
                {
                    tbGrade.Text = grade.ToString();
                    int aIndex = (dgstudentsScore.SelectedItem as StudentScoreDetail).gradeIndex;

                    Sqlite.ExecuteNonQuery(Query.updateGrade(aIndex, grade));

                    dgstudentsScore.ItemsSource = dataTracker.getStudentScoreList(groupId, aId);

                    dgstudentsScore.Items.Refresh();
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
Exemplo n.º 2
0
 public void updateStudentGrade(int index, int grade)
 {
     Sqlite.ExecuteNonQuery(Query.updateGrade(index, grade));
 }