Back to OIM Explorer

QER.Forms/QER.Forms/FormITShopUnsubscribeOrder.cs

Decompiler Source FileQER.Forms.FormITShopUnsubscribeOrderDecompiled Source

3 extracted method/event/call references in FormITShopUnsubscribeOrder.

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

Source size: 7.686 characters

Interpretation

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

Relations

  • CallMethod: Unsubscribe at line 130
  • CallMethod: Unsubscribe at line 134
  • CallMethod: PrepareForMethod at line 160

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 FormITShopUnsubscribeOrder; methods OnInit, OnResetForm, OnFormLoad, FormTaskUnSubscribe, InitializeComponent, MainActivator_OnActivating; references AccProduct, Department, ESet, Person, ProfitCenter, WorkDesk; markers reads entity values, references DB/Dialog objects, IT Shop related markers

Classes

FormITShopUnsubscribeOrder

OIM key/entity markers

UID_Department UID_ProfitCenter UID_Org UID_AccProduct ObjectKeyAssignment

API/entity calls

GetValue CreateSingle User Source CreateSingleDbObject GetConnection MetaData

Registrations / handlers

None extracted.

Complete Source

C#217 lines
1using System;2using VI.Base;3using VI.Controls;4using VI.Controls.Interfaces;5using VI.DB;6using VI.DB.Compatibility;7using VI.DB.Entities;8using VI.DB.Sync;9using VI.FormBase;10using VI.FormBase.Tasks;11using VI.FormCustomizers;12using VI.FormTools;1314namespace QER.Forms;1516public class FormITShopUnsubscribeOrder : BaseCustomizer17{18	private bool m_IsAssignmentOrder;1920	private IActivatorComponent m_MainActivator;2122	private IButton m_CommandUnsubscribeOrder;2324	private IDateButton m_ButtonValidUntilUnsubscribe;2526	private IEdit m_EditDisplayObjectKeyAssignment;2728	private IEdit m_EditDisplayOrg;2930	private IEdit m_EditDisplayOrgParentOfParent;3132	private IEdit m_EditMNTable;3334	private IEdit m_EditOrderDate;3536	private IEdit m_EditOrderreason;3738	private IEdit m_EditReason;3940	private IEdit m_EditValidUntilUnsubscribe;4142	private IHorizFormBar m_HorizFormBar;4344	private IImageBox m_ImageBoxJpegPhoto;4546	private ILinkComboBox m_FKLinkUIDPersonOrdered;4748	private ILinkComboBox m_FKLinkUIDWorkdeskOrdered;4950	private ITreeComboBox m_TreeComboBoxUIDDepartment;5152	private ITreeComboBox m_TreeComboBoxUIDProfitcenter;5354	private IVIPanel m_MainPanel;5556	private IObjectChangeComponent m_ObjectChangeComponent;5758	protected override void OnInit()59	{60		base.OnInit();61		try62		{63			m_ButtonValidUntilUnsubscribe = base.Form.GetControl<IDateButton>("ButtonValidUntilUnsubscribe");64			m_CommandUnsubscribeOrder = base.Form.GetControl<IButton>("CommandUnsubscribeOrder");65			m_EditDisplayObjectKeyAssignment = base.Form.GetControl<IEdit>("EditDisplayObjectKeyAssignment");66			m_EditDisplayOrg = base.Form.GetControl<IEdit>("EditDisplayOrg");67			m_EditDisplayOrgParentOfParent = base.Form.GetControl<IEdit>("EditDisplayOrgParentOfParent");68			m_EditMNTable = base.Form.GetControl<IEdit>("EditMNTable");69			m_EditOrderDate = base.Form.GetControl<IEdit>("EditOrderDate");70			m_EditOrderreason = base.Form.GetControl<IEdit>("EditOrderreason");71			m_EditReason = base.Form.GetControl<IEdit>("EditReason");72			m_EditValidUntilUnsubscribe = base.Form.GetControl<IEdit>("EditValidUntilUnsubscribe");73			m_FKLinkUIDPersonOrdered = base.Form.GetControl<ILinkComboBox>("FKLinkUIDPersonOrdered");74			m_FKLinkUIDWorkdeskOrdered = base.Form.GetControl<ILinkComboBox>("FKLinkUIDWorkdeskOrdered");75			m_HorizFormBar = base.Form.GetControl<IHorizFormBar>("HorizFormBar");76			m_ImageBoxJpegPhoto = base.Form.GetControl<IImageBox>("ImageBoxJpegPhoto");77			m_MainActivator = base.Form.GetComponent<IActivatorComponent>("MainActivator");78			m_MainPanel = base.Form.GetControl<IVIPanel>("MainPanel");79			m_ObjectChangeComponent = base.Form.GetComponent<IObjectChangeComponent>("ObjectChangeComponent");80			m_TreeComboBoxUIDDepartment = base.Form.GetControl<ITreeComboBox>("TreeComboBoxUIDDepartment");81			m_TreeComboBoxUIDProfitcenter = base.Form.GetControl<ITreeComboBox>("TreeComboBoxUIDProfitcenter");82		}83		catch (System.Exception innerException)84		{85			throw new FormCustomizerException(874825, innerException, ((object)this).ToString());86		}87	}8889	protected override void OnResetForm()90	{91		base.OnResetForm();92		try93		{94			m_EditDisplayOrg.Focus();95		}96		catch (System.Exception innerException)97		{98			ExceptionMgr.Instance.HandleException((System.Exception)(object)new FormCustomizerException(929002, innerException), this);99		}100	}101102	protected override void OnFormLoad()103	{104		m_EditReason.Text = "";105		m_EditReason.Caption = "QER_FormITShopUnsubscribeOrder_Reason";106		m_IsAssignmentOrder = false;107		m_EditMNTable.Caption = "QER_FormITShopDecideOrder_OrderedAssignmentTable";108		using (new UpdateHelper(base.Tasks))109		{110			Task task = base.Tasks["UnSubscribe"];111			task.Caption = "QER_FormITShopUnsubscribeOrder_Task_Unsubscribe";112			task.TaskMethod = FormTaskUnSubscribe;113		}114	}115116	public void FormTaskUnSubscribe()117	{118		try119		{120			ISingleDbObject dbObject = m_MainActivator.DbObject;121			if (dbObject == null)122			{123				return;124			}125			using (new BusyIndicator(base.Session, BusyTime.Short))126			{127				System.DateTime valueSafe = dbObject.GetValueSafe("ValidUntilUnsubscribe", DbVal.MinDate);128				if (valueSafe != DbVal.MinDate)129				{130					dbObject.Custom.CallMethod("Unsubscribe", base.Session.User().Uid, m_EditReason.Text, null, valueSafe);131				}132				else133				{134					dbObject.Custom.CallMethod("Unsubscribe", base.Session.User().Uid, m_EditReason.Text);135				}136				dbObject.Save();137				dbObject.Load();138				m_CommandUnsubscribeOrder.Enabled = false;139				base.Tasks["UnSubscribe"].Enabled = false;140			}141			FormTool.ShowMessage("QER_FormITShopUnsubscribeOrder_Message_UnsubScribeOrderSuccess");142			CloseForm();143		}144		catch (System.Exception innerException)145		{146			ExceptionMgr.Instance.HandleException((System.Exception)(object)new FormCustomizerException(929001, innerException, BaseCustomizer.GetString("QER_FormITShopUnsubscribeOrder_Task_Unsubscribe").Replace("&", "")), this);147		}148	}149150	private void InitializeComponent()151	{152	}153154	private void MainActivator_OnActivating(object sender, EventArgs e)155	{156		ISingleDbObject dbObject = m_MainActivator.DbObject;157		if (dbObject != null)158		{159			m_CommandUnsubscribeOrder.Enabled = true;160			dbObject.Custom.CallMethod("PrepareForMethod", "Unsubscribe");161			m_TreeComboBoxUIDDepartment.VisibleByUser = dbObject["UID_Department"].MinLen > 0;162			m_TreeComboBoxUIDProfitcenter.VisibleByUser = dbObject["UID_ProfitCenter"].MinLen > 0;163			_HandleAssignmentOrderMode();164			DbVal value = dbObject.ObjectWalker.GetValue("FK(UID_Org).UID_AccProduct");165			m_ImageBoxJpegPhoto.DbObject = (base.Session.Source().TryGet(new DbObjectKey("AccProduct", value), out var entity) ? entity.CreateSingleDbObject(base.Session) : base.Session.GetConnection().CreateSingle("AccProduct"));166		}167	}168169	private void _HandleAssignmentOrderMode()170	{171		ISingleDbObject dbObject = m_MainActivator.DbObject;172		m_IsAssignmentOrder = dbObject != null && dbObject["ObjectKeyAssignment"].New.String.Length > 0;173		m_EditMNTable.VisibleByUser = m_IsAssignmentOrder;174		m_ImageBoxJpegPhoto.VisibleByUser = !m_IsAssignmentOrder;175		m_EditMNTable.Text = "";176		if (m_IsAssignmentOrder && dbObject != null)177		{178			DbObjectKey dbObjectKey = new DbObjectKey(dbObject["ObjectKeyAssignment"].New.String);179			m_EditMNTable.Text = base.Session.MetaData().GetTable(dbObjectKey.Tablename).Display.Translated;180		}181	}182183	private void CommandUnsubscribeOrder_OnClick(object sender, EventArgs e)184	{185		FormTaskUnSubscribe();186	}187188	private void ObjectChangeComponent_ColumnValueChanged(object sender, ColumnEventArgs e)189	{190		//IL_00b6: Unknown result type (might be due to invalid IL or missing references)191		//IL_00bb: Unknown result type (might be due to invalid IL or missing references)192		//IL_00eb: Unknown result type (might be due to invalid IL or missing references)193		try194		{195			string text = e.Column.Columnname.ToLowerInvariant();196			if (!(text == "isorderforworkdesk"))197			{198				if (text == "validuntilunsubscribe" && !DbVal.IsEmpty(e.NewValue, ValType.Date) && e.New.Date.TimeOfDay == TimeSpan.Zero)199				{200					e.Object["ValidUntilUnsubscribe"].NewValue = e.New.Date.Add(new TimeSpan(23, 59, 59));201				}202				return;203			}204			bool enabled = e.Column.ColDef.Enabled;205			using (new UpdateHelper(m_FKLinkUIDWorkdeskOrdered.ParentControl, ChangeType.Layout))206			{207				m_FKLinkUIDWorkdeskOrdered.VisibleByUser = enabled && e.New.Bool;208				m_FKLinkUIDPersonOrdered.VisibleByUser = enabled && !e.New.Bool;209			}210		}211		catch (System.Exception exception)212		{213			ExceptionMgr.Instance.HandleException(exception, this);214		}215	}216}217