1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
| public void lycos()
{
listBoxResultat.Items.Clear();
try
{
dc.Credentials = System.Net.CredentialCache.DefaultCredentials;
var resultats = from Actions in dc.Actions
join User in dc.ListeDInformationsUtilisateur on Actions.AffectationId equals User.ID
join Contrats in dc.Contrats on Actions.ContratId equals Contrats.ID
join Clients in dc.Clients on Actions.ClientId equals Clients.ID
where Actions.ClientId == getIdClient(comboBoxClient.Text) && Actions.CategorieValue == comboBoxCate.Text
&& Actions.DateOuverture >= calendar1.SelectedDate && Actions.EtatValue == comboBoxEtat.Text
orderby Actions.DateOuverture descending
select new
{
Actions,
User,
Contrats,
Clients
};
MessageBox.Show("Tu va rentré dedans");
foreach (var ticket in resultats)
{
MessageBox.Show("Catégorie : " + ticket.Actions.CategorieValue + "\nClient : "+ticket.Clients.NomAbrégé
+"\nEtat : " + ticket.Actions.EtatValue+"\nAction : " + ticket.Actions.Action + "\nDate D'ouverture : " + ticket.Actions.DateOuverture
+ "\nContrat : " + ticket.Contrats.Contrat + "\nDate de cloture : " + ticket.Actions.DateCloture + "\nTemps passé : "+
ticket.Actions.TempsPassé+"\nAffectation : "+ticket.User.Compte+"\nDate d'execution : "+ ticket.Actions.DateDExecution +
"\nPriorité : "+ticket.Actions.PrioritéValue+ "\n");
}
MessageBox.Show("Tu es sortie");
}
catch
{
MessageBox.Show("Vous devriez saisir une date.");
}
} |