ATT.Customizer/ATT.Customizer/AttestationCase.cs

Compact public source page. The previous oversized rendered HTML was archived outside the public site; this page keeps source-derived context plus a bounded excerpt for browsing/search.

original 1.28 MBcompact pageexcerpt 2 lines

Source-derived context

classes AttestationCase, MP, DecisionHistoryArgs, _003C_003Ec__DisplayClass4_0; methods _003C_Initialize_IsNotApprovedBefore_003Eb__0, MoveNext, SetStateMachine, OnSavingAsync, _Initialize_IsNotApprovedBefore, Handle_DecisionHistory; references AttestationCase, AttestationHelper, AttestationHistory, AttestationObject, AttestationPolicy, Delegation; markers reads entity values, references DB/Dialog objects, IT Shop related markers

Bounded excerpt

First lines from the rendered source block, bounded to keep the public page fast.

1using System;2using System.Collections;3using System.Collections.Generic;4using System.Data;5using System.Data.Common;6using System.Diagnostics;7using System.Globalization;8using System.IO;9using System.Runtime.CompilerServices;10using System.Runtime.InteropServices;11using System.Text;12using System.Threading;13using System.Threading.Tasks;14using QER.Customizer;15using VI.Base;16using VI.DB;17using VI.DB.DataAccess;18using VI.DB.Entities;19using VI.DB.MetaData;20using VI.DB.Sync;2122namespace ATT.Customizer;2324public class AttestationCase : CacheBasedEntityLogic25{26	private class MP27	{28		public string? Person;2930		public string? Message;3132		public string? PersonSub;3334		public bool Decision;3536		public int Number;3738		public System.DateTime Date;3940		public string? Justification;4142		public int Sublevel;43	}4445	private class DecisionHistoryArgs46	{47		[field: CompilerGenerated]48		public string? uidDecisionRule49		{50			[CompilerGenerated]51			get;52			[CompilerGenerated]53			set;54		}5556		[field: CompilerGenerated]57		public string? DecisionStep58		{59			[CompilerGenerated]60			get;61			[CompilerGenerated]62			set;63		}6465		[field: CompilerGenerated]66		public string? uidPerson67		{68			[CompilerGenerated]69			get;70			[CompilerGenerated]71			set;72		}7374		[field: CompilerGenerated]75		public System.DateTime Date76		{77			[CompilerGenerated]78			get;79			[CompilerGenerated]80			set;81		}8283		[field: CompilerGenerated]84		public string? Text85		{86			[CompilerGenerated]87			get;88			[CompilerGenerated]89			set;90		}9192		[field: CompilerGenerated]93		public bool SystemDecision94		{95			[CompilerGenerated]96			get;97			[CompilerGenerated]98			set;99		}100101		[field: CompilerGenerated]102		public string? uidPersonRelated103		{104			[CompilerGenerated]105			get;106			[CompilerGenerated]107			set;108		}109110		[field: CompilerGenerated]111		public int DecisionLevel112		{113			[CompilerGenerated]114			get;115			[CompilerGenerated]116			set;117		}118119		[field: CompilerGenerated]120		public bool IsToHideInHistory121		{122			[CompilerGenerated]123			get;124			[CompilerGenerated]125			set;126		}127128		[field: CompilerGenerated]129		public string? uidJustification130		{131			[CompilerGenerated]132			get;133			[CompilerGenerated]134			set;135		}136137		[field: CompilerGenerated]138		public int RulerLevel139		{140			[CompilerGenerated]141			get;142			[CompilerGenerated]143			set;144		}145146		public DecisionHistoryArgs(IEntity eAttestationCase)147		{148			Date = eAttestationCase.GetValue<System.DateTime>("DateHead");149			uidPerson = eAttestationCase.GetValue<string>("UID_PersonHead");150			Text = eAttestationCase.GetValue<string>("ReasonHead");151			DecisionLevel = eAttestationCase.GetValue<int>("DecisionLevel[o]");152			uidJustification = eAttestationCase.GetValue<string>("UID_QERJustification");153		}154	}155156	[CompilerGenerated]157	private sealed class _003C_003Ec__DisplayClass4_0158	{159		public LogicParameter lp;160161		internal ExpressionClause _003C_Initialize_IsNotApprovedBefore_003Eb__0(IExpressionContext c)162		{163			return c.Column("UID_AttestationPolicy") == lp.Entity.GetValue<string>("UID_AttestationPolicy") && c.Column("ObjectKeyBase") == lp.Entity.GetValue<string>("ObjectKeyBase") && c.Column("IsGranted") == true;164		}165	}166167	[StructLayout((LayoutKind)3)]168	[CompilerGenerated]169	private struct _003CAbort_OnSaving_003Ed__14 : IAsyncStateMachine170	{171		public int _003C_003E1__state;172173		public AsyncTaskMethodBuilder _003C_003Et__builder;174175		public IEntity entity;176177		public LogicReadWriteParameters parameter;178179		public CancellationToken ct;180181		public AttestationCase _003C_003E4__this;182183		public MP mp;184185		private LogicParameter _003Clp_003E5__2;186187		private ConfiguredTaskAwaiter _003C_003Eu__1;188189		private void MoveNext()190		{191			//IL_015e: Unknown result type (might be due to invalid IL or missing references)192			//IL_0163: Unknown result type (might be due to invalid IL or missing references)193			//IL_016a: Unknown result type (might be due to invalid IL or missing references)194			//IL_0022: Unknown result type (might be due to invalid IL or missing references)195			//IL_0126: Unknown result type (might be due to invalid IL or missing references)196			//IL_012b: Unknown result type (might be due to invalid IL or missing references)197			//IL_012e: Unknown result type (might be due to invalid IL or missing references)198			//IL_0133: Unknown result type (might be due to invalid IL or missing references)199			//IL_0147: Unknown result type (might be due to invalid IL or missing references)200			//IL_0148: Unknown result type (might be due to invalid IL or missing references)201			int num = _003C_003E1__state;202			AttestationCase attestationCase = _003C_003E4__this;203			try204			{205				ConfiguredTaskAwaiter val2;206				if (num != 0)207				{208					_003Clp_003E5__2 = new LogicParameter(entity, parameter, ct);209					if (!attestationCase.IsInternalProcess && !_003Clp_003E5__2.Session.User().IsAdministrativeAccount)210					{211						throw new ViException(2126323, ExceptionRelevance.EndUser);212					}213					_003Clp_003E5__2.Entity.SetValue("IsClosed", true);214					_003Clp_003E5__2.Entity.SetValue("ReasonHead", mp.Message);215					_003Clp_003E5__2.Entity.SetValue("UID_QERJustification", mp.Justification);216					_003Clp_003E5__2.Entity.SetValue("UID_PersonHead", null);217					_003Clp_003E5__2.Entity.SetValue("DateHead", _003Clp_003E5__2.ServerTime);218					ConfiguredTaskAwaitable val = Handle_DecisionHistory(_003Clp_003E5__2, DecisionType.Abort, new DecisionHistoryArgs(entity)219					{220						Text = mp.Message,221						SystemDecision = true222					}).ConfigureAwait(false);223					val2 = ((ConfiguredTaskAwaitable)(ref val)).GetAwaiter();224					if (!((ConfiguredTaskAwaiter)(ref val2)).IsCompleted)225					{226						num = (_003C_003E1__state = 0);227						_003C_003Eu__1 = val2;228						((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CAbort_OnSaving_003Ed__14>(ref val2, ref this);229						return;230					}231				}232				else233				{234					val2 = _003C_003Eu__1;235					_003C_003Eu__1 = default(ConfiguredTaskAwaiter);236					num = (_003C_003E1__state = -1);237				}238				((ConfiguredTaskAwaiter)(ref val2)).GetResult();239				attestationCase.GenerateOnSaved(_003Clp_003E5__2.Entity, "Aborted");240			}241			catch (System.Exception exception)242			{243				_003C_003E1__state = -2;244				_003Clp_003E5__2 = null;245				((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetException(exception);246				return;247			}248			_003C_003E1__state = -2;249			_003Clp_003E5__2 = null;250			((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetResult();251		}252253		[DebuggerHidden]254		private void SetStateMachine(IAsyncStateMachine stateMachine)255		{256			((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetStateMachine(stateMachine);257		}258	}259260	[StructLayout((LayoutKind)3)]261	[CompilerGenerated]262	private struct _003CAddAdditional_OnSaving_003Ed__20 : IAsyncStateMachine263	{264		public int _003C_003E1__state;265266		public AsyncTaskMethodBuilder _003C_003Et__builder;267268		public IEntity entity;269270		public LogicReadWriteParameters parameter;271272		public CancellationToken ct;273274		public MP mp;275276		public AttestationCase _003C_003E4__this;277278		private LogicParameter _003Clp_003E5__2;279280		private string _003CuidPersonDecision_003E5__3;281282		private string _003CstrReasonText_003E5__4;283284		private string _003CuidPersonAdditional_003E5__5;285286		private ISqlFormatter _003CfSql_003E5__6;287288		private IEntity _003CdbAttestationHelper_003E5__7;289290		private IEntityWalker _003CeWalker_003E5__8;291292		private ConfiguredTaskAwaiter<IEntity?> _003C_003Eu__1;293294		private ConfiguredTaskAwaiter _003C_003Eu__2;295296		private void MoveNext()297		{298			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)299			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)300			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)301			//IL_0179: Unknown result type (might be due to invalid IL or missing references)302			//IL_017e: Unknown result type (might be due to invalid IL or missing references)303			//IL_0186: Unknown result type (might be due to invalid IL or missing references)304			//IL_027f: Unknown result type (might be due to invalid IL or missing references)305			//IL_0284: Unknown result type (might be due to invalid IL or missing references)306			//IL_028c: Unknown result type (might be due to invalid IL or missing references)307			//IL_042c: Unknown result type (might be due to invalid IL or missing references)308			//IL_0431: Unknown result type (might be due to invalid IL or missing references)309			//IL_0439: Unknown result type (might be due to invalid IL or missing references)310			//IL_0032: Unknown result type (might be due to invalid IL or missing references)311			//IL_0099: Unknown result type (might be due to invalid IL or missing references)312			//IL_009e: Unknown result type (might be due to invalid IL or missing references)313			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)314			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)315			//IL_03ee: Unknown result type (might be due to invalid IL or missing references)316			//IL_03f3: Unknown result type (might be due to invalid IL or missing references)317			//IL_03f7: Unknown result type (might be due to invalid IL or missing references)318			//IL_03fc: Unknown result type (might be due to invalid IL or missing references)319			//IL_00bc: Unknown result type (might be due to invalid IL or missing references)320			//IL_00be: Unknown result type (might be due to invalid IL or missing references)321			//IL_013b: Unknown result type (might be due to invalid IL or missing references)322			//IL_0140: Unknown result type (might be due to invalid IL or missing references)323			//IL_0144: Unknown result type (might be due to invalid IL or missing references)324			//IL_0149: Unknown result type (might be due to invalid IL or missing references)325			//IL_0411: Unknown result type (might be due to invalid IL or missing references)326			//IL_0413: Unknown result type (might be due to invalid IL or missing references)327			//IL_015e: Unknown result type (might be due to invalid IL or missing references)328			//IL_0160: Unknown result type (might be due to invalid IL or missing references)329			//IL_0236: Unknown result type (might be due to invalid IL or missing references)330			//IL_0241: Unknown result type (might be due to invalid IL or missing references)331			//IL_0246: Unknown result type (might be due to invalid IL or missing references)332			//IL_024a: Unknown result type (might be due to invalid IL or missing references)333			//IL_024f: Unknown result type (might be due to invalid IL or missing references)334			//IL_0264: Unknown result type (might be due to invalid IL or missing references)335			//IL_0266: Unknown result type (might be due to invalid IL or missing references)336			int num = _003C_003E1__state;337			AttestationCase attestationCase = _003C_003E4__this;338			try339			{340				ConfiguredTaskAwaiter<IEntity> val2;341				ConfiguredTaskAwaiter val;342				ConfiguredTaskAwaitable val3;343				IEntity result;344				Dictionary<string, object> obj;345				Dictionary<string, object> parameters;346				switch (num)347				{348				default:349					_003Clp_003E5__2 = new LogicParameter(entity, parameter, ct);350					_003CuidPersonDecision_003E5__3 = mp.Person;351					_003CstrReasonText_003E5__4 = mp.Message;352					_003CuidPersonAdditional_003E5__5 = mp.PersonSub;353					_003CfSql_003E5__6 = _003Clp_003E5__2.SqlFormatter;354					val2 = GetAttestationHelper(_003Clp_003E5__2, _003CuidPersonAdditional_003E5__5, bDecision: true).ConfigureAwait(false).GetAwaiter();355					if (!val2.IsCompleted)356					{357						num = (_003C_003E1__state = 0);358						_003C_003Eu__1 = val2;359						((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IEntity>, _003CAddAdditional_OnSaving_003Ed__20>(ref val2, ref this);360						return;361					}362					goto IL_00f3;363				case 0:364					val2 = _003C_003Eu__1;365					_003C_003Eu__1 = default(ConfiguredTaskAwaiter<IEntity>);366					num = (_003C_003E1__state = -1);367					goto IL_00f3;368				case 1:369					val2 = _003C_003Eu__1;370					_003C_003Eu__1 = default(ConfiguredTaskAwaiter<IEntity>);371					num = (_003C_003E1__state = -1);372					goto IL_0195;373				case 2:374					val = _003C_003Eu__2;375					_003C_003Eu__2 = default(ConfiguredTaskAwaiter);376					num = (_003C_003E1__state = -1);377					goto IL_029b;378				case 3:379					{380						val = _003C_003Eu__2;381						_003C_003Eu__2 = default(ConfiguredTaskAwaiter);382						num = (_003C_003E1__state = -1);383						break;384					}385					IL_0195:386					result = val2.GetResult();387					_003CdbAttestationHelper_003E5__7 = result;388					if (_003CdbAttestationHelper_003E5__7 == null)389					{390						throw new ViException(2126172, ExceptionRelevance.EndUser);391					}392					_003CeWalker_003E5__8 = _003CdbAttestationHelper_003E5__7.CreateWalker(_003Clp_003E5__2.Session);393					if (!_003CeWalker_003E5__8.GetValue<bool>("FK(UID_QERWorkingStep).IsAdditionalAllowed"))394					{395						throw new ViException(2126367, ExceptionRelevance.EndUser);396					}397					_003CdbAttestationHelper_003E5__7.SetValue("UID_PersonAdditional", _003CuidPersonAdditional_003E5__5);398					_003CdbAttestationHelper_003E5__7.SetValue("ReasonHead", _003CstrReasonText_003E5__4);399					val3 = _003Clp_003E5__2.UnitOfWork.PutAsync(_003CdbAttestationHelper_003E5__7, _003Clp_003E5__2.CancellationToken).ConfigureAwait(false);400					val = ((ConfiguredTaskAwaitable)(ref val3)).GetAwaiter();401					if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)402					{403						num = (_003C_003E1__state = 2);404						_003C_003Eu__2 = val;405						((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CAddAdditional_OnSaving_003Ed__20>(ref val, ref this);406						return;407					}408					goto IL_029b;409					IL_00f3:410					result = val2.GetResult();411					_003CdbAttestationHelper_003E5__7 = result;412					if (_003CdbAttestationHelper_003E5__7 != null)413					{414						throw new ViException(2126380, ExceptionRelevance.EndUser);415					}416					val2 = GetAttestationHelper(_003Clp_003E5__2, _003CuidPersonDecision_003E5__3, bDecision: true, _003CfSql_003E5__6.EmptyClause("UID_PersonAdditional", ValType.String, FormatterOptions.NonUnicodeLiterals)).ConfigureAwait(false).GetAwaiter();417					if (!val2.IsCompleted)418					{419						num = (_003C_003E1__state = 1);420						_003C_003Eu__1 = val2;421						((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IEntity>, _003CAddAdditional_OnSaving_003Ed__20>(ref val2, ref this);422						return;423					}424					goto IL_0195;425					IL_029b:426					((ConfiguredTaskAwaiter)(ref val)).GetResult();427					_003Clp_003E5__2.Entity.SetValue("UID_PersonHead", _003CuidPersonDecision_003E5__3);428					_003Clp_003E5__2.Entity.SetValue("ReasonHead", _003CstrReasonText_003E5__4);429					_003Clp_003E5__2.Entity.SetValue("UID_QERJustification", mp.Justification);430					_003Clp_003E5__2.Entity.SetValue("DateHead", _003Clp_003E5__2.ServerTime);431					_003Clp_003E5__2.Entity.SetValue("IsReserved", false);432					obj = new Dictionary<string, object>((IEqualityComparer<string>)(object)StringComparer.OrdinalIgnoreCase);433					obj.Add("UID_PersonAdditional", (object)_003CuidPersonAdditional_003E5__5);434					obj.Add("UID_AttestationHelper", (object)_003CdbAttestationHelper_003E5__7.GetValue<string>("UID_AttestationHelper"));435					parameters = obj;436					attestationCase.GenerateOnSaved("AddAdditional", (IDictionary<string, object>)(object)parameters);437					val3 = Handle_DecisionHistory(_003Clp_003E5__2, DecisionType.AddAdditional, new DecisionHistoryArgs(_003Clp_003E5__2.Entity)438					{439						DecisionStep = _003CeWalker_003E5__8.GetValue("FK(UID_QERWorkingStep).Ident_PwODecisionStep"),440						uidPerson = _003CuidPersonDecision_003E5__3,441						Text = _003CstrReasonText_003E5__4,442						uidPersonRelated = _003CuidPersonAdditional_003E5__5,443						RulerLevel = _003CdbAttestationHelper_003E5__7.GetValue<int>("RulerLevel")444					}).ConfigureAwait(false);445					val = ((ConfiguredTaskAwaitable)(ref val3)).GetAwaiter();446					if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)447					{448						num = (_003C_003E1__state = 3);449						_003C_003Eu__2 = val;450						((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CAddAdditional_OnSaving_003Ed__20>(ref val, ref this);451						return;452					}453					break;454				}455				((ConfiguredTaskAwaiter)(ref val)).GetResult();456			}457			catch (System.Exception exception)458			{459				_003C_003E1__state = -2;460				_003Clp_003E5__2 = null;461				_003CuidPersonDecision_003E5__3 = null;462				_003CstrReasonText_003E5__4 = null;463				_003CuidPersonAdditional_003E5__5 = null;464				_003CfSql_003E5__6 = null;465				_003CdbAttestationHelper_003E5__7 = null;466				_003CeWalker_003E5__8 = null;467				((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetException(exception);468				return;469			}470			_003C_003E1__state = -2;471			_003Clp_003E5__2 = null;472			_003CuidPersonDecision_003E5__3 = null;473			_003CstrReasonText_003E5__4 = null;474			_003CuidPersonAdditional_003E5__5 = null;475			_003CfSql_003E5__6 = null;476			_003CdbAttestationHelper_003E5__7 = null;477			_003CeWalker_003E5__8 = null;478			((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetResult();479		}480481		[DebuggerHidden]482		private void SetStateMachine(IAsyncStateMachine stateMachine)483		{484			((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetStateMachine(stateMachine);485		}486	}487488	[StructLayout((LayoutKind)3)]489	[CompilerGenerated]490	private struct _003CAddInsteadOf_OnSaving_003Ed__24 : IAsyncStateMachine491	{492		public int _003C_003E1__state;493494		public AsyncTaskMethodBuilder _003C_003Et__builder;495496		public IEntity entity;497498		public LogicReadWriteParameters parameter;499500		public CancellationToken ct;501502		public MP mp;503504		public AttestationCase _003C_003E4__this;505506		private LogicParameter _003Clp_003E5__2;507508		private string _003CuidPersonDecision_003E5__3;509510		private string _003CstrReasonText_003E5__4;511512		private string _003CuidPersonInsteadOf_003E5__5;513514		private ISqlFormatter _003CfSql_003E5__6;515516		private IEntity _003CdbAttestationHelper_003E5__7;517518		private IEntityWalker _003CeWalker_003E5__8;519520		private ConfiguredTaskAwaiter<IEntity?> _003C_003Eu__1;521522		private ConfiguredTaskAwaiter _003C_003Eu__2;523524		private void MoveNext()525		{526			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)527			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)528			//IL_00fb: Unknown result type (might be due to invalid IL or missing references)529			//IL_016f: Unknown result type (might be due to invalid IL or missing references)530			//IL_0174: Unknown result type (might be due to invalid IL or missing references)531			//IL_017b: Unknown result type (might be due to invalid IL or missing references)532			//IL_0210: Unknown result type (might be due to invalid IL or missing references)533			//IL_0215: Unknown result type (might be due to invalid IL or missing references)534			//IL_021c: Unknown result type (might be due to invalid IL or missing references)535			//IL_032c: Unknown result type (might be due to invalid IL or missing references)536			//IL_0331: Unknown result type (might be due to invalid IL or missing references)537			//IL_0339: Unknown result type (might be due to invalid IL or missing references)538			//IL_04de: Unknown result type (might be due to invalid IL or missing references)539			//IL_04e3: Unknown result type (might be due to invalid IL or missing references)540			//IL_04eb: Unknown result type (might be due to invalid IL or missing references)541			//IL_0036: Unknown result type (might be due to invalid IL or missing references)542			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)543			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)544			//IL_00bc: Unknown result type (might be due to invalid IL or missing references)545			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)546			//IL_04a0: Unknown result type (might be due to invalid IL or missing references)547			//IL_04a5: Unknown result type (might be due to invalid IL or missing references)548			//IL_04a9: Unknown result type (might be due to invalid IL or missing references)549			//IL_04ae: Unknown result type (might be due to invalid IL or missing references)550			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)551			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)552			//IL_0133: Unknown result type (might be due to invalid IL or missing references)553			//IL_0138: Unknown result type (might be due to invalid IL or missing references)554			//IL_013c: Unknown result type (might be due to invalid IL or missing references)555			//IL_0141: Unknown result type (might be due to invalid IL or missing references)556			//IL_01d4: Unknown result type (might be due to invalid IL or missing references)557			//IL_01d9: Unknown result type (might be due to invalid IL or missing references)558			//IL_01dd: Unknown result type (might be due to invalid IL or missing references)559			//IL_01e2: Unknown result type (might be due to invalid IL or missing references)560			//IL_04c3: Unknown result type (might be due to invalid IL or missing references)561			//IL_04c5: Unknown result type (might be due to invalid IL or missing references)562			//IL_0155: Unknown result type (might be due to invalid IL or missing references)563			//IL_0156: Unknown result type (might be due to invalid IL or missing references)564			//IL_01f6: Unknown result type (might be due to invalid IL or missing references)565			//IL_01f7: Unknown result type (might be due to invalid IL or missing references)566			//IL_02e3: Unknown result type (might be due to invalid IL or missing references)567			//IL_02ee: Unknown result type (might be due to invalid IL or missing references)568			//IL_02f3: Unknown result type (might be due to invalid IL or missing references)569			//IL_02f7: Unknown result type (might be due to invalid IL or missing references)570			//IL_02fc: Unknown result type (might be due to invalid IL or missing references)571			//IL_0311: Unknown result type (might be due to invalid IL or missing references)572			//IL_0313: Unknown result type (might be due to invalid IL or missing references)573			int num = _003C_003E1__state;574			AttestationCase attestationCase = _003C_003E4__this;575			try576			{577				ConfiguredTaskAwaiter<IEntity> val2;578				ConfiguredTaskAwaiter val;579				ConfiguredTaskAwaitable val3;580				IEntity result;581				Dictionary<string, object> obj;582				Dictionary<string, object> parameters;583				switch (num)584				{585				default:586					_003Clp_003E5__2 = new LogicParameter(entity, parameter, ct);587					_003CuidPersonDecision_003E5__3 = mp.Person;588					_003CstrReasonText_003E5__4 = mp.Message;589					_003CuidPersonInsteadOf_003E5__5 = mp.PersonSub;590					_003CfSql_003E5__6 = _003Clp_003E5__2.SqlFormatter;591					val2 = GetAttestationHelper(_003Clp_003E5__2, _003CuidPersonDecision_003E5__3, bDecision: false, _003CfSql_003E5__6.Comparison("IsFromDelegation", true, ValType.Bool)).ConfigureAwait(false).GetAwaiter();592					if (!val2.IsCompleted)593					{594						num = (_003C_003E1__state = 0);595						_003C_003Eu__1 = val2;596						((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IEntity>, _003CAddInsteadOf_OnSaving_003Ed__24>(ref val2, ref this);597						return;598					}599					goto IL_010a;600				case 0:601					val2 = _003C_003Eu__1;602					_003C_003Eu__1 = default(ConfiguredTaskAwaiter<IEntity>);603					num = (_003C_003E1__state = -1);604					goto IL_010a;605				case 1:606					val2 = _003C_003Eu__1;607					_003C_003Eu__1 = default(ConfiguredTaskAwaiter<IEntity>);608					num = (_003C_003E1__state = -1);609					goto IL_018a;610				case 2:611					val2 = _003C_003Eu__1;612					_003C_003Eu__1 = default(ConfiguredTaskAwaiter<IEntity>);613					num = (_003C_003E1__state = -1);614					goto IL_022b;615				case 3:616					val = _003C_003Eu__2;617					_003C_003Eu__2 = default(ConfiguredTaskAwaiter);618					num = (_003C_003E1__state = -1);619					goto IL_0348;620				case 4:621					{622						val = _003C_003Eu__2;623						_003C_003Eu__2 = default(ConfiguredTaskAwaiter);624						num = (_003C_003E1__state = -1);625						break;626					}627					IL_022b:628					result = val2.GetResult();629					_003CdbAttestationHelper_003E5__7 = result;630					if (_003CdbAttestationHelper_003E5__7 == null)631					{632						throw new ViException(2126172, ExceptionRelevance.EndUser);633					}634					_003CeWalker_003E5__8 = _003CdbAttestationHelper_003E5__7.CreateWalker(_003Clp_003E5__2.Session);635					if (!_003CeWalker_003E5__8.GetValue<bool>("FK(UID_QERWorkingStep).IsInsteadOfAllowed"))636					{637						throw new ViException(2126368, ExceptionRelevance.EndUser);638					}639					_003CdbAttestationHelper_003E5__7.SetValue("UID_PersonInsteadOf", _003CuidPersonInsteadOf_003E5__5);640					_003CdbAttestationHelper_003E5__7.SetValue("ReasonHead", _003CstrReasonText_003E5__4);641					_003CdbAttestationHelper_003E5__7.SetValue("Decision", "D");642					val3 = _003Clp_003E5__2.UnitOfWork.PutAsync(_003CdbAttestationHelper_003E5__7, _003Clp_003E5__2.CancellationToken).ConfigureAwait(false);643					val = ((ConfiguredTaskAwaitable)(ref val3)).GetAwaiter();644					if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)645					{646						num = (_003C_003E1__state = 3);647						_003C_003Eu__2 = val;648						((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CAddInsteadOf_OnSaving_003Ed__24>(ref val, ref this);649						return;650					}651					goto IL_0348;652					IL_010a:653					if (val2.GetResult() != null)654					{655						throw new ViException(2126391, ExceptionRelevance.EndUser);656					}657					val2 = GetAttestationHelper(_003Clp_003E5__2, _003CuidPersonInsteadOf_003E5__5, bDecision: true).ConfigureAwait(false).GetAwaiter();658					if (!val2.IsCompleted)659					{660						num = (_003C_003E1__state = 1);661						_003C_003Eu__1 = val2;662						((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IEntity>, _003CAddInsteadOf_OnSaving_003Ed__24>(ref val2, ref this);663						return;664					}665					goto IL_018a;666					IL_018a:667					result = val2.GetResult();668					_003CdbAttestationHelper_003E5__7 = result;669					if (_003CdbAttestationHelper_003E5__7 != null)670					{671						throw new ViException(2126380, ExceptionRelevance.EndUser);672					}673					val2 = GetAttestationHelper(_003Clp_003E5__2, _003CuidPersonDecision_003E5__3, bDecision: true, _003CfSql_003E5__6.EmptyClause("UID_PersonInsteadOf", ValType.String, FormatterOptions.NonUnicodeLiterals)).ConfigureAwait(false).GetAwaiter();674					if (!val2.IsCompleted)675					{676						num = (_003C_003E1__state = 2);677						_003C_003Eu__1 = val2;678						((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IEntity>, _003CAddInsteadOf_OnSaving_003Ed__24>(ref val2, ref this);679						return;680					}681					goto IL_022b;682					IL_0348:683					((ConfiguredTaskAwaiter)(ref val)).GetResult();684					_003Clp_003E5__2.Entity.SetValue("UID_PersonHead", _003CuidPersonDecision_003E5__3);685					_003Clp_003E5__2.Entity.SetValue("ReasonHead", _003CstrReasonText_003E5__4);686					_003Clp_003E5__2.Entity.SetValue("UID_QERJustification", mp.Justification);687					_003Clp_003E5__2.Entity.SetValue("DateHead", _003Clp_003E5__2.ServerTime);688					_003Clp_003E5__2.Entity.SetValue("IsReserved", false);689					obj = new Dictionary<string, object>((IEqualityComparer<string>)(object)StringComparer.OrdinalIgnoreCase);690					obj.Add("UID_PersonInsteadOf", (object)_003CuidPersonInsteadOf_003E5__5);691					obj.Add("UID_AttestationHelper", (object)_003CdbAttestationHelper_003E5__7.GetValue("UID_AttestationHelper").String);692					parameters = obj;693					attestationCase.GenerateOnSaved("AddInsteadOf", (IDictionary<string, object>)(object)parameters);694					val3 = Handle_DecisionHistory(_003Clp_003E5__2, DecisionType.AddInsteadOf, new DecisionHistoryArgs(_003Clp_003E5__2.Entity)695					{696						DecisionStep = _003CeWalker_003E5__8.GetValue("FK(UID_QERWorkingStep).Ident_PwODecisionStep"),697						uidPerson = _003CuidPersonDecision_003E5__3,698						Text = _003CstrReasonText_003E5__4,699						uidPersonRelated = _003CuidPersonInsteadOf_003E5__5,700						RulerLevel = _003CdbAttestationHelper_003E5__7.GetValue<int>("RulerLevel")701					}).ConfigureAwait(false);702					val = ((ConfiguredTaskAwaitable)(ref val3)).GetAwaiter();703					if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)704					{705						num = (_003C_003E1__state = 4);706						_003C_003Eu__2 = val;707						((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CAddInsteadOf_OnSaving_003Ed__24>(ref val, ref this);708						return;709					}710					break;711				}712				((ConfiguredTaskAwaiter)(ref val)).GetResult();713			}714			catch (System.Exception exception)715			{716				_003C_003E1__state = -2;717				_003Clp_003E5__2 = null;718				_003CuidPersonDecision_003E5__3 = null;719				_003CstrReasonText_003E5__4 = null;720				_003CuidPersonInsteadOf_003E5__5 = null;721				_003CfSql_003E5__6 = null;722				_003CdbAttestationHelper_003E5__7 = null;723				_003CeWalker_003E5__8 = null;724				((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetException(exception);725				return;726			}727			_003C_003E1__state = -2;728			_003Clp_003E5__2 = null;729			_003CuidPersonDecision_003E5__3 = null;730			_003CstrReasonText_003E5__4 = null;731			_003CuidPersonInsteadOf_003E5__5 = null;732			_003CfSql_003E5__6 = null;733			_003CdbAttestationHelper_003E5__7 = null;734			_003CeWalker_003E5__8 = null;735			((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetResult();736		}737738		[DebuggerHidden]739		private void SetStateMachine(IAsyncStateMachine stateMachine)740		{741			((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetStateMachine(stateMachine);742		}743	}744745	[StructLayout((LayoutKind)3)]746	[CompilerGenerated]747	private struct _003CAnswerFromPerson_OnSaving_003Ed__38 : IAsyncStateMachine748	{749		public int _003C_003E1__state;750751		public AsyncTaskMethodBuilder _003C_003Et__builder;752753		public IEntity entity;754755		public LogicReadWriteParameters parameter;756757		public CancellationToken ct;758759		public MP mp;760761		public AttestationCase _003C_003E4__this;762763		private LogicParameter _003Clp_003E5__2;764765		private string _003CuidAnswerPerson_003E5__3;766767		private string _003CstrAnswer_003E5__4;768769		private ConfiguredTaskAwaiter<int> _003C_003Eu__1;770771		private ConfiguredTaskAwaiter<IEntity> _003C_003Eu__2;772773		private ConfiguredTaskAwaiter _003C_003Eu__3;774775		private void MoveNext()776		{777			//IL_0166: Unknown result type (might be due to invalid IL or missing references)778			//IL_016b: Unknown result type (might be due to invalid IL or missing references)779			//IL_0173: Unknown result type (might be due to invalid IL or missing references)780			//IL_01fc: Unknown result type (might be due to invalid IL or missing references)781			//IL_0201: Unknown result type (might be due to invalid IL or missing references)782			//IL_0209: Unknown result type (might be due to invalid IL or missing references)783			//IL_02b0: Unknown result type (might be due to invalid IL or missing references)784			//IL_02b5: Unknown result type (might be due to invalid IL or missing references)785			//IL_02bd: Unknown result type (might be due to invalid IL or missing references)786			//IL_0329: Unknown result type (might be due to invalid IL or missing references)787			//IL_032e: Unknown result type (might be due to invalid IL or missing references)788			//IL_0336: Unknown result type (might be due to invalid IL or missing references)789			//IL_0032: Unknown result type (might be due to invalid IL or missing references)790			//IL_011d: Unknown result type (might be due to invalid IL or missing references)791			//IL_0128: Unknown result type (might be due to invalid IL or missing references)792			//IL_012d: Unknown result type (might be due to invalid IL or missing references)793			//IL_0131: Unknown result type (might be due to invalid IL or missing references)794			//IL_0136: Unknown result type (might be due to invalid IL or missing references)795			//IL_02ee: Unknown result type (might be due to invalid IL or missing references)796			//IL_02f3: Unknown result type (might be due to invalid IL or missing references)797			//IL_02f7: Unknown result type (might be due to invalid IL or missing references)798			//IL_02fc: Unknown result type (might be due to invalid IL or missing references)799			//IL_014b: Unknown result type (might be due to invalid IL or missing references)800			//IL_014d: Unknown result type (might be due to invalid IL or missing references)801			//IL_0272: Unknown result type (might be due to invalid IL or missing references)802			//IL_0277: Unknown result type (might be due to invalid IL or missing references)803			//IL_027b: Unknown result type (might be due to invalid IL or missing references)804			//IL_0280: Unknown result type (might be due to invalid IL or missing references)805			//IL_01b3: Unknown result type (might be due to invalid IL or missing references)806			//IL_01be: Unknown result type (might be due to invalid IL or missing references)807			//IL_01c3: Unknown result type (might be due to invalid IL or missing references)808			//IL_01c7: Unknown result type (might be due to invalid IL or missing references)809			//IL_01cc: Unknown result type (might be due to invalid IL or missing references)810			//IL_0311: Unknown result type (might be due to invalid IL or missing references)811			//IL_0313: Unknown result type (might be due to invalid IL or missing references)812			//IL_0295: Unknown result type (might be due to invalid IL or missing references)813			//IL_0297: Unknown result type (might be due to invalid IL or missing references)814			//IL_01e1: Unknown result type (might be due to invalid IL or missing references)815			//IL_01e3: Unknown result type (might be due to invalid IL or missing references)816			int num = _003C_003E1__state;817			AttestationCase attestationCase = _003C_003E4__this;818			try819			{820				ConfiguredTaskAwaiter<int> val3;821				ConfiguredTaskAwaiter<IEntity> val2;822				ConfiguredTaskAwaiter val;823				ConfiguredTaskAwaitable val4;824				IEntity result;825				switch (num)826				{827				default:828				{829					_003Clp_003E5__2 = new LogicParameter(entity, parameter, ct);830					_003CuidAnswerPerson_003E5__3 = mp.Person;831					_003CstrAnswer_003E5__4 = mp.Message;832					ISqlFormatter sqlFormatter = _003Clp_003E5__2.SqlFormatter;833					string text = sqlFormatter.AndRelation(sqlFormatter.UidComparison("UID_AttestationCase", _003Clp_003E5__2.Entity.GetValue<string>("UID_AttestationCase")), sqlFormatter.UidComparison("UID_PersonHead", _003CuidAnswerPerson_003E5__3), sqlFormatter.Comparison("LevelNumber", _003Clp_003E5__2.Entity.GetValue<int>("DecisionLevel"), ValType.Int), sqlFormatter.UidComparison("UID_PWODecisionRule", "ATT-PWODecisionRule-QP"));834					string statement = $"delete from AttestationHelper where {text}";835					val3 = _003Clp_003E5__2.DbSession.SqlExecuteNonQueryInContextAsync(_003Clp_003E5__2.Session, statement, _003Clp_003E5__2.CancellationToken).ConfigureAwait(false).GetAwaiter();836					if (!val3.IsCompleted)837					{838						num = (_003C_003E1__state = 0);839						_003C_003Eu__1 = val3;840						((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<int>, _003CAnswerFromPerson_OnSaving_003Ed__38>(ref val3, ref this);841						return;842					}843					goto IL_0182;844				}845				case 0:846					val3 = _003C_003Eu__1;847					_003C_003Eu__1 = default(ConfiguredTaskAwaiter<int>);848					num = (_003C_003E1__state = -1);849					goto IL_0182;850				case 1:851					val2 = _003C_003Eu__2;852					_003C_003Eu__2 = default(ConfiguredTaskAwaiter<IEntity>);853					num = (_003C_003E1__state = -1);854					goto IL_0218;855				case 2:856					val = _003C_003Eu__3;857					_003C_003Eu__3 = default(ConfiguredTaskAwaiter);858					num = (_003C_003E1__state = -1);859					goto IL_02cc;860				case 3:861					{862						val = _003C_003Eu__3;863						_003C_003Eu__3 = default(ConfiguredTaskAwaiter);864						num = (_003C_003E1__state = -1);865						break;866					}867					IL_02cc:868					((ConfiguredTaskAwaiter)(ref val)).GetResult();869					val4 = attestationCase.Handle_Events(_003Clp_003E5__2, DecisionType.Answer, _003CuidAnswerPerson_003E5__3, _003CstrAnswer_003E5__4, null).ConfigureAwait(false);870					val = ((ConfiguredTaskAwaitable)(ref val4)).GetAwaiter();871					if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)872					{873						num = (_003C_003E1__state = 3);874						_003C_003Eu__3 = val;875						((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CAnswerFromPerson_OnSaving_003Ed__38>(ref val, ref this);876						return;877					}878					break;879					IL_0182:880					if (val3.GetResult() == 0)881					{882						DbObjectKey objectKey = DbObjectKey.GetObjectKey("Person", _003CuidAnswerPerson_003E5__3);883						val2 = _003Clp_003E5__2.Session.Source().GetAsync(objectKey, ct).ConfigureAwait(false)884							.GetAwaiter();885						if (!val2.IsCompleted)886						{887							num = (_003C_003E1__state = 1);888							_003C_003Eu__2 = val2;889							((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IEntity>, _003CAnswerFromPerson_OnSaving_003Ed__38>(ref val2, ref this);890							return;891						}892						goto IL_0218;893					}894					val4 = Handle_DecisionHistory(_003Clp_003E5__2, DecisionType.Answer, new DecisionHistoryArgs(_003Clp_003E5__2.Entity)895					{896						uidPerson = _003CuidAnswerPerson_003E5__3,897						Text = _003CstrAnswer_003E5__4898					}).ConfigureAwait(false);899					val = ((ConfiguredTaskAwaitable)(ref val4)).GetAwaiter();900					if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)901					{902						num = (_003C_003E1__state = 2);903						_003C_003Eu__3 = val;904						((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CAnswerFromPerson_OnSaving_003Ed__38>(ref val, ref this);905						return;906					}907					goto IL_02cc;908					IL_0218:909					result = val2.GetResult();910					throw new ViException(2133233, ExceptionRelevance.EndUser, result.Display);911				}912				((ConfiguredTaskAwaiter)(ref val)).GetResult();913			}914			catch (System.Exception exception)915			{916				_003C_003E1__state = -2;917				_003Clp_003E5__2 = null;918				_003CuidAnswerPerson_003E5__3 = null;919				_003CstrAnswer_003E5__4 = null;920				((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetException(exception);921				return;922			}923			_003C_003E1__state = -2;924			_003Clp_003E5__2 = null;925			_003CuidAnswerPerson_003E5__3 = null;926			_003CstrAnswer_003E5__4 = null;927			((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetResult();928		}929930		[DebuggerHidden]931		private void SetStateMachine(IAsyncStateMachine stateMachine)932		{933			((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetStateMachine(stateMachine);934		}935	}936937	[StructLayout((LayoutKind)3)]938	[CompilerGenerated]939	private struct _003CCanRecallDecision_003Ed__43 : IAsyncStateMachine940	{941		public int _003C_003E1__state;942943		public AsyncTaskMethodBuilder<bool> _003C_003Et__builder;944945		public IEntity entity;946947		public string uidPerson;948949		public ISession session;950951		public CancellationToken ct;952953		private LogicParameter _003Clp_003E5__2;954955		private int _003CiCurrLevel_003E5__3;956957		private ConfiguredTaskAwaiter<int> _003C_003Eu__1;958959		private ConfiguredTaskAwaiter<bool> _003C_003Eu__2;960961		private void MoveNext()962		{963			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)964			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)965			//IL_00db: Unknown result type (might be due to invalid IL or missing references)966			//IL_01d6: Unknown result type (might be due to invalid IL or missing references)967			//IL_01db: Unknown result type (might be due to invalid IL or missing references)968			//IL_01e3: Unknown result type (might be due to invalid IL or missing references)969			//IL_0053: Unknown result type (might be due to invalid IL or missing references)970			//IL_0090: Unknown result type (might be due to invalid IL or missing references)971			//IL_0095: Unknown result type (might be due to invalid IL or missing references)972			//IL_0099: Unknown result type (might be due to invalid IL or missing references)973			//IL_009e: Unknown result type (might be due to invalid IL or missing references)974			//IL_0190: Unknown result type (might be due to invalid IL or missing references)975			//IL_019b: Unknown result type (might be due to invalid IL or missing references)976			//IL_01a0: Unknown result type (might be due to invalid IL or missing references)977			//IL_01a4: Unknown result type (might be due to invalid IL or missing references)978			//IL_01a9: Unknown result type (might be due to invalid IL or missing references)979			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)980			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)981			//IL_01be: Unknown result type (might be due to invalid IL or missing references)982			//IL_01c0: Unknown result type (might be due to invalid IL or missing references)983			int num = _003C_003E1__state;984			bool result;985			try986			{987				ConfiguredTaskAwaiter<int> val;988				if (num == 0)989				{990					val = _003C_003Eu__1;991					_003C_003Eu__1 = default(ConfiguredTaskAwaiter<int>);992					num = (_003C_003E1__state = -1);993					goto IL_00ea;994				}995				ConfiguredTaskAwaiter<bool> val2;996				if (num == 1)997				{998					val2 = _003C_003Eu__2;999					_003C_003Eu__2 = default(ConfiguredTaskAwaiter<bool>);1000					num = (_003C_003E1__state = -1);1001					goto IL_01f2;1002				}1003				if (string.Equals(entity.GetValue<string>("UID_PersonHead"), uidPerson))1004				{1005					_003Clp_003E5__2 = new LogicParameter(session, session.Resolve<IDbSession>(), entity, null, null, ct);1006					_003CiCurrLevel_003E5__3 = entity.GetValue<int>("DecisionLevel");1007					val = GetPriorDecisionLevel(_003Clp_003E5__2, uidPerson, _003CiCurrLevel_003E5__3).ConfigureAwait(false).GetAwaiter();1008					if (!val.IsCompleted)1009					{1010						num = (_003C_003E1__state = 0);1011						_003C_003Eu__1 = val;1012						_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<int>, _003CCanRecallDecision_003Ed__43>(ref val, ref this);1013						return;1014					}1015					goto IL_00ea;1016				}1017				result = false;1018				goto end_IL_0007;1019				IL_01f2:1020				result = !val2.GetResult();1021				goto end_IL_0007;1022				IL_00ea:1023				int result2 = val.GetResult();1024				if (result2 != -2147483648 && result2 != _003CiCurrLevel_003E5__3)1025				{1026					ISqlFormatter sqlFormatter = _003Clp_003E5__2.SqlFormatter;1027					string whereclause = sqlFormatter.AndRelation(sqlFormatter.UidComparison("UID_AttestationCase", _003Clp_003E5__2.Entity.GetValue("UID_AttestationCase")), sqlFormatter.Comparison("LevelNumber", _003CiCurrLevel_003E5__3, ValType.Int), sqlFormatter.Comparison("SubLevelNumber", 0, ValType.Int, CompareOperator.GreaterThan));1028					val2 = _003Clp_003E5__2.DbSession.ExistsAsync("AttestationHelper", whereclause, ct).ConfigureAwait(false).GetAwaiter();1029					if (!val2.IsCompleted)1030					{1031						num = (_003C_003E1__state = 1);1032						_003C_003Eu__2 = val2;1033						_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<bool>, _003CCanRecallDecision_003Ed__43>(ref val2, ref this);1034						return;1035					}1036					goto IL_01f2;1037				}1038				result = false;1039				end_IL_0007:;1040			}1041			catch (System.Exception exception)1042			{1043				_003C_003E1__state = -2;1044				_003Clp_003E5__2 = null;1045				_003C_003Et__builder.SetException(exception);1046				return;1047			}1048			_003C_003E1__state = -2;1049			_003Clp_003E5__2 = null;1050			_003C_003Et__builder.SetResult(result);1051		}10521053		[DebuggerHidden]1054		private void SetStateMachine(IAsyncStateMachine stateMachine)1055		{1056			_003C_003Et__builder.SetStateMachine(stateMachine);1057		}1058	}10591060	[StructLayout((LayoutKind)3)]1061	[CompilerGenerated]1062	private struct _003CCancelAttestation_OnSaving_003Ed__18 : IAsyncStateMachine1063	{1064		public int _003C_003E1__state;10651066		public AsyncTaskMethodBuilder _003C_003Et__builder;10671068		public IEntity entity;10691070		public LogicReadWriteParameters parameter;10711072		public CancellationToken ct;10731074		public MP mp;10751076		public AttestationCase _003C_003E4__this;10771078		private ConfiguredTaskAwaiter _003C_003Eu__1;10791080		private void MoveNext()1081		{1082			//IL_014f: Unknown result type (might be due to invalid IL or missing references)1083			//IL_0154: Unknown result type (might be due to invalid IL or missing references)1084			//IL_015c: Unknown result type (might be due to invalid IL or missing references)1085			//IL_0021: Unknown result type (might be due to invalid IL or missing references)1086			//IL_0114: Unknown result type (might be due to invalid IL or missing references)1087			//IL_0119: Unknown result type (might be due to invalid IL or missing references)1088			//IL_011d: Unknown result type (might be due to invalid IL or missing references)1089			//IL_0122: Unknown result type (might be due to invalid IL or missing references)1090			//IL_0137: Unknown result type (might be due to invalid IL or missing references)1091			//IL_0139: Unknown result type (might be due to invalid IL or missing references)1092			int num = _003C_003E1__state;1093			AttestationCase attestationCase = _003C_003E4__this;1094			try1095			{1096				ConfiguredTaskAwaiter val2;1097				if (num != 0)1098				{1099					LogicParameter logicParameter = new LogicParameter(entity, parameter, ct);1100					string person = mp.Person;1101					string message = mp.Message;1102					bool flag = string.Compare(person, "sa", (StringComparison)5) == 0 && (logicParameter.Session.User().IsAdministrativeAccount || attestationCase.IsInternalProcess);1103					logicParameter.Entity.SetValue("IsClosed", true);1104					logicParameter.Entity.SetValue("ReasonHead", message);1105					logicParameter.Entity.SetValue("UID_QERJustification", mp.Justification);1106					logicParameter.Entity.SetValue("UID_PersonHead", flag ? null : person);1107					logicParameter.Entity.SetValue("DateHead", logicParameter.ServerTime);1108					ConfiguredTaskAwaitable val = Handle_DecisionHistory(logicParameter, DecisionType.Cancel, new DecisionHistoryArgs(logicParameter.Entity)1109					{1110						uidPerson = person,1111						Text = message,1112						SystemDecision = flag1113					}).ConfigureAwait(false);1114					val2 = ((ConfiguredTaskAwaitable)(ref val)).GetAwaiter();1115					if (!((ConfiguredTaskAwaiter)(ref val2)).IsCompleted)1116					{1117						num = (_003C_003E1__state = 0);1118						_003C_003Eu__1 = val2;1119						((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CCancelAttestation_OnSaving_003Ed__18>(ref val2, ref this);1120						return;1121					}1122				}1123				else1124				{1125					val2 = _003C_003Eu__1;1126					_003C_003Eu__1 = default(ConfiguredTaskAwaiter);1127					num = (_003C_003E1__state = -1);1128				}1129				((ConfiguredTaskAwaiter)(ref val2)).GetResult();1130				attestationCase.GenerateOnSaved("Canceled");1131			}1132			catch (System.Exception exception)1133			{1134				_003C_003E1__state = -2;1135				((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetException(exception);1136				return;1137			}1138			_003C_003E1__state = -2;1139			((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetResult();1140		}11411142		[DebuggerHidden]1143		private void SetStateMachine(IAsyncStateMachine stateMachine)1144		{1145			((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetStateMachine(stateMachine);1146		}1147	}11481149	[StructLayout((LayoutKind)3)]1150	[CompilerGenerated]1151	private struct _003CDBSchedulerInsert_003Ed__59 : IAsyncStateMachine1152	{1153		public int _003C_003E1__state;11541155		public AsyncTaskMethodBuilder _003C_003Et__builder;11561157		public ISession session;11581159		public string operation;11601161		public IEntity entity;11621163		public CancellationToken ct;11641165		private ConfiguredTaskAwaiter<int> _003C_003Eu__1;11661167		private void MoveNext()1168		{1169			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)1170			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)1171			//IL_00f7: Unknown result type (might be due to invalid IL or missing references)1172			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)1173			//IL_00af: Unknown result type (might be due to invalid IL or missing references)1174			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)1175			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)1176			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)1177			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)1178			//IL_00d4: Unknown result type (might be due to invalid IL or missing references)1179			int num = _003C_003E1__state;1180			try1181			{1182				ConfiguredTaskAwaiter<int> val;1183				if (num != 0)1184				{1185					ISqlFormatter sqlFormatter = session.SqlFormatter();1186					string text = session.GenerateProcessId();1187					string statement = sqlFormatter.StoredProcedure(new SqlFunction("QBM", "GDBQueue", "PDBQueueInsert_Single"), sqlFormatter.FormatUidValue(operation), sqlFormatter.FormatUidValue(entity.GetValue<string>("UID_AttestationCase")), sqlFormatter.FormatValue("", ValType.String), sqlFormatter.FormatUidValue(text));1188					IDbSession dbSession = session.Resolve<IDbSession>();1189					DbContextData dbContextData = session.CreateContextData(text);1190					val = dbSession.SqlExecuteNonQueryInContextAsync(dbContextData, statement, ct).ConfigureAwait(false).GetAwaiter();1191					if (!val.IsCompleted)1192					{1193						num = (_003C_003E1__state = 0);1194						_003C_003Eu__1 = val;1195						((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<int>, _003CDBSchedulerInsert_003Ed__59>(ref val, ref this);1196						return;1197					}1198				}1199				else1200				{1201					val = _003C_003Eu__1;1202					_003C_003Eu__1 = default(ConfiguredTaskAwaiter<int>);1203					num = (_003C_003E1__state = -1);1204				}1205				val.GetResult();1206			}1207			catch (System.Exception exception)1208			{1209				_003C_003E1__state = -2;1210				((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetException(exception);1211				return;1212			}1213			_003C_003E1__state = -2;1214			((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetResult();1215		}12161217		[DebuggerHidden]1218		private void SetStateMachine(IAsyncStateMachine stateMachine)1219		{1220			((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetStateMachine(stateMachine);1221		}1222	}12231224	[StructLayout((LayoutKind)3)]1225	[CompilerGenerated]1226	private struct _003CDenyDecision_OnSaving_003Ed__26 : IAsyncStateMachine1227	{1228		public int _003C_003E1__state;12291230		public AsyncTaskMethodBuilder _003C_003Et__builder;12311232		public IEntity entity;12331234		public LogicReadWriteParameters parameter;12351236		public CancellationToken ct;12371238		public MP mp;12391240		public AttestationCase _003C_003E4__this;12411242		private LogicParameter _003Clp_003E5__2;12431244		private string _003CuidPersonDecision_003E5__3;12451246		private string _003CstrReasonText_003E5__4;12471248		private ISqlFormatter _003CfSql_003E5__5;12491250		private IEntity _003CdbAttestationHelper_003E5__6;12511252		private Dictionary<string, object> _003Cparam_003E5__7;12531254		private ConfiguredTaskAwaiter<IEntity?> _003C_003Eu__1;12551256		private ConfiguredTaskAwaiter _003C_003Eu__2;12571258		private ConfiguredTaskAwaiter<IEntityCollection> _003C_003Eu__3;12591260		private System.Collections.Generic.IEnumerator<IEntity> _003C_003E7__wrap7;12611262		private void MoveNext()1263		{1264			//IL_00df: Unknown result type (might be due to invalid IL or missing references)1265			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)1266			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)1267			//IL_01b8: Unknown result type (might be due to invalid IL or missing references)1268			//IL_01bd: Unknown result type (might be due to invalid IL or missing references)1269			//IL_01c5: Unknown result type (might be due to invalid IL or missing references)1270			//IL_0301: Unknown result type (might be due to invalid IL or missing references)1271			//IL_0306: Unknown result type (might be due to invalid IL or missing references)1272			//IL_030e: Unknown result type (might be due to invalid IL or missing references)1273			//IL_05c3: Unknown result type (might be due to invalid IL or missing references)1274			//IL_05c8: Unknown result type (might be due to invalid IL or missing references)1275			//IL_05d0: Unknown result type (might be due to invalid IL or missing references)1276			//IL_0036: Unknown result type (might be due to invalid IL or missing references)1277			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)1278			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)1279			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)1280			//IL_00af: Unknown result type (might be due to invalid IL or missing references)1281			//IL_02b8: Unknown result type (might be due to invalid IL or missing references)1282			//IL_02c3: Unknown result type (might be due to invalid IL or missing references)1283			//IL_02c8: Unknown result type (might be due to invalid IL or missing references)1284			//IL_02cc: Unknown result type (might be due to invalid IL or missing references)1285			//IL_02d1: Unknown result type (might be due to invalid IL or missing references)1286			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)1287			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)1288			//IL_02e6: Unknown result type (might be due to invalid IL or missing references)1289			//IL_02e8: Unknown result type (might be due to invalid IL or missing references)1290			//IL_0406: Unknown result type (might be due to invalid IL or missing references)1291			//IL_040b: Unknown result type (might be due to invalid IL or missing references)1292			//IL_0413: Unknown result type (might be due to invalid IL or missing references)1293			//IL_016f: Unknown result type (might be due to invalid IL or missing references)1294			//IL_017a: Unknown result type (might be due to invalid IL or missing references)1295			//IL_017f: Unknown result type (might be due to invalid IL or missing references)1296			//IL_0183: Unknown result type (might be due to invalid IL or missing references)1297			//IL_0188: Unknown result type (might be due to invalid IL or missing references)1298			//IL_019d: Unknown result type (might be due to invalid IL or missing references)1299			//IL_019f: Unknown result type (might be due to invalid IL or missing references)1300			//IL_03bd: Unknown result type (might be due to invalid IL or missing references)1301			//IL_03c8: Unknown result type (might be due to invalid IL or missing references)1302			//IL_03cd: Unknown result type (might be due to invalid IL or missing references)1303			//IL_03d1: Unknown result type (might be due to invalid IL or missing references)1304			//IL_03d6: Unknown result type (might be due to invalid IL or missing references)1305			//IL_03eb: Unknown result type (might be due to invalid IL or missing references)1306			//IL_03ed: Unknown result type (might be due to invalid IL or missing references)1307			//IL_0585: Unknown result type (might be due to invalid IL or missing references)1308			//IL_058a: Unknown result type (might be due to invalid IL or missing references)1309			//IL_058e: Unknown result type (might be due to invalid IL or missing references)1310			//IL_0593: Unknown result type (might be due to invalid IL or missing references)1311			//IL_05a8: Unknown result type (might be due to invalid IL or missing references)1312			//IL_05aa: Unknown result type (might be due to invalid IL or missing references)1313			int num = _003C_003E1__state;1314			AttestationCase attestationCase = _003C_003E4__this;1315			try1316			{1317				ConfiguredTaskAwaiter<IEntity> val3;1318				ConfiguredTaskAwaiter val;1319				ConfiguredTaskAwaiter<IEntityCollection> val2;1320				ConfiguredTaskAwaitable val4;1321				Query query;1322				IEntity result;1323				IEntityCollection result2;1324				switch (num)1325				{1326				default:1327					_003Clp_003E5__2 = new LogicParameter(entity, parameter, ct);1328					_003CuidPersonDecision_003E5__3 = mp.Person;1329					_003CstrReasonText_003E5__4 = mp.Message;1330					_003CfSql_003E5__5 = _003Clp_003E5__2.SqlFormatter;1331					val3 = GetAttestationHelper(_003Clp_003E5__2, _003CuidPersonDecision_003E5__3, bDecision: true, _003CfSql_003E5__5.UidComparison("UID_PWODecisionRule", "ATT-PWODecisionRule-QP", CompareOperator.NotEqual)).ConfigureAwait(false).GetAwaiter();1332					if (!val3.IsCompleted)1333					{1334						num = (_003C_003E1__state = 0);1335						_003C_003Eu__1 = val3;1336						((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IEntity>, _003CDenyDecision_OnSaving_003Ed__26>(ref val3, ref this);1337						return;1338					}1339					goto IL_00fb;1340				case 0:1341					val3 = _003C_003Eu__1;1342					_003C_003Eu__1 = default(ConfiguredTaskAwaiter<IEntity>);1343					num = (_003C_003E1__state = -1);1344					goto IL_00fb;1345				case 1:1346					val = _003C_003Eu__2;1347					_003C_003Eu__2 = default(ConfiguredTaskAwaiter);1348					num = (_003C_003E1__state = -1);1349					goto IL_01d4;1350				case 2:1351					val2 = _003C_003Eu__3;1352					_003C_003Eu__3 = default(ConfiguredTaskAwaiter<IEntityCollection>);1353					num = (_003C_003E1__state = -1);1354					goto IL_031d;1355				case 3:1356					try1357					{1358						if (num != 3)1359						{1360							goto IL_0429;1361						}1362						val = _003C_003Eu__2;1363						_003C_003Eu__2 = default(ConfiguredTaskAwaiter);1364						num = (_003C_003E1__state = -1);1365						goto IL_0422;1366						IL_0422:1367						((ConfiguredTaskAwaiter)(ref val)).GetResult();1368						goto IL_0429;1369						IL_0429:1370						if (((System.Collections.IEnumerator)_003C_003E7__wrap7).MoveNext())1371						{1372							IEntity current = _003C_003E7__wrap7.Current;1373							_003Cparam_003E5__7["UID_AttestationHelper"] = current.GetValue<string>("UID_AttestationHelper");1374							current.SetValue("UID_PersonAdditional", string.Empty);1375							current.SetValue("UID_PersonInsteadOf", string.Empty);1376							current.SetValue("Decision", string.Empty);1377							val4 = _003Clp_003E5__2.UnitOfWork.PutAsync(current, _003Clp_003E5__2.CancellationToken).ConfigureAwait(false);1378							val = ((ConfiguredTaskAwaitable)(ref val4)).GetAwaiter();1379							if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)1380							{1381								num = (_003C_003E1__state = 3);1382								_003C_003Eu__2 = val;1383								((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CDenyDecision_OnSaving_003Ed__26>(ref val, ref this);1384								return;1385							}1386							goto IL_0422;1387						}1388					}1389					finally1390					{1391						if (num < 0 && _003C_003E7__wrap7 != null)1392						{1393							((System.IDisposable)_003C_003E7__wrap7).Dispose();1394						}1395					}1396					_003C_003E7__wrap7 = null;1397					_003Cparam_003E5__7.Add("Text", (object)_003CstrReasonText_003E5__4);1398					_003Cparam_003E5__7.Add("UID_Person", (object)_003CuidPersonDecision_003E5__3);1399					_003Clp_003E5__2.Entity.SetValue("UID_PersonHead", _003CuidPersonDecision_003E5__3);1400					_003Clp_003E5__2.Entity.SetValue("ReasonHead", _003CstrReasonText_003E5__4);1401					_003Clp_003E5__2.Entity.SetValue("UID_QERJustification", mp.Justification);1402					_003Clp_003E5__2.Entity.SetValue("DateHead", _003Clp_003E5__2.ServerTime);1403					attestationCase.GenerateOnSaved("Deny", (IDictionary<string, object>)(object)_003Cparam_003E5__7);1404					val4 = Handle_DecisionHistory(_003Clp_003E5__2, DecisionType.Deny, new DecisionHistoryArgs(_003Clp_003E5__2.Entity)1405					{1406						DecisionStep = _003CdbAttestationHelper_003E5__6.CreateWalker(_003Clp_003E5__2.Session).GetValue<string>("FK(UID_QERWorkingStep).Ident_PwODecisionStep"),1407						uidPerson = _003CuidPersonDecision_003E5__3,1408						Text = _003CstrReasonText_003E5__4,1409						RulerLevel = _003CdbAttestationHelper_003E5__6.GetValue<int>("RulerLevel")1410					}).ConfigureAwait(false);1411					val = ((ConfiguredTaskAwaitable)(ref val4)).GetAwaiter();1412					if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)1413					{1414						num = (_003C_003E1__state = 4);1415						_003C_003Eu__2 = val;1416						((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CDenyDecision_OnSaving_003Ed__26>(ref val, ref this);1417						return;1418					}1419					break;1420				case 4:1421					{1422						val = _003C_003Eu__2;1423						_003C_003Eu__2 = default(ConfiguredTaskAwaiter);1424						num = (_003C_003E1__state = -1);1425						break;1426					}1427					IL_01d4:1428					((ConfiguredTaskAwaiter)(ref val)).GetResult();1429					query = Query.From("AttestationHelper").Where(_003CfSql_003E5__5.AndRelation(_003CfSql_003E5__5.UidComparison("UID_AttestationCase", _003Clp_003E5__2.Entity.GetValue<string>("UID_AttestationCase")), _003CfSql_003E5__5.Comparison("LevelNumber", _003Clp_003E5__2.Entity.GetValue<int>("DecisionLevel"), ValType.Int), _003CfSql_003E5__5.OrRelation(_003CfSql_003E5__5.UidComparison("UID_PersonAdditional", _003CuidPersonDecision_003E5__3), _003CfSql_003E5__5.UidComparison("UID_PersonInsteadOf", _003CuidPersonDecision_003E5__3)))).SelectAll();1430					val2 = _003Clp_003E5__2.Session.Source().GetCollectionAsync(query, EntityCollectionLoadType.Bulk, _003Clp_003E5__2.CancellationToken).ConfigureAwait(false)1431						.GetAwaiter();1432					if (!val2.IsCompleted)1433					{1434						num = (_003C_003E1__state = 2);1435						_003C_003Eu__3 = val2;1436						((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IEntityCollection>, _003CDenyDecision_OnSaving_003Ed__26>(ref val2, ref this);1437						return;1438					}1439					goto IL_031d;1440					IL_00fb:1441					result = val3.GetResult();1442					_003CdbAttestationHelper_003E5__6 = result;1443					if (_003CdbAttestationHelper_003E5__6 == null)1444					{1445						throw new ViException(2126172, ExceptionRelevance.EndUser);1446					}1447					if (!_003CdbAttestationHelper_003E5__6.GetValue("IsFromDelegation"))1448					{1449						throw new ViException(2126291, ExceptionRelevance.EndUser);1450					}1451					_003CdbAttestationHelper_003E5__6.SetValue("Decision", "-");1452					val4 = _003Clp_003E5__2.UnitOfWork.PutAsync(_003CdbAttestationHelper_003E5__6, _003Clp_003E5__2.CancellationToken).ConfigureAwait(false);1453					val = ((ConfiguredTaskAwaitable)(ref val4)).GetAwaiter();1454					if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)1455					{1456						num = (_003C_003E1__state = 1);1457						_003C_003Eu__2 = val;1458						((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CDenyDecision_OnSaving_003Ed__26>(ref val, ref this);1459						return;1460					}1461					goto IL_01d4;1462					IL_031d:1463					result2 = val2.GetResult();1464					_003Cparam_003E5__7 = new Dictionary<string, object>((IEqualityComparer<string>)(object)StringComparer.OrdinalIgnoreCase);1465					_003C_003E7__wrap7 = ((System.Collections.Generic.IEnumerable<IEntity>)result2).GetEnumerator();1466					goto case 3;1467				}1468				((ConfiguredTaskAwaiter)(ref val)).GetResult();1469			}1470			catch (System.Exception exception)1471			{1472				_003C_003E1__state = -2;1473				_003Clp_003E5__2 = null;1474				_003CuidPersonDecision_003E5__3 = null;1475				_003CstrReasonText_003E5__4 = null;1476				_003CfSql_003E5__5 = null;1477				_003CdbAttestationHelper_003E5__6 = null;1478				_003Cparam_003E5__7 = null;1479				((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetException(exception);1480				return;1481			}1482			_003C_003E1__state = -2;1483			_003Clp_003E5__2 = null;1484			_003CuidPersonDecision_003E5__3 = null;1485			_003CstrReasonText_003E5__4 = null;1486			_003CfSql_003E5__5 = null;1487			_003CdbAttestationHelper_003E5__6 = null;1488			_003Cparam_003E5__7 = null;1489			((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetResult();1490		}14911492		[DebuggerHidden]1493		private void SetStateMachine(IAsyncStateMachine stateMachine)1494		{1495			((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetStateMachine(stateMachine);1496		}1497	}14981499	[StructLayout((LayoutKind)3)]1500	[CompilerGenerated]1501	private struct _003CDirectDecision_OnSaving_003Ed__28 : IAsyncStateMachine1502	{1503		public int _003C_003E1__state;15041505		public AsyncTaskMethodBuilder _003C_003Et__builder;15061507		public IEntity entity;15081509		public LogicReadWriteParameters parameter;15101511		public CancellationToken ct;15121513		public MP mp;15141515		private LogicParameter _003Clp_003E5__2;15161517		private string _003CuidPerson_003E5__3;15181519		private string _003CstrReason_003E5__4;15201521		private int _003CiOffset_003E5__5;15221523		private bool _003CadminContext_003E5__6;15241525		private int _003CiCurLevel_003E5__7;15261527		private ConfiguredTaskAwaiter<IEntity?> _003C_003Eu__1;15281529		private ConfiguredTaskAwaiter _003C_003Eu__2;15301531		private void MoveNext()1532		{1533			//IL_010e: Unknown result type (might be due to invalid IL or missing references)1534			//IL_0113: Unknown result type (might be due to invalid IL or missing references)1535			//IL_011b: Unknown result type (might be due to invalid IL or missing references)1536			//IL_02e4: Unknown result type (might be due to invalid IL or missing references)1537			//IL_02e9: Unknown result type (might be due to invalid IL or missing references)1538			//IL_02f1: Unknown result type (might be due to invalid IL or missing references)1539			//IL_0022: Unknown result type (might be due to invalid IL or missing references)1540			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)1541			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)1542			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)1543			//IL_00de: Unknown result type (might be due to invalid IL or missing references)1544			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)1545			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)1546			//IL_02a9: Unknown result type (might be due to invalid IL or missing references)1547			//IL_02ae: Unknown result type (might be due to invalid IL or missing references)1548			//IL_02b2: Unknown result type (might be due to invalid IL or missing references)1549			//IL_02b7: Unknown result type (might be due to invalid IL or missing references)1550			//IL_02cc: Unknown result type (might be due to invalid IL or missing references)1551			//IL_02ce: Unknown result type (might be due to invalid IL or missing references)1552			int num = _003C_003E1__state;1553			try1554			{1555				ConfiguredTaskAwaiter val;1556				ConfiguredTaskAwaiter<IEntity> val2;1557				if (num != 0)1558				{1559					if (num == 1)1560					{1561						val = _003C_003Eu__2;1562						_003C_003Eu__2 = default(ConfiguredTaskAwaiter);1563						num = (_003C_003E1__state = -1);1564						goto IL_0300;1565					}1566					_003Clp_003E5__2 = new LogicParameter(entity, parameter, ct);1567					_003CuidPerson_003E5__3 = mp.Person;1568					_003CstrReason_003E5__4 = mp.Message;1569					_003CiOffset_003E5__5 = mp.Number;1570					_003CadminContext_003E5__6 = IsSystemDecision(_003Clp_003E5__2, _003CuidPerson_003E5__3);1571					_003CiCurLevel_003E5__7 = _003Clp_003E5__2.Entity.GetValue<int>("DecisionLevel");1572					val2 = GetDecisionStep(_003Clp_003E5__2, _003Clp_003E5__2.Entity.GetValue<string>("UID_AttestationCase"), _003CadminContext_003E5__6 ? null : _003CuidPerson_003E5__3, _003CiCurLevel_003E5__7, -1, null).ConfigureAwait(false).GetAwaiter();1573					if (!val2.IsCompleted)1574					{1575						num = (_003C_003E1__state = 0);1576						_003C_003Eu__1 = val2;1577						((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IEntity>, _003CDirectDecision_OnSaving_003Ed__28>(ref val2, ref this);1578						return;1579					}1580				}1581				else1582				{1583					val2 = _003C_003Eu__1;1584					_003C_003Eu__1 = default(ConfiguredTaskAwaiter<IEntity>);1585					num = (_003C_003E1__state = -1);1586				}1587				IEntity result = val2.GetResult();1588				if (result == null)1589				{1590					throw new ViException(2126228, ExceptionRelevance.EndUser);1591				}1592				if (!new MultiValueProperty(result.GetValue<string>("DirectSteps")).Contains(_003CiOffset_003E5__5.ToString((IFormatProvider)(object)CultureInfo.InvariantCulture)))1593				{1594					throw new ViException(2126401, ExceptionRelevance.EndUser);1595				}1596				int num2 = _003CiCurLevel_003E5__7 + _003CiOffset_003E5__5;1597				System.DateTime serverTime = _003Clp_003E5__2.ServerTime;1598				_003Clp_003E5__2.Entity.SetValue("IsReserved", false);1599				_003Clp_003E5__2.Entity.SetValue("DateHead", serverTime);1600				_003Clp_003E5__2.Entity.SetValue("DecisionLevel", num2);1601				if (_003CadminContext_003E5__6)1602				{1603					_003Clp_003E5__2.Entity.SetValue("UID_PersonHead", null);1604					_003Clp_003E5__2.Entity.SetValue("DisplayPersonHead", "#LDS#Automatic approval.");1605				}1606				else1607				{1608					_003Clp_003E5__2.Entity.SetValue("UID_PersonHead", _003CuidPerson_003E5__3);1609				}1610				_003Clp_003E5__2.Entity.SetValue("ReasonHead", _003CstrReason_003E5__4);1611				_003Clp_003E5__2.Entity.SetValue("UID_QERJustification", mp.Justification);1612				ConfiguredTaskAwaitable val3 = Handle_DecisionHistory(_003Clp_003E5__2, DecisionType.Direct, new DecisionHistoryArgs(_003Clp_003E5__2.Entity)1613				{1614					DecisionStep = result.GetValue<string>("Ident_PwODecisionStep"),1615					SystemDecision = _003CadminContext_003E5__61616				}).ConfigureAwait(false);1617				val = ((ConfiguredTaskAwaitable)(ref val3)).GetAwaiter();1618				if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)1619				{1620					num = (_003C_003E1__state = 1);1621					_003C_003Eu__2 = val;1622					((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CDirectDecision_OnSaving_003Ed__28>(ref val, ref this);1623					return;1624				}1625				goto IL_0300;1626				IL_0300:1627				((ConfiguredTaskAwaiter)(ref val)).GetResult();1628			}1629			catch (System.Exception exception)1630			{1631				_003C_003E1__state = -2;1632				_003Clp_003E5__2 = null;1633				_003CuidPerson_003E5__3 = null;1634				_003CstrReason_003E5__4 = null;1635				((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetException(exception);1636				return;1637			}1638			_003C_003E1__state = -2;1639			_003Clp_003E5__2 = null;1640			_003CuidPerson_003E5__3 = null;1641			_003CstrReason_003E5__4 = null;1642			((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetResult();1643		}16441645		[DebuggerHidden]1646		private void SetStateMachine(IAsyncStateMachine stateMachine)1647		{1648			((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetStateMachine(stateMachine);1649		}1650	}16511652	[StructLayout((LayoutKind)3)]1653	[CompilerGenerated]1654	private struct _003CEscalate_OnSaving_003Ed__16 : IAsyncStateMachine1655	{1656		public int _003C_003E1__state;16571658		public AsyncTaskMethodBuilder _003C_003Et__builder;16591660		public IEntity entity;16611662		public LogicReadWriteParameters parameter;16631664		public CancellationToken ct;16651666		public MP mp;16671668		public AttestationCase _003C_003E4__this;16691670		private LogicParameter _003Clp_003E5__2;16711672		private string _003CuidPersonHead_003E5__3;16731674		private string _003CstrReasonText_003E5__4;16751676		private ISqlFormatter _003CfSql_003E5__5;16771678		private string _003CstrUidQERWorkingStep_003E5__6;16791680		private string _003CstrDecisionRule_003E5__7;16811682		private IEntity _003CdbDecisionStep_003E5__8;16831684		private int _003CiSteps_003E5__9;16851686		private int _003CiCurLevel_003E5__10;16871688		private IDbSession _003CdbSession_003E5__11;16891690		private bool _003CadminContext_003E5__12;16911692		private ConfiguredTaskAwaiter<DbDataReader> _003C_003Eu__1;16931694		private ConfiguredTaskAwaiter<int> _003C_003Eu__2;16951696		private ConfiguredTaskAwaiter<IEntity> _003C_003Eu__3;16971698		private ConfiguredTaskAwaiter _003C_003Eu__4;16991700		private void MoveNext()1701		{1702			//IL_028f: Unknown result type (might be due to invalid IL or missing references)1703			//IL_0294: Unknown result type (might be due to invalid IL or missing references)1704			//IL_029c: Unknown result type (might be due to invalid IL or missing references)1705			//IL_0416: Unknown result type (might be due to invalid IL or missing references)1706			//IL_041b: Unknown result type (might be due to invalid IL or missing references)1707			//IL_0423: Unknown result type (might be due to invalid IL or missing references)1708			//IL_04ad: Unknown result type (might be due to invalid IL or missing references)1709			//IL_04b2: Unknown result type (might be due to invalid IL or missing references)1710			//IL_04ba: Unknown result type (might be due to invalid IL or missing references)1711			//IL_06b0: Unknown result type (might be due to invalid IL or missing references)1712			//IL_06b5: Unknown result type (might be due to invalid IL or missing references)1713			//IL_06bd: Unknown result type (might be due to invalid IL or missing references)1714			//IL_0032: Unknown result type (might be due to invalid IL or missing references)1715			//IL_0464: Unknown result type (might be due to invalid IL or missing references)1716			//IL_046f: Unknown result type (might be due to invalid IL or missing references)1717			//IL_0474: Unknown result type (might be due to invalid IL or missing references)1718			//IL_0478: Unknown result type (might be due to invalid IL or missing references)1719			//IL_047d: Unknown result type (might be due to invalid IL or missing references)1720			//IL_0492: Unknown result type (might be due to invalid IL or missing references)1721			//IL_0494: Unknown result type (might be due to invalid IL or missing references)1722			//IL_0246: Unknown result type (might be due to invalid IL or missing references)1723			//IL_0251: Unknown result type (might be due to invalid IL or missing references)1724			//IL_0256: Unknown result type (might be due to invalid IL or missing references)1725			//IL_025a: Unknown result type (might be due to invalid IL or missing references)1726			//IL_025f: Unknown result type (might be due to invalid IL or missing references)1727			//IL_0274: Unknown result type (might be due to invalid IL or missing references)1728			//IL_0276: Unknown result type (might be due to invalid IL or missing references)1729			//IL_03cd: Unknown result type (might be due to invalid IL or missing references)1730			//IL_03d8: Unknown result type (might be due to invalid IL or missing references)1731			//IL_03dd: Unknown result type (might be due to invalid IL or missing references)1732			//IL_03e1: Unknown result type (might be due to invalid IL or missing references)1733			//IL_03e6: Unknown result type (might be due to invalid IL or missing references)1734			//IL_03fb: Unknown result type (might be due to invalid IL or missing references)1735			//IL_03fd: Unknown result type (might be due to invalid IL or missing references)1736			//IL_0672: Unknown result type (might be due to invalid IL or missing references)1737			//IL_0677: Unknown result type (might be due to invalid IL or missing references)1738			//IL_067b: Unknown result type (might be due to invalid IL or missing references)1739			//IL_0680: Unknown result type (might be due to invalid IL or missing references)1740			//IL_0695: Unknown result type (might be due to invalid IL or missing references)1741			//IL_0697: Unknown result type (might be due to invalid IL or missing references)1742			int num = _003C_003E1__state;1743			AttestationCase attestationCase = _003C_003E4__this;1744			try1745			{1746				ConfiguredTaskAwaiter<DbDataReader> val4;1747				ConfiguredTaskAwaiter<int> val3;1748				ConfiguredTaskAwaiter<IEntity> val2;1749				ConfiguredTaskAwaiter val;1750				IDataReader result;1751				IEntity result2;1752				ConfiguredTaskAwaitable val5;1753				DbObjectKey objectKey;1754				switch (num)1755				{1756				default:1757				{1758					_003Clp_003E5__2 = new LogicParameter(entity, parameter, ct);1759					_003CuidPersonHead_003E5__3 = mp.Person;1760					_003CstrReasonText_003E5__4 = mp.Message;1761					_003CfSql_003E5__5 = _003Clp_003E5__2.SqlFormatter;1762					_003CdbDecisionStep_003E5__8 = null;1763					_003CiSteps_003E5__9 = 0;1764					_003CiCurLevel_003E5__10 = _003Clp_003E5__2.Entity.GetValue<int>("DecisionLevel");1765					_003CdbSession_003E5__11 = _003Clp_003E5__2.DbSession;1766					_003CadminContext_003E5__12 = IsSystemDecision(_003Clp_003E5__2, _003CuidPersonHead_003E5__3);1767					if (!_003CadminContext_003E5__12 && !string.Equals(_003Clp_003E5__2.Entity.GetValue<string>("UID_PersonHead"), _003CuidPersonHead_003E5__3, (StringComparison)4))1768					{1769						throw new ViException(2126172, ExceptionRelevance.EndUser);1770					}1771					string text = null;1772					string sqlStatement;1773					if (_003CadminContext_003E5__12)1774					{1775						sqlStatement = string.Format("select s.UID_PWODecisionRule, s.UID_QERWorkingStep from QERWorkingStep s\r\n                                        join AttestationCase as ac on ac.UID_QERWorkingMethod = s.UID_QERWorkingMethod and ac.DecisionLevel = s.LevelNumber\r\n                                        where {0}", (object)_003CfSql_003E5__5.UidComparison("ac.uid_AttestationCase", _003Clp_003E5__2.Entity.GetValue<string>("UID_AttestationCase")));1776					}1777					else1778					{1779						text = _003CfSql_003E5__5.AndRelation(_003CfSql_003E5__5.UidComparison("UID_AttestationCase", _003Clp_003E5__2.Entity.GetValue<string>("UID_AttestationCase")), _003CfSql_003E5__5.Comparison("LevelNumber", _003CiCurLevel_003E5__10, ValType.Int), _003CfSql_003E5__5.UidComparison("UID_QERWorkingStep", "", CompareOperator.NotEqual), _003CfSql_003E5__5.OrRelation(" not (" + _003CfSql_003E5__5.OrRelation(_003CfSql_003E5__5.Comparison("Decision", "P", ValType.String), _003CfSql_003E5__5.Comparison("Decision", "N", ValType.String)) + ")", _003CfSql_003E5__5.Comparison("Decision", null, ValType.String)));1780						sqlStatement = $"select UID_PWODecisionRule, UID_QERWorkingStep from AttestationHelper where {text} order by RulerLevel";1781					}1782					val4 = _003CdbSession_003E5__11.SqlExecuteAsync(sqlStatement, _003Clp_003E5__2.CancellationToken).ConfigureAwait(false).GetAwaiter();1783					if (!val4.IsCompleted)1784					{1785						num = (_003C_003E1__state = 0);1786						_003C_003Eu__1 = val4;1787						((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<DbDataReader>, _003CEscalate_OnSaving_003Ed__16>(ref val4, ref this);1788						return;1789					}1790					goto IL_02ab;1791				}1792				case 0:1793					val4 = _003C_003Eu__1;1794					_003C_003Eu__1 = default(ConfiguredTaskAwaiter<DbDataReader>);1795					num = (_003C_003E1__state = -1);1796					goto IL_02ab;1797				case 1:1798					val3 = _003C_003Eu__2;1799					_003C_003Eu__2 = default(ConfiguredTaskAwaiter<int>);1800					num = (_003C_003E1__state = -1);1801					goto IL_0432;1802				case 2:1803					val2 = _003C_003Eu__3;1804					_003C_003Eu__3 = default(ConfiguredTaskAwaiter<IEntity>);1805					num = (_003C_003E1__state = -1);1806					goto IL_04c9;1807				case 3:1808					{1809						val = _003C_003Eu__4;1810						_003C_003Eu__4 = default(ConfiguredTaskAwaiter);1811						num = (_003C_003E1__state = -1);1812						break;1813					}1814					IL_02ab:1815					result = (IDataReader)(object)val4.GetResult();1816					try1817					{1818						if (!result.Read())1819						{1820							throw new ViException(2126172, ExceptionRelevance.EndUser);1821						}1822						_003CstrDecisionRule_003E5__7 = ((IDataRecord)result).GetString(0);1823						_003CstrUidQERWorkingStep_003E5__6 = ((IDataRecord)result).GetString(1);1824					}1825					finally1826					{1827						if (num < 0)1828						{1829							((System.IDisposable)result)?.Dispose();1830						}1831					}1832					if (!string.IsNullOrEmpty(_003CstrUidQERWorkingStep_003E5__6))1833					{1834						string text = _003CfSql_003E5__5.AndRelation(_003CfSql_003E5__5.UidComparison("UID_AttestationCase", _003Clp_003E5__2.Entity.GetValue<string>("UID_AttestationCase")), _003CfSql_003E5__5.Comparison("LevelNumber", _003CiCurLevel_003E5__10, ValType.Int), _003CfSql_003E5__5.UidComparison("UID_QERWorkingStep", "", CompareOperator.NotEqual), "not exists ( select top 1 1 from AttestationHelper AH2\r\n                            where AH2.UID_AttestationCase = AttestationHelper.UID_AttestationCase\r\n                              and AH2.LevelNumber = AttestationHelper.LevelNumber\r\n                              and AH2.SubLevelNumber = AttestationHelper.SubLevelNumber\r\n                              and (AH2.Decision = 'P' or AH2.Decision = 'N') )");1835						string sqlStatement = string.Format("update AttestationHelper set Decision = {0}, ReasonHead = {1} where {2}", (object)_003CfSql_003E5__5.FormatValue("E", ValType.String, forUpdate: true), (object)_003CfSql_003E5__5.FormatValue(_003CstrReasonText_003E5__4, ValType.String, forUpdate: true), (object)text);1836						val3 = _003CdbSession_003E5__11.SqlExecuteNonQueryInContextAsync(_003Clp_003E5__2.Session, sqlStatement, _003Clp_003E5__2.CancellationToken).ConfigureAwait(false).GetAwaiter();1837						if (!val3.IsCompleted)1838						{1839							num = (_003C_003E1__state = 1);1840							_003C_003Eu__2 = val3;1841							((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<int>, _003CEscalate_OnSaving_003Ed__16>(ref val3, ref this);1842							return;1843						}1844						goto IL_0432;1845					}1846					goto IL_04f5;1847					IL_04c9:1848					result2 = val2.GetResult();1849					_003CdbDecisionStep_003E5__8 = result2;1850					_003CiSteps_003E5__9 = _003CdbDecisionStep_003E5__8.GetValue("EscalationSteps").Int;1851					goto IL_04f5;1852					IL_04f5:1853					if (_003CiSteps_003E5__9 == 0)1854					{1855						throw new ViException(2126402, ExceptionRelevance.EndUser);1856					}1857					if (_003CadminContext_003E5__12)1858					{1859						_003Clp_003E5__2.Entity.SetValue("UID_PersonHead", null);1860						_003Clp_003E5__2.Entity.SetValue("DisplayPersonHead", "#LDS#Automatic approval.");1861					}1862					else1863					{1864						_003Clp_003E5__2.Entity.SetValue("UID_PersonHead", _003CuidPersonHead_003E5__3);1865					}1866					_003Clp_003E5__2.Entity.SetValue("ReasonHead", _003CstrReasonText_003E5__4);1867					_003Clp_003E5__2.Entity.SetValue("UID_QERJustification", mp.Justification);1868					_003Clp_003E5__2.Entity.SetValue("IsReserved", false);1869					_003Clp_003E5__2.Entity.SetValue("DateHead", _003Clp_003E5__2.ServerTime);1870					attestationCase.GenerateOnSaved(_003Clp_003E5__2.Entity, "Escalate");1871					_003Clp_003E5__2.Entity.SetValue("DecisionLevel", _003CiCurLevel_003E5__10 + _003CiSteps_003E5__9);1872					val5 = Handle_DecisionHistory(_003Clp_003E5__2, DecisionType.Escalate, new DecisionHistoryArgs(_003Clp_003E5__2.Entity)1873					{1874						uidDecisionRule = _003CstrDecisionRule_003E5__7,1875						DecisionStep = ((_003CdbDecisionStep_003E5__8 != null) ? _003CdbDecisionStep_003E5__8.GetValue<string>("Ident_PWODecisionStep") : string.Empty),1876						SystemDecision = _003CadminContext_003E5__121877					}).ConfigureAwait(false);1878					val = ((ConfiguredTaskAwaitable)(ref val5)).GetAwaiter();1879					if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)1880					{1881						num = (_003C_003E1__state = 3);1882						_003C_003Eu__4 = val;1883						((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CEscalate_OnSaving_003Ed__16>(ref val, ref this);1884						return;1885					}1886					break;1887					IL_0432:1888					val3.GetResult();1889					objectKey = DbObjectKey.GetObjectKey("QERWorkingStep", _003CstrUidQERWorkingStep_003E5__6);1890					val2 = _003Clp_003E5__2.Session.Source().GetAsync(objectKey, _003Clp_003E5__2.CancellationToken).ConfigureAwait(false)1891						.GetAwaiter();1892					if (!val2.IsCompleted)1893					{1894						num = (_003C_003E1__state = 2);1895						_003C_003Eu__3 = val2;1896						((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IEntity>, _003CEscalate_OnSaving_003Ed__16>(ref val2, ref this);1897						return;1898					}1899					goto IL_04c9;1900				}1901				((ConfiguredTaskAwaiter)(ref val)).GetResult();1902			}1903			catch (System.Exception exception)1904			{1905				_003C_003E1__state = -2;1906				_003Clp_003E5__2 = null;1907				_003CuidPersonHead_003E5__3 = null;1908				_003CstrReasonText_003E5__4 = null;1909				_003CfSql_003E5__5 = null;1910				_003CstrUidQERWorkingStep_003E5__6 = null;1911				_003CstrDecisionRule_003E5__7 = null;1912				_003CdbDecisionStep_003E5__8 = null;1913				_003CdbSession_003E5__11 = null;1914				((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetException(exception);1915				return;1916			}1917			_003C_003E1__state = -2;1918			_003Clp_003E5__2 = null;1919			_003CuidPersonHead_003E5__3 = null;1920			_003CstrReasonText_003E5__4 = null;1921			_003CfSql_003E5__5 = null;1922			_003CstrUidQERWorkingStep_003E5__6 = null;1923			_003CstrDecisionRule_003E5__7 = null;1924			_003CdbDecisionStep_003E5__8 = null;1925			_003CdbSession_003E5__11 = null;1926			((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetResult();1927		}19281929		[DebuggerHidden]1930		private void SetStateMachine(IAsyncStateMachine stateMachine)1931		{1932			((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetStateMachine(stateMachine);1933		}1934	}19351936	[StructLayout((LayoutKind)3)]1937	[CompilerGenerated]1938	private struct _003CGetAttestationHelper_003Ed__55 : IAsyncStateMachine1939	{1940		public int _003C_003E1__state;19411942		public AsyncTaskMethodBuilder<IEntity> _003C_003Et__builder;19431944		public LogicParameter lp;19451946		public bool bDecision;19471948		public string uidPersonDecision;19491950		public string strAdditionalWhereClause;19511952		private ConfiguredTaskAwaiter<TryResult<IEntity>> _003C_003Eu__1;19531954		private void MoveNext()1955		{1956			//IL_0167: Unknown result type (might be due to invalid IL or missing references)1957			//IL_016c: Unknown result type (might be due to invalid IL or missing references)1958			//IL_0174: Unknown result type (might be due to invalid IL or missing references)1959			//IL_0121: Unknown result type (might be due to invalid IL or missing references)1960			//IL_012c: Unknown result type (might be due to invalid IL or missing references)1961			//IL_0131: Unknown result type (might be due to invalid IL or missing references)1962			//IL_0135: Unknown result type (might be due to invalid IL or missing references)1963			//IL_013a: Unknown result type (might be due to invalid IL or missing references)1964			//IL_014f: Unknown result type (might be due to invalid IL or missing references)1965			//IL_0151: Unknown result type (might be due to invalid IL or missing references)1966			int num = _003C_003E1__state;1967			IEntity result2;1968			try1969			{1970				ConfiguredTaskAwaiter<TryResult<IEntity>> val;1971				if (num != 0)1972				{1973					ISqlFormatter sqlFormatter = lp.SqlFormatter;1974					string whereClause = sqlFormatter.AndRelation(sqlFormatter.UidComparison("UID_AttestationCase", lp.Entity.GetValue<string>("UID_AttestationCase")), sqlFormatter.Comparison("LevelNumber", lp.Entity.GetValue<int>("DecisionLevel"), ValType.Int), bDecision ? sqlFormatter.InClause("Decision", ValType.String, "Q", "") : "", string.IsNullOrEmpty(uidPersonDecision) ? "" : sqlFormatter
…