So I have this linq code and I am trying to get it to look at the datbase and what it is doing is pulling back the last record put into the database.
My asp page refreshes and displays the new information that was updated.
What I want is to have it so when a row has not been updated in 5 minutes that it turns the textbox red. I know how to do the change the textbox but I do not know how to search if a row was updated in the last 5 minutes or not. I do not want it to check if the textbox has changed or not becuase we use a lot of the same numbers and will read it as not changing.
This is what I have.
var RedLine4Sc1 = (from l in ***.***
where l.**_Port == 4 && l.**_Port == 1 && l.***_Number == 1 && l.Date_Processed >= startDateTime
select l.Date_Processed);
I know this is not correct because it is just seeing if the processed date is == to the time and I was just messing aorund with stuff.
Just tried this because figured it might be better but getting an error. Think it is because it does not see the datetime.
if (Convert.ToDateTime(RedLine4Sc1) >= redDateTime)
Any help would be appriciative.
Thanks.