3
I have a field in my application call txt_dataemissão
in the case and the current date, and I have another field txt_deadline
that I need you to show me in this capo the date counted with 7 days after the date of issue, and disregard the weekends, and possible to do directly in the code in c#, if yes how can I do this?
And if the issue date is Saturday or Sunday?
– PauloHDSousa
Its function
diaUltil
could be simplified in:return x.DayOfWeek == DayOfWeek.Sunday || x.DayOfWeek == DayOfWeek.Saturday
– Marconi
@Paulohdsousa are 7 days forward and not counting from the same '7 days after the date of issue'
– Leo Longhi
Thank you very much for the answer that was needed vlw.
– Junior Guerreiro
I understood, but so weekends are out of the question on this occasion, but even so Thanks for everyone’s attention. Vlw
– Junior Guerreiro
@Marconi to make more sense of the method, the best would be
return !(x.DayOfWeek == DayOfWeek.Sunday || x.DayOfWeek == DayOfWeek.Saturday)
I agree with you on being a better option, but so I thought it would be easier for AP to understand :)– Leo Longhi
@Leolonghi then I would exchange the order with which the Boleyans return, it makes more sense.
if (x.DayOfWeek == DayOfWeek.Sunday || x.DayOfWeek == DayOfWeek.Saturday)
 return true;...
But it turned out good anyway :)– Marconi