private void Dial_Insert_Pointage_Load(object sender, EventArgs e) { if (parent != null) { string adresse = Constantes.SOCIETE.AdresseIp; IOEMDevice current = parent.currentPointage; employe = EmployeBLL.OneById(current.idwSEnrollNumber); txt_id.Text = employe.Id.ToString(); txt_matricule.Text = employe.Matricule; txt_noms.Text = employe.NomPrenom; txt_poste.Text = employe.Poste.Poste.Intitule; try { current_time = new DateTime(current.idwYear, current.idwMonth, current.idwDay, current.idwHour, current.idwMinute, current.idwSecond); dtp_decalage.Value = current_time; time_decalage = current_time; Presence presence = Fonctions.GetPresence(employe, current_time, true, adresse); if (presence != null ? presence.Id > 0 : false) { dtp_date_debut.Value = presence.DateDebut; dtp_date_fin.Value = presence.DateFinPrevu; dtp_heure_debut.Value = presence.HeureDebut; dtp_heure_fin.Value = presence.HeureFinPrevu; box_fich_exit.Image = global::ZK_Lymytz.Properties.Resources.vu; } else { Planning planning = Fonctions.GetPlanning(employe, new DateTime(current_time.Year, current_time.Month, current_time.Day, 0, 0, 0), adresse); dtp_date_debut.Value = planning.DateDebut; dtp_date_fin.Value = planning.DateFin; dtp_heure_debut.Value = planning.HeureDebut; dtp_heure_fin.Value = planning.HeureFin; } } catch (Exception ex) { } this.Text += " [" + current_time.ToShortTimeString() + "]"; } else { this.Dispose(); } }