Esempio n. 1
0
        private void ManageMoreComplexDate(object cell2, int i, int columnIndexFile1, int columnIndexFile2, DateTime date1, string CurrentColumn)
        {
            if (cell2.Equals("NULL"))
            {
                if (date1.Year >= 1950)
                {
                    MessageInitializer.Init(i, columnIndexFile1, columnIndexFile2, CurrentColumn);
                }
            }
            else
            {
                DateTimeFormatInfo dfi = DateTimeFormatInfo.CurrentInfo;

                int weekNum = dfi.Calendar.GetWeekOfYear(
                    date1,
                    CalendarWeekRule.FirstDay,
                    DayOfWeek.Monday);
                string[] splitter = cell2.ToString().Split('/');
                string   week     = splitter[0];
                string   year     = splitter[1];
                if (!Convert.ToString(weekNum).Equals(week) || !date1.Year.Equals(year))
                {
                    MessageInitializer.Init(i, columnIndexFile1, columnIndexFile2, CurrentColumn);
                }
            }
        }
Esempio n. 2
0
 private void ManageOther(object cell1, object cell2, int i, int columnIndexFile1, int columnIndexFile2)
 {
     try
     {
         if (!cell1.Equals(cell2))
         {
             MessageInitializer.Init(i, columnIndexFile1, columnIndexFile2, CurrentColumn);
         }
     }
     catch (Exception excep)
     {
         Tools.Message.Show(excep.Message);
     }
 }
Esempio n. 3
0
 private void CompareDateHour(DateTime date1, int i, int columnIndexFile1, int columnIndexFile2, DateTime date2, string CurrentColumn)
 {
     if (!date1.Day.Equals(date2.Day))
     {
         MessageInitializer.Init(i, columnIndexFile1, columnIndexFile2, CurrentColumn);
     }
     else if (!date1.Month.Equals(date2.Month))
     {
         MessageInitializer.Init(i, columnIndexFile1, columnIndexFile2, CurrentColumn);
     }
     else if (!date1.Year.Equals(date2.Year))
     {
         MessageInitializer.Init(i, columnIndexFile1, columnIndexFile2, CurrentColumn);
     }
     else if (!date1.Hour.Equals(date2.Hour))
     {
         MessageInitializer.Init(i, columnIndexFile1, columnIndexFile2, CurrentColumn);
     }
     else if (!date1.Minute.Equals(date2.Minute))
     {
         MessageInitializer.Init(i, columnIndexFile1, columnIndexFile2, CurrentColumn);
     }
 }