5
This application has two tables: Students and Occurrences. To show the occurrences I can calmly... Only now I’ve come up with a new business rule: show occurrences by date. So basically it would be this, I would have to show the most current occurrences according to the date, ie, if for example I generated an occurrence yesterday, then it will show it in evidence above the others, but if I generate one today, this one today will have to be in evidence. For example, what happens here in Sopt. How could I use c# native formatting to display the date and time/minutes. That is, I wish I could show beyond the date, the hour and the minutes, because I need this data so that at the time of listing.
And how could I make this listing by putting the current one in view of the user, that is, in evidence ?
Here I will show how is the search I do in the bank to show the occurrences:
The Actionresult that scans the table and shows the data (which for now, I show the names, but I want to show the names and dates as described above):
public ActionResult Inicio()
{
List<Ocorrencia> resultado = db.Ocorrencias.Include(o => o.Aluno).ToList();
return View(resultado);
}
So basically I just look for the names, and with that the new occurrences are getting below the old ones, and that’s not what I need. I need the new ones, listed by date, stand up, in evidence.... But how do I do that ?
What you want to do is: sort the occurrences by date, and in the view display the date in the format
dd-MM-yyyy HH:mm
right?– CesarMiguel
Exactly that ! It is because the way it is, it lists all, and the order is: the new ones are under the old ones...
– Érik Thiago
@Have you noticed that all your posts need to be edited by other users? Take a look at how it’s getting after editing that people do to see how to use the editor correctly. What you get confused about.
– Maniero