public int AddLogUser(LogUser Record)
 {
     connect();
     string sql = String.Format("INSERT INTO `log_user` (`Time`,`UserID`,`Action`) VALUE ('{0}','{1}','{2}');",
         Record.Time.ToString("yyyy-MM-dd HH:mm:ss"), Record.UserID, Record.Action);
     MySqlCommand cmd = new MySqlCommand(sql, conn);
     int result = cmd.ExecuteNonQuery();
     return result;
 }
        public int AddLogUser(LogUser Record)
        {
            connect();
            string sql = String.Format("INSERT INTO `log_user` (`Time`,`UserID`,`Action`) VALUE ('{0}','{1}','{2}');",
                                       Record.Time.ToString("yyyy-MM-dd HH:mm:ss"), Record.UserID, Record.Action);
            MySqlCommand cmd    = new MySqlCommand(sql, conn);
            int          result = cmd.ExecuteNonQuery();

            return(result);
        }
        public LogUser FindLogUser(int ID)
        {
            connect();
            string sql = String.Format("SELECT * FROM `log_user` WHERE `ID`={0};",
                                       ID);
            MySqlCommand    cmd = new MySqlCommand(sql, conn);
            MySqlDataReader rdr = cmd.ExecuteReader();

            rdr.Read();
            LogUser Record = new LogUser()
            {
                ID     = (int)rdr["ID"],
                Time   = (DateTime)rdr["Time"],
                UserID = (int)rdr["UserID"],
                Action = (string)rdr["Action"]
            };

            rdr.Close();
            return(Record);
        }
        public int AddLogUser(LogUser Record)
        {
            DatabaseConnector dc = new DatabaseConnector();

            return(dc.AddLogUser(Record));
        }
 public LogUser FindLogUser(int ID)
 {
     connect();
     string sql = String.Format("SELECT * FROM `log_user` WHERE `ID`={0};",
         ID);
     MySqlCommand cmd = new MySqlCommand(sql, conn);
     MySqlDataReader rdr = cmd.ExecuteReader();
     rdr.Read();
     LogUser Record = new LogUser() {
         ID = (int)rdr["ID"],
         Time = (DateTime)rdr["Time"],
         UserID = (int)rdr["UserID"],
         Action = (string)rdr["Action"]
     };
     rdr.Close();
     return Record;
 }
 public int AddLogUser(LogUser Record)
 {
     DatabaseConnector dc = new DatabaseConnector();
     return dc.AddLogUser(Record);
 }