예제 #1
0
        public void insert()
        {
            string request =
                @"insert into employees (id, firstname, lastname, lastin) values
                    ('" + Id + "', '" + FirstName + "', '" + LastName + "', '" + SQL.getDateTimeString(LastMomentIn) + "')";

            SQL.run(request);
        }
예제 #2
0
        public void update()
        {
            string request =
                @"Update Employees set 
                    firstname = '" + FirstName + @"', 
                    lastname = '" + LastName + @"', 
                    lastin = '" + SQL.getDateTimeString(LastMomentIn) + @"' 
                    where id = '" + Id + "'";

            SQL.run(request);
        }
예제 #3
0
        public void punchOut()
        {
            string request =
                @"insert into activity 
                    (employeeid, timein, timeout) 
                    values('" + Id + "', '" + SQL.getDateTimeString(LastMomentIn) + "', '" + SQL.getDateTimeString(DateTime.Now) + "')";

            SQL.run(request);
            LastMomentIn = DateTime.MinValue;
            update();
        }