示例#1
0
 static void Main()
 {
     if (testDate.dateGoTests() == 0)
     {
         if (GestionDate.Entre(1, 10))
         {
             BddMySql.bddMySql = BddMySql.GetInstance();
             BddMySql.ClotureFraisDuMois(GestionDate.getMoisPrecedent());
         }
         else if (DateTime.Now.Day == 20)
         {
             BddMySql.bddMySql = BddMySql.GetInstance();
             BddMySql.MajFicheValidéeToRb(GestionDate.getMoisPrecedent());
         }
     }
 }
示例#2
0
        public static int dateGoTests()
        {
            int nb = 0;

            if (GestionDate.getMoisPrecedent(new DateTime(1991, 10, 12)) != "09")
            {
                nb++;
            }
            if (GestionDate.getMoisSuivant(new DateTime(1991, 11, 9)) != "12")
            {
                nb++;
            }
            if (!GestionDate.Entre(1, 6, new DateTime(2001, 1, 5)))
            {
                nb++;
            }
            if (GestionDate.Entre(20, 30, new DateTime(2001, 1, 5)))
            {
                nb++;
            }

            return(nb);
        }