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

            SQL.run(request);
        }
Example #2
0
        public void insert()
        {
            string request =
                @"insert into " + tableName + @" (name) values
                    ('" + name + "')";

            SQL.run(request);
        }
Example #3
0
        public void update()
        {
            string request =
                @"Update " + tableName + @" set 
                    name = '" + name + @"'
                    where id = " + id;

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

            SQL.run(request);
        }
Example #5
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();
        }
Example #6
0
        public void delete()
        {
            string request = "delete from employees where id = '" + Id + "'";

            SQL.run(request);
        }
Example #7
0
        public void delete()
        {
            string request = "delete from " + tableName + " where id = " + id;

            SQL.run(request);
        }