public void insert() { string request = @"insert into employees (id, firstname, lastname, lastin) values ('" + Id + "', '" + FirstName + "', '" + LastName + "', '" + SQL.getDateTimeString(LastMomentIn) + "')"; SQL.run(request); }
public void update() { string request = @"Update Employees set firstname = '" + FirstName + @"', lastname = '" + LastName + @"', lastin = '" + SQL.getDateTimeString(LastMomentIn) + @"' where id = '" + Id + "'"; SQL.run(request); }
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(); }