Example #1
0
        private void cekTanggal()
        {
            DateTime today = System.DateTime.Now;

            string StodayDate = today.ToString("dd/MM/yy");
            string SlastDate  = TSC_C.ambilLastDate().ToString("dd/MM/yy");

            DateTime todayDate = DateTime.Parse(StodayDate);
            DateTime lastDate  = DateTime.Parse(SlastDate);

            if (lastDate == todayDate)
            {
                string theLast = TSC_C.ambilLastIDTransaksi();
                string idLast  = theLast.Substring(7);
                todayTransaction = int.Parse(idLast) + 1;
            }

            else if (lastDate < todayDate)
            {
                todayTransaction = 1;
            }
        }