Back to OIM Explorer

ATT.Forms/ATT.Forms/FormAttestationAdhoc.cs

Decompiler Source FileATT.Forms.FormAttestationAdhocDecompiled Source

2 extracted method/event/call references in FormAttestationAdhoc.

Source: F:\Claude\.tmp\oim-decompiled-full\0031_One_Identity_Manager_ATT.Forms.dll\ATT.Forms\FormAttestationAdhoc.cs

Source size: 7.906 characters

Interpretation

  • Decompiled source file. Use method/event registrations and call-site extraction to connect back to DialogMethod, QBMEvent, and API layers.

Relations

  • CallMethod: GetWhereClause at line 149
  • CallMethod: CreateAttestations at line 232

Typed Edges

  • No typed edges extracted for this source.

References

  • No direct source references extracted.

Referenced By

  • No direct source references extracted.

C# source-derived context

Generated by pattern extraction from the decompiled C# source and decompile index. This is factual source evidence, not inferred behavior.

reads entity values references DB/Dialog objects

Summary: classes FormAttestationAdhoc; methods OnInit, InitializeComponent, OnFormLoad, OnFormSizeChanged, MainActivator_OnActivating, _AdaptButtonState; references AttestationObject, AttestationPolicy, AttestationPolicyGroup, DialogTable, QERPickCategory, QERPickedItem; markers reads entity values, references DB/Dialog objects

Classes

FormAttestationAdhoc

OIM key/entity markers

UID_AttestationObject UID_DialogTable UID_QERPickCategory ObjectKeyItem

API/entity calls

GetValue MetaData From Source UidComparison

Registrations / handlers

None extracted.

Complete Source

C#242 lines
1using System;2using System.Collections;3using System.Collections.Generic;4using System.Drawing;5using System.Windows.Forms;6using VI.Base;7using VI.Controls;8using VI.Controls.Base;9using VI.Controls.Design;10using VI.Controls.Interfaces;11using VI.DB;12using VI.DB.Entities;13using VI.DB.MetaData;14using VI.DB.Sync;15using VI.FormBase;16using VI.FormCustomizers;17using VI.FormTools;18using VI.UI.Base.Controls;19using VI.UI.Base.Drawing;20using VI.UI.Base.Help;2122namespace ATT.Forms;2324[Help("Help\\Dialog\\FormAttestationAdhoc")]25public class FormAttestationAdhoc : BaseCustomizer26{27	private IActivatorComponent m_MainActivator;2829	private IButton m_ButtonAction;3031	private ITreeListControl m_TreeListObjects;3233	private IVIPanel m_MainPanel;3435	protected override void OnInit()36	{37		//IL_0131: Unknown result type (might be due to invalid IL or missing references)38		//IL_0143: Unknown result type (might be due to invalid IL or missing references)39		//IL_0161: Unknown result type (might be due to invalid IL or missing references)40		//IL_0167: Unknown result type (might be due to invalid IL or missing references)41		//IL_0171: Unknown result type (might be due to invalid IL or missing references)42		base.OnInit();43		try44		{45			m_ButtonAction = base.Form.GetControl<IButton>("ButtonAction");46			m_MainActivator = base.Form.GetComponent<IActivatorComponent>("MainActivator");47			m_MainPanel = base.Form.GetControl<IVIPanel>("MainPanel");48			m_TreeListObjects = base.Form.GetControl<ITreeListControl>("TreeListObjects");49			m_TreeListObjects.ShowNodeImages = false;50			m_TreeListObjects.ShowRootLines = false;51			if (AppData.Instance.AppType == AppType.Gui)52			{53				m_TreeListObjects.SelectionMode = SelectionMode.Multi;54			}55			CommonTools.SetProperty(m_TreeListObjects, "AutoSize", true);56			CommonTools.SetProperty(m_TreeListObjects, "MaxHeight", 400);57			m_TreeListObjects.Proxy.AddColumn("", 450);58			ITreeListColumn treeListColumn = m_TreeListObjects.Proxy.AddColumn("ATT_FormAttestationAdhoc_Attestation", 100);59			treeListColumn.ContentAlign = (HorizontalAlignment)2;60			treeListColumn.CaptionAlign = (HorizontalAlignment)2;61			m_TreeListObjects.Proxy.SubItemContentChanged += Proxy_SubItemContentChanged;62			base.Form.MainFrame.Size = new Size(620, 480);63			m_TreeListObjects.BackColor = DesignColors.GetColor(DesignColor.White);64			m_TreeListObjects.Proxy.Columns[1].BackColor = ColorTool.MixColor(DesignColors.GetColor(DesignColor.White), DesignColors.GetColor(DesignColor.Blue), 0.5f);65		}66		catch (System.Exception innerException)67		{68			throw new FormCustomizerException(874825, innerException, ((object)this).ToString());69		}70	}7172	private void InitializeComponent()73	{74	}7576	protected override void OnFormLoad()77	{78		m_ButtonAction.Caption = "ATT_FormAttestationAdhoc_Action";79	}8081	protected override void OnFormSizeChanged()82	{83		FormTool.StretchControl(m_TreeListObjects, ExtOrientation.Both, keepSpaceForScrollBars: true);84		m_TreeListObjects.Height = Math.Max(0, m_TreeListObjects.Height - 30);85	}8687	private void MainActivator_OnActivating(object sender, EventArgs e)88	{89		if (m_MainActivator.DbObject == null)90		{91			return;92		}93		try94		{95			_LoadObjects();96			for (IUIControl parentControl = m_MainPanel.ParentControl; parentControl != null; parentControl = parentControl.ParentControl)97			{98				if (parentControl is IVIPanel iVIPanel)99				{100					iVIPanel.ShowCaptionBar = false;101				}102			}103		}104		finally105		{106			_AdaptButtonState();107		}108	}109110	private void _AdaptButtonState()111	{112		ITreeListProxy proxy = m_TreeListObjects.Proxy;113		foreach (ITreeListNode item in (System.Collections.IEnumerable)proxy.GetNodes())114		{115			if ((bool)proxy.GetItem(item, 0).Data)116			{117				m_ButtonAction.Enabled = true;118				return;119			}120		}121		m_ButtonAction.Enabled = false;122	}123124	private void _LoadObjects()125	{126		using (new BusyIndicator(base.Session, BusyTime.Short))127		{128			using (new UpdateHelper(m_TreeListObjects))129			{130				ITreeListProxy proxy = m_TreeListObjects.Proxy;131				proxy.Clear();132				ISingleDbObject dbObject = m_MainActivator.DbObject;133				if (dbObject == null)134				{135					return;136				}137				m_TreeListObjects.Tag = null;138				proxy.Columns[0].Caption = null;139				IEntityCollection collection;140				if (dbObject.Tablename.Equals("AttestationPolicy", (StringComparison)5))141				{142					string tablename = dbObject.ObjectWalker["FK(UID_AttestationObject).FK(UID_DialogTable).TableName"].String;143					if (!base.Session.MetaData().TryGetTable(tablename, out var table) || table.IsDeactivated)144					{145						return;146					}147					m_TreeListObjects.Tag = table;148					proxy.Columns[0].Caption = table.Display.Translated;149					string whereClause = (dbObject.Custom.CallMethod("GetWhereClause") as string) ?? "";150					Query query = Query.From(tablename).Where(whereClause).SelectDisplays();151					if (table.Columns.IsAvailable("xobjectkey"))152					{153						query = query.Select("xobjectkey");154					}155					collection = base.Session.Source().GetCollection(query, EntityCollectionLoadType.LoadForeignDisplaysEvenWhenExpensive);156				}157				else158				{159					if (!dbObject.Tablename.Equals("AttestationPolicyGroup", (StringComparison)5))160					{161						return;162					}163					proxy.Columns[0].Caption = BaseCustomizer.GetString("ATT_FormAttestationAdhocObjectsHeaderCaption");164					Query query2 = Query.From("QERPickedItem").Where(base.SqlFormatter.UidComparison("UID_QERPickCategory", dbObject.GetValue<string>("UID_QERPickCategory"))).Select("ObjectKeyItem")165						.DisplayPattern("%ObjectKeyItem%");166					collection = base.Session.Source().GetCollection(query2, EntityCollectionLoadType.LoadForeignDisplaysEvenWhenExpensive);167				}168				if (collection == null)169				{170					return;171				}172				System.Collections.Generic.IEnumerator<IEntity> enumerator = ((System.Collections.Generic.IEnumerable<IEntity>)collection).GetEnumerator();173				try174				{175					while (((System.Collections.IEnumerator)enumerator).MoveNext())176					{177						IEntity current = enumerator.Current;178						ITreeListNode treeListNode = proxy.AddNode(current.Display, -1);179						treeListNode.Tag = current;180						proxy.AddItem(treeListNode, proxy.CreateCheckBoxItem(checkState: false));181					}182				}183				finally184				{185					((System.IDisposable)enumerator)?.Dispose();186				}187			}188		}189	}190191	private void Proxy_SubItemContentChanged(object sender, TreeListProxyEventArgs e)192	{193		try194		{195			_AdaptButtonState();196		}197		catch (System.Exception exception)198		{199			ExceptionMgr.Instance.HandleException(exception, this);200		}201	}202203	private void ButtonAction_Click(object sender, EventArgs e)204	{205		try206		{207			ISingleDbObject dbObject = m_MainActivator.DbObject;208			if (dbObject == null)209			{210				return;211			}212			using (new BusyIndicator(base.Session, BusyTime.Normal))213			{214				using Transaction transaction = new Transaction(base.Session);215				ITreeListProxy proxy = m_TreeListObjects.Proxy;216				List<string> val = new List<string>();217				foreach (ITreeListNode item in (System.Collections.IEnumerable)proxy.GetNodes())218				{219					if ((bool)proxy.GetItem(item, 0).Data)220					{221						string text = null;222						if (item.Tag is IEntity entity)223						{224							text = ((!(m_TreeListObjects.Tag is IMetaTable metaTable)) ? entity.GetValue<string>("ObjectKeyItem") : ((!metaTable.Columns.Contains("xobjectkey")) ? ((object)new DbObjectKey(metaTable, entity)).ToString() : entity.GetValue<string>("xobjectkey")));225						}226						if (!string.IsNullOrWhiteSpace(text))227						{228							val.Add(text);229						}230					}231				}232				dbObject.Custom.CallMethod("CreateAttestations", new object[1] { val.ToArray() });233				transaction.Commit();234			}235		}236		catch (System.Exception exception)237		{238			ExceptionMgr.Instance.HandleException(exception, this);239		}240	}241}242