mardi 5 décembre 2017

How to resolve jqgrid cell update issue

I have a jqgrid that updates a couple of date fields and string field. Now I need to add a couple of fields that contain Decimal values but I get an error I don't know how to resolve. The error is Operator >= is not defined for IQueryable(of Decimla? and string). This happens after I find a value to compare against the value that is submitted to update.

ElseIf vField = "stColCred" And PropInfo.Name = "ColCredits" Then
Dim coltype As System.Type = PropInfo.PropertyType
Try
    If (String.IsNullOrEmpty(strVal)) Then
                    PropInfo.SetValue(ERec, Nothing, Nothing)
    Else
    Dim CC = (From c In _db.Courses
        Where c.CourseId = EID
        Select c.CollegeCredits).AsQueryable

   ***** the error Is that the Operator >= Is Not defined for iqueryable(of Decimal? And string)
   If (CC >= strVal) Then
         PropInfo.SetValue(ERec, strVal, Nothing)
   Else
         strUpdate = "You have entered College Credits that is not between 0.0 and 9.99"
   End If
End If
Catch ex As Exception
 strUpdate = "Could not update the College Credits"
End Try

So how do I evaluate the CC >= strVal to see if I can pass the value into the update statement?





Aucun commentaire:

Enregistrer un commentaire