appointments, and the table also has a relationship to users. Right Click on Appointments, and Add A Query. If you try to do this under the screen, you will not be able to add the code.
Once you have the query, and rename it, you can click the Edit Additional Query Code button, on Properties.
The gorgous part of this, you can have a complex query, in my case there are three groups or'd togeather, and then on top of that we limit by user.
And it only takes a couple of lines.
partial void MyTodaysAppointments_PreprocessQuery(ref IQueryable<Appointment> query)
{
query = from Appointments in query
where Appointments.User.Name == Application.Current.User.Name
select Appointments;
}
0 comments:
Post a Comment