public string userId() { GxConnection gxconn = _ds.Connection as GxConnection; if (gxconn != null && !String.IsNullOrEmpty(gxconn.InternalUserId)) { return(gxconn.InternalUserId); } else { GXLogging.Debug(log, "UserId method"); string stmt = ((GxDataRecord)_ds.Db).GetServerUserIdStmt(); if (string.IsNullOrEmpty(stmt)) { return(string.Empty); } else { GxCommand cmd = new GxCommand(_ds.Db, stmt, _ds, 0, false, true, _errorHandler); cmd.ErrorMask = GxErrorMask.GX_NOMASK | GxErrorMask.GX_MASKLOOPLOCK; IDataReader reader; cmd.FetchData(out reader); string s = string.Empty; if (reader != null) { s = reader.GetString(0); reader.Close(); } return(s); } } }
public WMIConnection(GxConnection connection) { try { this.connection = connection; Instrumentation.Publish(this); } catch (Exception e) { GXLogging.Error(log, "WMI Error", e); } }
public WMIConnection(GxConnection gxConnection) { this.gxConnection = gxConnection; }