Example #1
0
        public List <String> ListOfStringDataGrid()
        {
            string        checkin;
            string        checkout;
            DateTime      checkoutcheck = new DateTime(0001, 01, 01, 00, 00, 00);
            DateTime      checkincheck  = new DateTime(0001, 01, 01, 00, 00, 00);
            List <string> temp          = new List <string>();

            if (CheckInDateTime == checkincheck)
            {
                checkin = "Has not entered yet!";
            }

            else
            {
                checkin = CheckInDateTime.ToString();
            }

            if (CheckOutDateTime == checkoutcheck)
            {
                checkout = "Has not left the event yet!";
            }

            else
            {
                checkout = CheckOutDateTime.ToString();
            }

            temp.Add(checkin);
            temp.Add(checkout);

            return(temp);
        }
Example #2
0
        public List <string> ListOfString()
        {
            string        checkin       = "";
            string        checkout      = "";
            string        status        = "";
            DateTime      checkoutcheck = new DateTime(0001, 01, 01, 00, 00, 00);
            DateTime      checkincheck  = new DateTime(0001, 01, 01, 00, 00, 00);
            List <string> temp          = new List <string>();

            if (CheckInDateTime == checkincheck && CheckOutDateTime == checkoutcheck)
            {
                checkin  = "...";
                checkout = "...";
                status   = "HAS NOT ENTERED THE EVENT";
            }
            else if (CheckOutDateTime == checkoutcheck && CheckInDateTime != checkincheck)
            {
                checkout = "HAS NOT LEFT THE EVENT YET";
                checkin  = CheckInDateTime.ToString();
                status   = "INSIDE THE EVENT";
            }
            else if (CheckInDateTime > CheckOutDateTime)
            {
                checkout = CheckOutDateTime.ToString();
                checkin  = CheckInDateTime.ToString();
                status   = "INSIDE THE EVENT";
            }
            else if (CheckOutDateTime > CheckInDateTime)
            {
                checkout = CheckOutDateTime.ToString();
                checkin  = CheckInDateTime.ToString();
                status   = "HAS LEFT THE EVENT";
            }

            temp.Add("Ticket ID: " + this.TicketID);
            temp.Add("Name: " + this.FirstName + " " + this.LastName);
            temp.Add("Date of registration: " + this.DateOfRegistration.ToString("D"));
            temp.Add("Date of birth: " + this.DateOfBirth.ToString("D"));
            temp.Add("Bracelet ID: " + this.BraceletID);
            temp.Add("Email: " + this.Email);
            temp.Add("Last checkin: " + checkin);
            temp.Add("Last checkout: " + checkout);
            temp.Add("Status: " + status);

            return(temp);
        }