private void LoadPresence(DateTime d, Employe e) { object_statut.SetValueBar(0); Constantes.PBAR_WAIT = pbar_statut; position = 0; try { string query = "select p.* from yvs_grh_presence p inner join yvs_grh_employes e on p.employe = e.id inner join yvs_agences a on e.agence = a.id where a.societe = " + Constantes.SOCIETE.Id + " and p.date_debut = '" + d.ToShortDateString() + "' order by e.nom, e.prenom, p.heure_debut"; string queryCount = "select count(p.id) from yvs_grh_presence p inner join yvs_grh_employes e on p.employe = e.id inner join yvs_agences a on e.agence = a.id where a.societe = " + Constantes.SOCIETE.Id + " and p.date_debut = '" + d.ToShortDateString() + "'"; if (e != null ? e.Id > 0 : false) { query = "select p.* from yvs_grh_presence p where p.employe = " + e.Id + " and p.date_debut = '" + d.ToShortDateString() + "' order by heure_debut"; queryCount = "select count(p.id) from yvs_grh_presence p where p.employe = " + e.Id + " and p.date_debut = '" + d.ToShortDateString() + "'"; } presences = PresenceBLL.List(query, true, queryCount, Constantes.SOCIETE.AdresseIp); if (presences != null ? presences.Count > 0 : false) { LoadOnView(presences[0]); } else { ResetFiche(); if (e != null ? e.Id > 0 : false) { Utils.WriteLog(e.NomPrenom + " n'a pas de fiche de présence pour la date du " + dtp_date.Value.ToShortDateString()); } } } catch (Exception ex) { Messages.Exception("Form_Presence (LoadPresence)", ex); } }
public void RunContinuous() { if (pbar_start.Value == maximun) { _pbar.SetValueBar(0); } else { _pbar.UpdateSimpleBar(1); } }