Back to OIM Explorer

QER.Forms/QER.Forms/FormITShopPersonProlongateOrder.cs

Decompiler Source FileQER.Forms.FormITShopPersonProlongateOrderDecompiled Source

2 extracted method/event/call references in FormITShopPersonProlongateOrder.

Source: F:\Claude\.tmp\oim-decompiled-full\0994_One_Identity_Manager_QER.Forms.dll\QER.Forms\FormITShopPersonProlongateOrder.cs

Source size: 9.377 characters

Interpretation

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

Relations

  • CallMethod: PrepareForMethod at line 134
  • CallMethod: Prolongate at line 234

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 IT Shop related markers

Summary: classes FormITShopPersonProlongateOrder; methods OnInit, OnResetForm, InitializeComponent, MainActivator_OnActivating, _HandleAssignmentOrderMode, OnFormLoad; references AccProduct, Department, ESet, Person, ProfitCenter, WorkDesk; markers reads entity values, references DB/Dialog objects, IT Shop related markers

Classes

FormITShopPersonProlongateOrder

OIM key/entity markers

UID_ProfitCenter UID_Department UID_Org UID_AccProduct ObjectKeyAssignment

API/entity calls

GetValue CreateSingle Source CreateSingleDbObject GetConnection MetaData User

Registrations / handlers

None extracted.

Complete Source

C#271 lines
1using System;2using System.Collections;3using System.Collections.Generic;4using VI.Base;5using VI.Controls;6using VI.Controls.Interfaces;7using VI.DB;8using VI.DB.Compatibility;9using VI.DB.Entities;10using VI.DB.MetaData;11using VI.DB.Sync;12using VI.FormBase;13using VI.FormCustomizers;14using VI.FormTools;1516namespace QER.Forms;1718public class FormITShopPersonProlongateOrder : BaseCustomizer19{20	private bool m_IsAssignmentOrder;2122	private IActivatorComponent m_MainActivator;2324	private IButton m_CommandOrder;2526	private ICheckBox m_CheckBoxIsOrderForWorkdesk2;2728	private IDateButton m_ButtonValidUntil;2930	private IEdit m_EditDateActivated;3132	private IEdit m_EditDisplayOrg;3334	private IEdit m_EditDisplayOrgParent;3536	private IEdit m_EditDisplayOrgParentOfParent;3738	private IEdit m_EditDisplayPersonOrdered;3940	private IEdit m_EditMNTable;4142	private IEdit m_EditOrderReason;4344	private IEdit m_EditValidFrom;4546	private IEdit m_EditValidUntilNew;4748	private IEdit m_EditValidUntilOld;4950	private IHorizFormBar m_HorizFormBar;5152	private IImageBox m_ImageBoxJpegPhoto;5354	private ILinkComboBox m_FKLinkLeftObject;5556	private ILinkComboBox m_FKLinkRightObject;5758	private ILinkComboBox m_FKLinkUIDWorkdeskOrdered;5960	private ITreeComboBox m_TreeComboBoxUIDDepartment;6162	private ITreeComboBox m_TreeComboBoxUIDProfitcenter;6364	private IVIPanel m_MainPanel;6566	private IObjectChangeComponent m_ObjectChangeComponent;6768	protected override void OnInit()69	{70		base.OnInit();71		try72		{73			m_ButtonValidUntil = base.Form.GetControl<IDateButton>("ButtonValidUntil");74			m_CheckBoxIsOrderForWorkdesk2 = base.Form.GetControl<ICheckBox>("CheckBoxIsOrderForWorkdesk2");75			m_CommandOrder = base.Form.GetControl<IButton>("CommandOrder");76			m_EditDateActivated = base.Form.GetControl<IEdit>("EditDateActivated");77			m_EditDisplayOrg = base.Form.GetControl<IEdit>("EditDisplayOrg");78			m_EditDisplayOrgParent = base.Form.GetControl<IEdit>("EditDisplayOrgParent");79			m_EditDisplayOrgParentOfParent = base.Form.GetControl<IEdit>("EditDisplayOrgParentOfParent");80			m_EditDisplayPersonOrdered = base.Form.GetControl<IEdit>("EditDisplayPersonOrdered");81			m_EditMNTable = base.Form.GetControl<IEdit>("EditMNTable");82			m_EditOrderReason = base.Form.GetControl<IEdit>("EditOrderReason");83			m_EditValidFrom = base.Form.GetControl<IEdit>("EditValidFrom");84			m_EditValidUntilNew = base.Form.GetControl<IEdit>("EditValidUntilNew");85			m_EditValidUntilOld = base.Form.GetControl<IEdit>("EditValidUntilOld");86			m_FKLinkLeftObject = base.Form.GetControl<ILinkComboBox>("FKLinkLeftObject");87			m_FKLinkRightObject = base.Form.GetControl<ILinkComboBox>("FKLinkRightObject");88			m_FKLinkUIDWorkdeskOrdered = base.Form.GetControl<ILinkComboBox>("FKLinkUIDWorkdeskOrdered");89			m_HorizFormBar = base.Form.GetControl<IHorizFormBar>("HorizFormBar");90			m_ImageBoxJpegPhoto = base.Form.GetControl<IImageBox>("ImageBoxJpegPhoto");91			m_MainActivator = base.Form.GetComponent<IActivatorComponent>("MainActivator");92			m_MainPanel = base.Form.GetControl<IVIPanel>("MainPanel");93			m_ObjectChangeComponent = base.Form.GetComponent<IObjectChangeComponent>("ObjectChangeComponent");94			m_TreeComboBoxUIDDepartment = base.Form.GetControl<ITreeComboBox>("TreeComboBoxUIDDepartment");95			m_TreeComboBoxUIDProfitcenter = base.Form.GetControl<ITreeComboBox>("TreeComboBoxUIDProfitcenter");96		}97		catch (System.Exception innerException)98		{99			throw new FormCustomizerException(874825, innerException, ((object)this).ToString());100		}101	}102103	protected override void OnResetForm()104	{105		base.OnResetForm();106		try107		{108			m_EditOrderReason.Focus();109		}110		catch (System.Exception innerException)111		{112			ExceptionMgr.Instance.HandleException((System.Exception)(object)new FormCustomizerException(929002, innerException), this);113		}114	}115116	private void InitializeComponent()117	{118	}119120	private void MainActivator_OnActivating(object sender, EventArgs e)121	{122		try123		{124			ISingleDbObject dbObject = m_MainActivator.DbObject;125			if (dbObject != null)126			{127				IEntityMethod method = dbObject.GetEntity().GetMethod(base.Session, "Prolongate", typeof(string), typeof(System.DateTime), typeof(string), typeof(string));128				bool flag = method.Enabled && method.Visible;129				m_CommandOrder.Enabled = flag;130				m_EditOrderReason.EnabledByUser = flag;131				m_EditValidUntilNew.EnabledByUser = flag;132				m_EditOrderReason.Text = "";133				m_EditValidUntilNew.Text = "";134				dbObject.GetEntity().CallMethod("PrepareForMethod", "Prolongate");135				m_TreeComboBoxUIDProfitcenter.VisibleByUser = dbObject["UID_ProfitCenter"].MinLen > 0;136				m_TreeComboBoxUIDDepartment.VisibleByUser = dbObject["UID_Department"].MinLen > 0;137				_HandleAssignmentOrderMode();138				DbVal value = dbObject.ObjectWalker.GetValue("FK(UID_Org).UID_AccProduct");139				m_ImageBoxJpegPhoto.DbObject = (base.Session.Source().TryGet(new DbObjectKey("AccProduct", value), out var entity) ? entity.CreateSingleDbObject(base.Session) : base.Session.GetConnection().CreateSingle("AccProduct"));140			}141		}142		catch143		{144			m_CommandOrder.Enabled = false;145			throw;146		}147	}148149	private void _HandleAssignmentOrderMode()150	{151		ISingleDbObject dbObject = m_MainActivator.DbObject;152		m_IsAssignmentOrder = dbObject != null && dbObject["ObjectKeyAssignment"].New.String.Length > 0;153		m_FKLinkLeftObject.VisibleByUser = m_IsAssignmentOrder;154		m_FKLinkRightObject.VisibleByUser = m_IsAssignmentOrder;155		m_EditMNTable.VisibleByUser = m_IsAssignmentOrder;156		m_FKLinkLeftObject.DbObject = null;157		m_FKLinkRightObject.DbObject = null;158		m_ImageBoxJpegPhoto.VisibleByUser = !m_IsAssignmentOrder;159		m_EditMNTable.Text = "";160		if (!m_IsAssignmentOrder || dbObject == null)161		{162			return;163		}164		DbObjectKey dbObjectKey = new DbObjectKey(dbObject["ObjectKeyAssignment"].New.String);165		int num = 0;166		System.Collections.Generic.IEnumerator<IMetaColumn> enumerator = ((System.Collections.Generic.IEnumerable<IMetaColumn>)base.Session.MetaData().GetTable(dbObjectKey.Tablename).Columns).GetEnumerator();167		try168		{169			while (((System.Collections.IEnumerator)enumerator).MoveNext())170			{171				IMetaColumn current = enumerator.Current;172				if (current.IsFK && current.IsPK)173				{174					if (num == 0)175					{176						m_FKLinkLeftObject.ColumnName = current.Columnname;177					}178					else179					{180						m_FKLinkRightObject.ColumnName = current.Columnname;181					}182					num++;183				}184			}185		}186		finally187		{188			((System.IDisposable)enumerator)?.Dispose();189		}190		ISingleDbObject dbObject2 = base.Session.Source().Get(dbObjectKey).CreateSingleDbObject(base.Session);191		m_EditMNTable.Text = base.Session.MetaData().GetTable(dbObjectKey.Tablename).Display.Translated;192		m_FKLinkLeftObject.DbObject = dbObject2;193		m_FKLinkRightObject.DbObject = dbObject2;194	}195196	protected override void OnFormLoad()197	{198		m_EditValidUntilNew.Caption = "QER_FormITShopPersonProlongateOrder_ValidUntilNew";199		m_EditOrderReason.Caption = "QER_FormITShopPersonProlongateOrder_OrderReason";200		m_EditOrderReason.Text = "";201		m_EditValidUntilNew.Text = "";202		m_IsAssignmentOrder = false;203		m_EditMNTable.Caption = "QER_FormITShopOrder_OrderAssignmentTable";204	}205206	private void CommandOrder_OnClick(object sender, EventArgs e)207	{208		//IL_0064: Unknown result type (might be due to invalid IL or missing references)209		//IL_0069: Unknown result type (might be due to invalid IL or missing references)210		//IL_007d: Unknown result type (might be due to invalid IL or missing references)211		try212		{213			ISingleDbObject dbObject = m_MainActivator.DbObject;214			if (dbObject == null)215			{216				return;217			}218			System.DateTime dateTime;219			try220			{221				dateTime = System.DateTime.Parse(m_EditValidUntilNew.Text.Trim(), (IFormatProvider)(object)LanguageManager.Culture);222			}223			catch224			{225				FormTool.ShowMessage("QER_FormITShopPersonProlongateOrder_Message_ValidUntilPronlongationInvalid");226				return;227			}228			using (new BusyIndicator(base.Session, BusyTime.Short))229			{230				if (!DbVal.IsEmpty(dateTime, ValType.Date) && dateTime.TimeOfDay == TimeSpan.Zero)231				{232					dateTime = dateTime.Add(new TimeSpan(23, 59, 59));233				}234				dbObject.GetEntity().CallMethod("Prolongate", base.Session.User().Uid, dateTime, m_EditOrderReason.Text.TrimEnd(), "");235				dbObject.Save();236				dbObject.Load();237				m_EditValidUntilNew.EnabledByUser = false;238				m_CommandOrder.Enabled = false;239				m_EditOrderReason.EnabledByUser = false;240				FormTool.ShowMessage("QER_FormITShopOrder_Message_OrderSuccess");241				CloseForm();242			}243		}244		catch (System.Exception exception)245		{246			ExceptionMgr.Instance.HandleException(exception, this);247		}248	}249250	private void ObjectChangeComponent_ColumnValueChanged(object sender, ColumnEventArgs e)251	{252		try253		{254			if (e.Column.Columnname.ToLowerInvariant() == "isorderforworkdesk")255			{256				bool enabled = e.Column.ColDef.Enabled;257				using (new UpdateHelper(m_FKLinkUIDWorkdeskOrdered.ParentControl, ChangeType.Layout))258				{259					m_FKLinkUIDWorkdeskOrdered.VisibleByUser = enabled && e.New.Bool;260					m_EditDisplayPersonOrdered.VisibleByUser = enabled && !e.New.Bool;261					return;262				}263			}264		}265		catch (System.Exception exception)266		{267			ExceptionMgr.Instance.HandleException(exception, this);268		}269	}270}271