private void OnTimedEvent(object source, ElapsedEventArgs e) { if (GestionDate.entre(1, 10)) { cloturerFiches(); } else if (GestionDate.entre(20, 31)) { rembourserFiches(); } }
public void rembourserFiches() { string date = DateTime.Now.Year.ToString() + GestionDate.getMoisPrecedent(); string req = " UPDATE fichefrais SET idetat = 'RB', datemodif = now() WHERE idetat = 'VA' OR idetat = 'MP' AND mois = " + date; try { ConnexionBDD conn = new ConnexionBDD(this.connectionString); conn.uneRequete(req); } catch (Exception ex) { creerLog("Remboursement Fiches : " + ex.ToString()); } }