Exemplo n.º 1
0
        private void loginFunction()
        {
            User user = new User(Userglobals.uid);

            Role.UserLog log = new Role.UserLog(user, Logglobals.login.ToString("yyyy-MM-dd HH:mm:ss"), Logglobals.ip);

            Database.addLog(log);

            MySqlDataReader dataReader = DBConnection.getData("SELECT log_id FROM user_log WHERE user_id='" + user.UserId + "' and logged_in_dateTime='" + Logglobals.login.ToString("yyyy-MM-dd HH:mm:ss") + "'and ip ='" + Logglobals.ip + "'; ");

            while (dataReader.Read())
            {
                Logglobals.id = int.Parse(dataReader["log_id"].ToString());
            }
            dataReader.Close();
        }
Exemplo n.º 2
0
 public UserOperation(UserLog log, string operation, int id)
 {
     this.log       = log;
     this.operation = operation;
     this.Id        = id;
 }
Exemplo n.º 3
0
 public UserOperation(UserLog log, int opId, string operation)
 {
     this.log       = log;
     this.opId      = opId;
     this.operation = operation;
 }