Skip to content

Instantly share code, notes, and snippets.

@hasokeric
Forked from usdoingstuff/test.cs
Created December 23, 2015 02:30
Show Gist options
  • Save hasokeric/6b307e3c209ce08ba4bb to your computer and use it in GitHub Desktop.
Save hasokeric/6b307e3c209ce08ba4bb to your computer and use it in GitHub Desktop.
using Epicor.Customization.Bpm;
using Epicor.Data;
using Epicor.Hosting;
using Epicor.Utilities;
using Erp.Contracts;
using Erp.Tables;
using Erp.Tablesets;
using Ice;
using Ice.Contracts;
using Ice.ExtendedData;
using Ice.Tables;
using Ice.Tablesets;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Linq.Expressions;
using System.ServiceModel;
namespace Epicor.Customization.Bpm.BO2FABD4F29A4C434B83E613BAB931BBC3
{
internal sealed class UpdateImpl : Epicor.Customization.Bpm.MethodCustomizationBase<Erp.ErpContext>
{
#region Nested data types
private sealed class EngWorkBenchTablesetWithFilter : Epicor.Customization.Bpm.TablesetWithFilter<Erp.Tablesets.EngWorkBenchTableset>
{
protected override void SetFilterCore(Func<object, bool> filter)
{
Func<object, bool> currentFilter;
currentFilter = filter;
this.FilterTable(this.Original.ECOGroup, currentFilter);
currentFilter = row =>
{
if (this.Filtered.ECOGroup.Any())
{
var typedRow = (Erp.Tablesets.ECORevRow)row;
if (!this.Filtered.ECOGroup.Any(r1 => typedRow.Company == r1.Company && typedRow.GroupID == r1.GroupID))
{
return false;
}
}
return filter(row);
};
this.FilterTable(this.Original.ECORev, currentFilter);
currentFilter = row =>
{
if (this.Filtered.ECORev.Any())
{
var typedRow = (Erp.Tablesets.ECOCOPartRow)row;
if (!this.Filtered.ECORev.Any(r1 => typedRow.Company == r1.Company && typedRow.GroupID == r1.GroupID && typedRow.PartNum == r1.PartNum && typedRow.RevisionNum == r1.RevisionNum && typedRow.AltMethod == r1.AltMethod))
{
return false;
}
}
return filter(row);
};
this.FilterTable(this.Original.ECOCOPart, currentFilter);
currentFilter = row =>
{
if (this.Filtered.ECORev.Any())
{
var typedRow = (Erp.Tablesets.ECOMtlRow)row;
if (!this.Filtered.ECORev.Any(r1 => typedRow.Company == r1.Company && typedRow.GroupID == r1.GroupID && typedRow.PartNum == r1.PartNum && typedRow.RevisionNum == r1.RevisionNum && typedRow.AltMethod == r1.AltMethod))
{
return false;
}
}
return filter(row);
};
this.FilterTable(this.Original.ECOMtl, currentFilter);
currentFilter = row =>
{
if (this.Filtered.ECOMtl.Any())
{
var typedRow = (Erp.Tablesets.ECOMtlInspRow)row;
if (!this.Filtered.ECOMtl.Any(r1 => typedRow.Company == r1.Company && typedRow.GroupID == r1.GroupID && typedRow.PartNum == r1.PartNum && typedRow.RevisionNum == r1.RevisionNum && typedRow.AltMethod == r1.AltMethod && typedRow.MtlSeq == r1.MtlSeq))
{
return false;
}
}
return filter(row);
};
this.FilterTable(this.Original.ECOMtlInsp, currentFilter);
currentFilter = row =>
{
if (this.Filtered.ECOMtl.Any())
{
var typedRow = (Erp.Tablesets.ECOMtlRefDesRow)row;
if (!this.Filtered.ECOMtl.Any(r1 => typedRow.Company == r1.Company && typedRow.GroupID == r1.GroupID && typedRow.PartNum == r1.PartNum && typedRow.RevisionNum == r1.RevisionNum && typedRow.AltMethod == r1.AltMethod && typedRow.MtlSeq == r1.MtlSeq))
{
return false;
}
}
return filter(row);
};
this.FilterTable(this.Original.ECOMtlRefDes, currentFilter);
currentFilter = row =>
{
if (this.Filtered.ECOMtl.Any())
{
var typedRow = (Erp.Tablesets.ECOMtlRestrictionRow)row;
if (!this.Filtered.ECOMtl.Any(r1 => typedRow.Company == r1.Company && typedRow.GroupID == r1.GroupID && typedRow.PartNum == r1.PartNum && typedRow.RevisionNum == r1.RevisionNum && typedRow.AltMethod == r1.AltMethod && typedRow.MtlSeq == r1.MtlSeq))
{
return false;
}
}
return filter(row);
};
this.FilterTable(this.Original.ECOMtlRestriction, currentFilter);
currentFilter = row =>
{
if (this.Filtered.ECOMtlRestriction.Any())
{
var typedRow = (Erp.Tablesets.ECOMtlRestrictSubstRow)row;
if (!this.Filtered.ECOMtlRestriction.Any(r1 => typedRow.Company == r1.Company && typedRow.GroupID == r1.GroupID && typedRow.PartNum == r1.PartNum && typedRow.RevisionNum == r1.RevisionNum && typedRow.AltMethod == r1.AltMethod && typedRow.MtlSeq == r1.MtlSeq && typedRow.RestrictionTypeID == r1.RestrictionTypeID))
{
return false;
}
}
return filter(row);
};
this.FilterTable(this.Original.ECOMtlRestrictSubst, currentFilter);
currentFilter = row =>
{
if (this.Filtered.ECORev.Any())
{
var typedRow = (Erp.Tablesets.ECOOprRow)row;
if (!this.Filtered.ECORev.Any(r1 => typedRow.Company == r1.Company && typedRow.GroupID == r1.GroupID && typedRow.PartNum == r1.PartNum && typedRow.RevisionNum == r1.RevisionNum && typedRow.AltMethod == r1.AltMethod))
{
return false;
}
}
return filter(row);
};
this.FilterTable(this.Original.ECOOpr, currentFilter);
currentFilter = row =>
{
if (this.Filtered.ECOOpr.Any())
{
var typedRow = (Erp.Tablesets.ECOOprInspRow)row;
if (!this.Filtered.ECOOpr.Any(r1 => typedRow.Company == r1.Company && typedRow.GroupID == r1.GroupID && typedRow.PartNum == r1.PartNum && typedRow.RevisionNum == r1.RevisionNum && typedRow.AltMethod == r1.AltMethod && typedRow.OprSeq == r1.OprSeq))
{
return false;
}
}
return filter(row);
};
this.FilterTable(this.Original.ECOOprInsp, currentFilter);
currentFilter = row =>
{
if (this.Filtered.ECOOpr.Any())
{
var typedRow = (Erp.Tablesets.ECOOpDtlRow)row;
if (!this.Filtered.ECOOpr.Any(r1 => typedRow.Company == r1.Company && typedRow.GroupID == r1.GroupID && typedRow.PartNum == r1.PartNum && typedRow.RevisionNum == r1.RevisionNum && typedRow.AltMethod == r1.AltMethod && typedRow.OprSeq == r1.OprSeq))
{
return false;
}
}
return filter(row);
};
this.FilterTable(this.Original.ECOOpDtl, currentFilter);
currentFilter = row =>
{
if (this.Filtered.ECOOpr.Any())
{
var typedRow = (Erp.Tablesets.ECOOprRestrictionRow)row;
if (!this.Filtered.ECOOpr.Any(r1 => typedRow.Company == r1.Company && typedRow.GroupID == r1.GroupID && typedRow.PartNum == r1.PartNum && typedRow.RevisionNum == r1.RevisionNum && typedRow.AltMethod == r1.AltMethod && typedRow.OprSeq == r1.OprSeq))
{
return false;
}
}
return filter(row);
};
this.FilterTable(this.Original.ECOOprRestriction, currentFilter);
currentFilter = row =>
{
if (this.Filtered.ECOOprRestriction.Any())
{
var typedRow = (Erp.Tablesets.ECOOprRestrictSubstRow)row;
if (!this.Filtered.ECOOprRestriction.Any(r1 => typedRow.Company == r1.Company && typedRow.GroupID == r1.GroupID && typedRow.PartNum == r1.PartNum && typedRow.RevisionNum == r1.RevisionNum && typedRow.AltMethod == r1.AltMethod && typedRow.OprSeq == r1.OprSeq && typedRow.RestrictionTypeID == r1.RestrictionTypeID))
{
return false;
}
}
return filter(row);
};
this.FilterTable(this.Original.ECOOprRestrictSubst, currentFilter);
currentFilter = filter;
this.FilterTable(this.Original.ECOGroupAttch, currentFilter);
currentFilter = filter;
this.FilterTable(this.Original.ECORevAttch, currentFilter);
currentFilter = filter;
this.FilterTable(this.Original.ECOMtlAttch, currentFilter);
currentFilter = filter;
this.FilterTable(this.Original.ECOOprAttch, currentFilter);
currentFilter = filter;
this.FilterTable(this.Original.ECOImport, currentFilter);
}
}
#endregion // Nested data types
#region Data members
private readonly Erp.Contracts.EngWorkBenchSvcContract defaultImpl;
private readonly EngWorkBenchTablesetWithFilter dsHolder = new EngWorkBenchTablesetWithFilter();
#endregion // Data members
#region Table accessors
private Erp.Tablesets.EngWorkBenchTableset ds
{
get { return this.dsHolder.Get(this.UseDataFilter); }
}
private Erp.Tablesets.ECOGroupTable ttECOGroup
{
get { return this.ds.ECOGroup; }
}
private Erp.Tablesets.ECOGroupAttchTable ttECOGroupAttch
{
get { return this.ds.ECOGroupAttch; }
}
private Erp.Tablesets.ECORevTable ttECORev
{
get { return this.ds.ECORev; }
}
private Erp.Tablesets.ECORevAttchTable ttECORevAttch
{
get { return this.ds.ECORevAttch; }
}
private Erp.Tablesets.ECOCOPartTable ttECOCOPart
{
get { return this.ds.ECOCOPart; }
}
private Erp.Tablesets.ECOMtlTable ttECOMtl
{
get { return this.ds.ECOMtl; }
}
private Erp.Tablesets.ECOMtlAttchTable ttECOMtlAttch
{
get { return this.ds.ECOMtlAttch; }
}
private Erp.Tablesets.ECOMtlInspTable ttECOMtlInsp
{
get { return this.ds.ECOMtlInsp; }
}
private Erp.Tablesets.ECOMtlRefDesTable ttECOMtlRefDes
{
get { return this.ds.ECOMtlRefDes; }
}
private Erp.Tablesets.ECOMtlRestrictionTable ttECOMtlRestriction
{
get { return this.ds.ECOMtlRestriction; }
}
private Erp.Tablesets.ECOMtlRestrictSubstTable ttECOMtlRestrictSubst
{
get { return this.ds.ECOMtlRestrictSubst; }
}
private Erp.Tablesets.ECOOprTable ttECOOpr
{
get { return this.ds.ECOOpr; }
}
private Erp.Tablesets.ECOOprAttchTable ttECOOprAttch
{
get { return this.ds.ECOOprAttch; }
}
private Erp.Tablesets.ECOOprInspTable ttECOOprInsp
{
get { return this.ds.ECOOprInsp; }
}
private Erp.Tablesets.ECOOpDtlTable ttECOOpDtl
{
get { return this.ds.ECOOpDtl; }
}
private Erp.Tablesets.ECOOprRestrictionTable ttECOOprRestriction
{
get { return this.ds.ECOOprRestriction; }
}
private Erp.Tablesets.ECOOprRestrictSubstTable ttECOOprRestrictSubst
{
get { return this.ds.ECOOprRestrictSubst; }
}
private Erp.Tablesets.ECOImportTable ttECOImport
{
get { return this.ds.ECOImport; }
}
#endregion // Table accessors
public UpdateImpl(Erp.ErpContext ctx, Erp.Contracts.EngWorkBenchSvcContract defaultImpl)
: base(ctx)
{
if (ctx == null) throw new ArgumentNullException("ctx");
if (defaultImpl == null) throw new ArgumentNullException("defaultImpl");
this.defaultImpl = defaultImpl;
this.bpMethodCode = "ERP.EngWorkBench.Update";
this.RegisterFilters(
this.dsHolder);
#region Outdated directives
#endregion // Outdated directives
#region Directives preparation
#endregion // Directives preparation
#region Directives
this.AddPreProcessingDirective(new Guid("a48b7efd-05a7-4798-a543-2930fe652de0"), "RequireFields", Ice.BO.BpMethod.DirectiveScope.TenantSpecific, "TWG-OK", null, this.PreProcessing_A48B7EFD05A74798A5432930FE652DE0);
this.AddPreProcessingDirective(new Guid("7e47989b-dd05-4318-919f-4e5e935dc6fd"), "CheckAssignments", Ice.BO.BpMethod.DirectiveScope.CompanySpecific, "TWG-OK", null, this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD);
#endregion // Directives
}
public void Execute(ref Erp.Tablesets.EngWorkBenchTableset ds)
{
this.StartTracing();
this.dsHolder.Attach(ds);
this.ExecuteCore();
ds = this.dsHolder.Original;
this.FinishTracing();
}
protected sealed override void ExecuteBase()
{
var dsTemp = this.dsHolder.Original;
this.defaultImpl.Update(ref dsTemp);
this.dsHolder.Attach(dsTemp, asCurrent: false);
}
#region Directives preparation
#endregion // Directives preparation
#region Directives
private void PreProcessing_A48B7EFD05A74798A5432930FE652DE0()
{
var conditionBlockValue = false;
start: // Name = "Update To ECORev", Id = "8ac4f78e-60cb-4d1a-83f3-d4b0f8bfebc3"
this.ClearDataFilter();
conditionBlockValue =
this.PreProcessing_A48B7EFD05A74798A5432930FE652DE0_C001();
if (!conditionBlockValue) goto finish;
this.FilterData(row =>
{
var isOk =
this.PreProcessing_A48B7EFD05A74798A5432930FE652DE0_C001(row);
return isOk;
});
block001: // Name = "Require Reason", Id = "a59d7e21-2a1d-4056-8ee9-81d53c72b0bd"
this.ClearDataFilter();
conditionBlockValue =
this.PreProcessing_A48B7EFD05A74798A5432930FE652DE0_C002();
if (!conditionBlockValue) goto block003;
this.FilterData(row =>
{
var isOk =
this.PreProcessing_A48B7EFD05A74798A5432930FE652DE0_C002(row);
return isOk;
});
block002: // Name = "Reason Required", Id = "43c18f9b-8bd4-462c-8bb7-1577444138a6"
this.UseDataFilter = true;
this.PreProcessing_A48B7EFD05A74798A5432930FE652DE0_A001();
this.RefreshData(matched: false);
goto finish;
block003: // Name = "Condition 2", Id = "833b1327-2bb9-430b-8b4a-6c6c46b69b22"
this.ClearDataFilter();
conditionBlockValue =
this.PreProcessing_A48B7EFD05A74798A5432930FE652DE0_C003()
|| this.PreProcessing_A48B7EFD05A74798A5432930FE652DE0_C004()
|| this.PreProcessing_A48B7EFD05A74798A5432930FE652DE0_C005()
|| this.PreProcessing_A48B7EFD05A74798A5432930FE652DE0_C006();
if (!conditionBlockValue) goto finish;
this.FilterData(row =>
{
var isOk =
this.PreProcessing_A48B7EFD05A74798A5432930FE652DE0_C003(row)
|| this.PreProcessing_A48B7EFD05A74798A5432930FE652DE0_C004(row)
|| this.PreProcessing_A48B7EFD05A74798A5432930FE652DE0_C005(row)
|| this.PreProcessing_A48B7EFD05A74798A5432930FE652DE0_C006(row);
return isOk;
});
block004: // Name = "Disposition Required", Id = "dbcb4fe5-5423-423d-880c-ab3dc721799b"
this.UseDataFilter = true;
this.PreProcessing_A48B7EFD05A74798A5432930FE652DE0_A002();
this.RefreshData(matched: false);
finish:
;
}
private bool PreProcessing_A48B7EFD05A74798A5432930FE652DE0_C001(object currentRow = null)
{
if (currentRow == null)
{
return this.ttECORev.Any(r =>
r.Updated());
}
var typedRow = currentRow as Erp.Tablesets.ECORevRow;
if (typedRow == null) return true;
return typedRow.Updated();
}
private bool PreProcessing_A48B7EFD05A74798A5432930FE652DE0_C002(object currentRow = null)
{
if (currentRow == null)
{
return this.ttECORev.Any(r => !r.Unchanged() && string.Equals(r.UDField<System.String>("ChangeReason_c"), (""), StringComparison.OrdinalIgnoreCase));
}
var typedRow = currentRow as Erp.Tablesets.ECORevRow;
if (typedRow == null) return true;
return !typedRow.Unchanged() && string.Equals(typedRow.UDField<System.String>("ChangeReason_c"), (""), StringComparison.OrdinalIgnoreCase);
}
private void PreProcessing_A48B7EFD05A74798A5432930FE652DE0_A001()
{
var message =
"Reason for Change is Required";
throw new Ice.Common.BusinessObjectException(
new Ice.Common.BusinessObjectMessage(message)
{
Type = Ice.Common.BusinessObjectMessageType.Error,
});
}
private bool PreProcessing_A48B7EFD05A74798A5432930FE652DE0_C003(object currentRow = null)
{
if (currentRow == null)
{
return this.ttECORev.Any(r => !r.Unchanged() && string.Equals(r.UDField<System.String>("DipsOrder_c"), (""), StringComparison.OrdinalIgnoreCase));
}
var typedRow = currentRow as Erp.Tablesets.ECORevRow;
if (typedRow == null) return true;
return !typedRow.Unchanged() && string.Equals(typedRow.UDField<System.String>("DipsOrder_c"), (""), StringComparison.OrdinalIgnoreCase);
}
private bool PreProcessing_A48B7EFD05A74798A5432930FE652DE0_C004(object currentRow = null)
{
if (currentRow == null)
{
return this.ttECORev.Any(r => !r.Unchanged() && string.Equals(r.UDField<System.String>("DipsField_c"), (""), StringComparison.OrdinalIgnoreCase));
}
var typedRow = currentRow as Erp.Tablesets.ECORevRow;
if (typedRow == null) return true;
return !typedRow.Unchanged() && string.Equals(typedRow.UDField<System.String>("DipsField_c"), (""), StringComparison.OrdinalIgnoreCase);
}
private bool PreProcessing_A48B7EFD05A74798A5432930FE652DE0_C005(object currentRow = null)
{
if (currentRow == null)
{
return this.ttECORev.Any(r => !r.Unchanged() && string.Equals(r.UDField<System.String>("DipsProcess_c"), (""), StringComparison.OrdinalIgnoreCase));
}
var typedRow = currentRow as Erp.Tablesets.ECORevRow;
if (typedRow == null) return true;
return !typedRow.Unchanged() && string.Equals(typedRow.UDField<System.String>("DipsProcess_c"), (""), StringComparison.OrdinalIgnoreCase);
}
private bool PreProcessing_A48B7EFD05A74798A5432930FE652DE0_C006(object currentRow = null)
{
if (currentRow == null)
{
return this.ttECORev.Any(r => !r.Unchanged() && string.Equals(r.UDField<System.String>("DipsStock_c"), (""), StringComparison.OrdinalIgnoreCase));
}
var typedRow = currentRow as Erp.Tablesets.ECORevRow;
if (typedRow == null) return true;
return !typedRow.Unchanged() && string.Equals(typedRow.UDField<System.String>("DipsStock_c"), (""), StringComparison.OrdinalIgnoreCase);
}
private void PreProcessing_A48B7EFD05A74798A5432930FE652DE0_A002()
{
var message =
"You must select either User, Rework, Scrap or N/A for Parts on Order, Process, Stock and Field Dispositions in the Revision Details Tab";
throw new Ice.Common.BusinessObjectException(
new Ice.Common.BusinessObjectMessage(message)
{
Type = Ice.Common.BusinessObjectMessageType.Error,
});
}
private void PreProcessing_7E47989BDD054318919F4E5E935DC6FD()
{
var conditionBlockValue = false;
start: // Name = "If Initial Approval", Id = "68e073eb-b357-423c-bb98-3a71ff404f57"
this.ClearDataFilter();
conditionBlockValue =
this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C001();
if (!conditionBlockValue) goto finish;
this.FilterData(row =>
{
var isOk =
this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C001(row);
return isOk;
});
block001: // Name = "2nd Eng", Id = "a11b9cc9-e53e-4cbd-bc0a-5ce19eb96dda"
this.ClearDataFilter();
conditionBlockValue =
this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C002()
&& this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C003();
if (!conditionBlockValue) goto block003;
this.FilterData(row =>
{
var isOk =
this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C002(row)
&& this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C003(row);
return isOk;
});
block002: // Name = "Raise Exception 0", Id = "59553b5d-0263-479a-9663-208874ecede2"
this.UseDataFilter = true;
this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_A001();
this.RefreshData(matched: false);
goto finish;
block003: // Name = "Mfg", Id = "5855d184-13f9-40e0-a871-a8b5931baf99"
this.ClearDataFilter();
conditionBlockValue =
this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C004();
if (!conditionBlockValue) goto block005;
this.FilterData(row =>
{
var isOk =
this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C004(row);
return isOk;
});
block004: // Name = "Raise Exception 2", Id = "89cd800c-49ed-4f81-8a50-1e1d58a06720"
this.UseDataFilter = true;
this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_A002();
this.RefreshData(matched: false);
goto finish;
block005: // Name = "Mngr", Id = "07b118e0-c902-4add-b8c2-82e792bf12d8"
this.ClearDataFilter();
conditionBlockValue =
this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C005();
if (!conditionBlockValue) goto block007;
this.FilterData(row =>
{
var isOk =
this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C005(row);
return isOk;
});
block006: // Name = "Raise Exception 3", Id = "bbcb8a36-578b-4cdf-983b-87d90150aa57"
this.UseDataFilter = true;
this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_A003();
this.RefreshData(matched: false);
goto finish;
block007: // Name = "Prod", Id = "ac6afe5f-9930-42e5-9867-8fb664d74069"
this.ClearDataFilter();
conditionBlockValue =
this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C006()
&& this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C007();
if (!conditionBlockValue) goto block009;
this.FilterData(row =>
{
var isOk =
this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C006(row)
&& this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C007(row);
return isOk;
});
block008: // Name = "Raise Exception 4", Id = "9b8e3c50-ea6e-4fcc-8a62-4e9149a8a3ae"
this.UseDataFilter = true;
this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_A004();
this.RefreshData(matched: false);
goto finish;
block009: // Name = "QA", Id = "27c3b4a4-deb2-4f70-87c3-48214753ba56"
this.ClearDataFilter();
conditionBlockValue =
this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C008()
&& this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C009();
if (!conditionBlockValue) goto block011;
this.FilterData(row =>
{
var isOk =
this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C008(row)
&& this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C009(row);
return isOk;
});
block010: // Name = "Raise Exception 5", Id = "ad7835d4-8c2a-4f42-be52-7a0071e35c15"
this.UseDataFilter = true;
this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_A005();
this.RefreshData(matched: false);
goto finish;
block011: // Name = "Inv", Id = "e1d52e69-6371-4026-9631-405ade598a75"
this.ClearDataFilter();
conditionBlockValue =
this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C010()
&& this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C011();
if (!conditionBlockValue) goto block013;
this.FilterData(row =>
{
var isOk =
this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C010(row)
&& this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C011(row);
return isOk;
});
block012: // Name = "Raise Exception 6", Id = "8fdb5d68-353a-4f57-b3c1-21dd8abaec86"
this.UseDataFilter = true;
this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_A006();
this.RefreshData(matched: false);
goto finish;
block013: // Name = "Fin", Id = "c7928490-4a96-468c-80ee-0d1fa2c4d2e8"
this.ClearDataFilter();
conditionBlockValue =
this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C012()
&& this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C013();
if (!conditionBlockValue) goto block015;
this.FilterData(row =>
{
var isOk =
this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C012(row)
&& this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C013(row);
return isOk;
});
block014: // Name = "Raise Exception 7", Id = "c6d643c8-d335-4cc4-bb31-9c94cc971ed5"
this.UseDataFilter = true;
this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_A007();
this.RefreshData(matched: false);
goto finish;
block015: // Name = "Purch", Id = "c02fbd81-f046-42db-8267-1c3b6a46a5de"
this.ClearDataFilter();
conditionBlockValue =
this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C014()
&& this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C015();
if (!conditionBlockValue) goto block017;
this.FilterData(row =>
{
var isOk =
this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C014(row)
&& this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C015(row);
return isOk;
});
block016: // Name = "Raise Exception 8", Id = "b38c5cc6-01b6-43a9-868d-0367ef3498e4"
this.UseDataFilter = true;
this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_A008();
this.RefreshData(matched: false);
goto finish;
block017: // Name = "SupChain", Id = "230f26bc-e5f3-450e-9ab8-ac802a72215f"
this.ClearDataFilter();
conditionBlockValue =
this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C016()
&& this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C017();
if (!conditionBlockValue) goto block019;
this.FilterData(row =>
{
var isOk =
this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C016(row)
&& this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C017(row);
return isOk;
});
block018: // Name = "Raise Exception 9", Id = "fa1573c8-1825-4738-b0d2-86f95ee20958"
this.UseDataFilter = true;
this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_A009();
this.RefreshData(matched: false);
goto finish;
block019: // Name = "Service", Id = "aacd7444-07cf-4e31-8d9b-5bf889851b63"
this.ClearDataFilter();
conditionBlockValue =
this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C018()
&& this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C019();
if (!conditionBlockValue) goto block021;
this.FilterData(row =>
{
var isOk =
this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C018(row)
&& this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C019(row);
return isOk;
});
block020: // Name = "Raise Exception 10", Id = "e7f1eaa0-4c6a-4009-a54c-5e824bf24983"
this.UseDataFilter = true;
this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_A010();
this.RefreshData(matched: false);
goto finish;
block021: // Name = "Sales", Id = "2d21680d-9185-4439-86ad-e3b609812363"
this.ClearDataFilter();
conditionBlockValue =
this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C020()
&& this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C021();
if (!conditionBlockValue) goto block023;
this.FilterData(row =>
{
var isOk =
this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C020(row)
&& this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C021(row);
return isOk;
});
block022: // Name = "Raise Exception 11", Id = "646e1697-acca-44b8-8c8a-346bd3c20f5d"
this.UseDataFilter = true;
this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_A011();
this.RefreshData(matched: false);
goto finish;
block023: // Name = "Mkt", Id = "e51d100e-2af6-46ef-956a-fe9123318fe4"
this.ClearDataFilter();
conditionBlockValue =
this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C022()
&& this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C023();
if (!conditionBlockValue) goto finish;
this.FilterData(row =>
{
var isOk =
this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C022(row)
&& this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C023(row);
return isOk;
});
block024: // Name = "Raise Exception 12", Id = "c9e83a5c-a133-4e7b-8609-e80d2e58f18f"
this.UseDataFilter = true;
this.PreProcessing_7E47989BDD054318919F4E5E935DC6FD_A012();
this.RefreshData(matched: false);
finish:
;
}
private bool PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C001(object currentRow = null)
{
if (currentRow == null)
{
return this.ttECORev.Any(r => !r.Unchanged() && string.Equals(r.UDField<System.String>("EngResolution_c"), ("Pass"), StringComparison.OrdinalIgnoreCase));
}
var typedRow = currentRow as Erp.Tablesets.ECORevRow;
if (typedRow == null) return true;
return !typedRow.Unchanged() && string.Equals(typedRow.UDField<System.String>("EngResolution_c"), ("Pass"), StringComparison.OrdinalIgnoreCase);
}
private bool PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C002(object currentRow = null)
{
if (currentRow == null)
{
return this.ttECORev.Any(r => !r.Unchanged() && r.UDField<System.Boolean>("Eng2Required_c") == ((true)));
}
var typedRow = currentRow as Erp.Tablesets.ECORevRow;
if (typedRow == null) return true;
return !typedRow.Unchanged() && typedRow.UDField<System.Boolean>("Eng2Required_c") == ((true));
}
private bool PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C003(object currentRow = null)
{
if (currentRow == null)
{
return this.ttECORev.Any(r => !r.Unchanged() && string.Equals(r.UDField<System.String>("Eng2AssignedTo_c"), (""), StringComparison.OrdinalIgnoreCase));
}
var typedRow = currentRow as Erp.Tablesets.ECORevRow;
if (typedRow == null) return true;
return !typedRow.Unchanged() && string.Equals(typedRow.UDField<System.String>("Eng2AssignedTo_c"), (""), StringComparison.OrdinalIgnoreCase);
}
private void PreProcessing_7E47989BDD054318919F4E5E935DC6FD_A001()
{
var message =
"You must assign this revision to a Secondary Engineer for Approval.";
throw new Ice.Common.BusinessObjectException(
new Ice.Common.BusinessObjectMessage(message)
{
Type = Ice.Common.BusinessObjectMessageType.Error,
});
}
private bool PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C004(object currentRow = null)
{
if (currentRow == null)
{
return this.ttECORev.Any(r => !r.Unchanged() && string.Equals(r.UDField<System.String>("MfgAssignedTo_c"), (""), StringComparison.OrdinalIgnoreCase));
}
var typedRow = currentRow as Erp.Tablesets.ECORevRow;
if (typedRow == null) return true;
return !typedRow.Unchanged() && string.Equals(typedRow.UDField<System.String>("MfgAssignedTo_c"), (""), StringComparison.OrdinalIgnoreCase);
}
private void PreProcessing_7E47989BDD054318919F4E5E935DC6FD_A002()
{
var message =
"You must assign this revision to a Manufacturing Engineer for approval.";
throw new Ice.Common.BusinessObjectException(
new Ice.Common.BusinessObjectMessage(message)
{
Type = Ice.Common.BusinessObjectMessageType.Error,
});
}
private bool PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C005(object currentRow = null)
{
if (currentRow == null)
{
return this.ttECORev.Any(r => !r.Unchanged() && string.Equals(r.UDField<System.String>("MngrAssignedTo_c"), (""), StringComparison.OrdinalIgnoreCase));
}
var typedRow = currentRow as Erp.Tablesets.ECORevRow;
if (typedRow == null) return true;
return !typedRow.Unchanged() && string.Equals(typedRow.UDField<System.String>("MngrAssignedTo_c"), (""), StringComparison.OrdinalIgnoreCase);
}
private void PreProcessing_7E47989BDD054318919F4E5E935DC6FD_A003()
{
var message =
"You must assign this revision to an Engineering Manager for Final Approval.";
throw new Ice.Common.BusinessObjectException(
new Ice.Common.BusinessObjectMessage(message)
{
Type = Ice.Common.BusinessObjectMessageType.Error,
});
}
private bool PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C006(object currentRow = null)
{
if (currentRow == null)
{
return this.ttECORev.Any(r => !r.Unchanged() && r.UDField<System.Boolean>("Dept_Prod_c") == ((true)));
}
var typedRow = currentRow as Erp.Tablesets.ECORevRow;
if (typedRow == null) return true;
return !typedRow.Unchanged() && typedRow.UDField<System.Boolean>("Dept_Prod_c") == ((true));
}
private bool PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C007(object currentRow = null)
{
if (currentRow == null)
{
return this.ttECORev.Any(r => !r.Unchanged() && string.Equals(r.UDField<System.String>("ProdAssignedTo_c"), (""), StringComparison.OrdinalIgnoreCase));
}
var typedRow = currentRow as Erp.Tablesets.ECORevRow;
if (typedRow == null) return true;
return !typedRow.Unchanged() && string.Equals(typedRow.UDField<System.String>("ProdAssignedTo_c"), (""), StringComparison.OrdinalIgnoreCase);
}
private void PreProcessing_7E47989BDD054318919F4E5E935DC6FD_A004()
{
var message =
"This revision must be assigned to someone in the Production Department for approval.";
throw new Ice.Common.BusinessObjectException(
new Ice.Common.BusinessObjectMessage(message)
{
Type = Ice.Common.BusinessObjectMessageType.Error,
});
}
private bool PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C008(object currentRow = null)
{
if (currentRow == null)
{
return this.ttECORev.Any(r => !r.Unchanged() && r.UDField<System.Boolean>("Dept_QA_c") == ((true)));
}
var typedRow = currentRow as Erp.Tablesets.ECORevRow;
if (typedRow == null) return true;
return !typedRow.Unchanged() && typedRow.UDField<System.Boolean>("Dept_QA_c") == ((true));
}
private bool PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C009(object currentRow = null)
{
if (currentRow == null)
{
return this.ttECORev.Any(r => !r.Unchanged() && string.Equals(r.UDField<System.String>("QAAssignedTo_c"), (""), StringComparison.OrdinalIgnoreCase));
}
var typedRow = currentRow as Erp.Tablesets.ECORevRow;
if (typedRow == null) return true;
return !typedRow.Unchanged() && string.Equals(typedRow.UDField<System.String>("QAAssignedTo_c"), (""), StringComparison.OrdinalIgnoreCase);
}
private void PreProcessing_7E47989BDD054318919F4E5E935DC6FD_A005()
{
var message =
"This revision must be assigned to someone in the Quality Assurance Department for approval.";
throw new Ice.Common.BusinessObjectException(
new Ice.Common.BusinessObjectMessage(message)
{
Type = Ice.Common.BusinessObjectMessageType.Error,
});
}
private bool PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C010(object currentRow = null)
{
if (currentRow == null)
{
return this.ttECORev.Any(r => !r.Unchanged() && r.UDField<System.Boolean>("Dept_Inv_c") == ((true)));
}
var typedRow = currentRow as Erp.Tablesets.ECORevRow;
if (typedRow == null) return true;
return !typedRow.Unchanged() && typedRow.UDField<System.Boolean>("Dept_Inv_c") == ((true));
}
private bool PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C011(object currentRow = null)
{
if (currentRow == null)
{
return this.ttECORev.Any(r => !r.Unchanged() && string.Equals(r.UDField<System.String>("InvAssignedTo_c"), (""), StringComparison.OrdinalIgnoreCase));
}
var typedRow = currentRow as Erp.Tablesets.ECORevRow;
if (typedRow == null) return true;
return !typedRow.Unchanged() && string.Equals(typedRow.UDField<System.String>("InvAssignedTo_c"), (""), StringComparison.OrdinalIgnoreCase);
}
private void PreProcessing_7E47989BDD054318919F4E5E935DC6FD_A006()
{
var message =
"This revision must be assigned to someone in the Inventory Management Department for approval.";
throw new Ice.Common.BusinessObjectException(
new Ice.Common.BusinessObjectMessage(message)
{
Type = Ice.Common.BusinessObjectMessageType.Error,
});
}
private bool PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C012(object currentRow = null)
{
if (currentRow == null)
{
return this.ttECORev.Any(r => !r.Unchanged() && r.UDField<System.Boolean>("Dept_Finance_c") == ((true)));
}
var typedRow = currentRow as Erp.Tablesets.ECORevRow;
if (typedRow == null) return true;
return !typedRow.Unchanged() && typedRow.UDField<System.Boolean>("Dept_Finance_c") == ((true));
}
private bool PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C013(object currentRow = null)
{
if (currentRow == null)
{
return this.ttECORev.Any(r => !r.Unchanged() && string.Equals(r.UDField<System.String>("FinAssignedTo_c"), (""), StringComparison.OrdinalIgnoreCase));
}
var typedRow = currentRow as Erp.Tablesets.ECORevRow;
if (typedRow == null) return true;
return !typedRow.Unchanged() && string.Equals(typedRow.UDField<System.String>("FinAssignedTo_c"), (""), StringComparison.OrdinalIgnoreCase);
}
private void PreProcessing_7E47989BDD054318919F4E5E935DC6FD_A007()
{
var message =
"This revision must be assigned to someone in the Finance Department for approval.";
throw new Ice.Common.BusinessObjectException(
new Ice.Common.BusinessObjectMessage(message)
{
Type = Ice.Common.BusinessObjectMessageType.Error,
});
}
private bool PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C014(object currentRow = null)
{
if (currentRow == null)
{
return this.ttECORev.Any(r => !r.Unchanged() && r.UDField<System.Boolean>("Dept_Purch_c") == ((true)));
}
var typedRow = currentRow as Erp.Tablesets.ECORevRow;
if (typedRow == null) return true;
return !typedRow.Unchanged() && typedRow.UDField<System.Boolean>("Dept_Purch_c") == ((true));
}
private bool PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C015(object currentRow = null)
{
if (currentRow == null)
{
return this.ttECORev.Any(r => !r.Unchanged() && string.Equals(r.UDField<System.String>("PurchAssignedTo_c"), (""), StringComparison.OrdinalIgnoreCase));
}
var typedRow = currentRow as Erp.Tablesets.ECORevRow;
if (typedRow == null) return true;
return !typedRow.Unchanged() && string.Equals(typedRow.UDField<System.String>("PurchAssignedTo_c"), (""), StringComparison.OrdinalIgnoreCase);
}
private void PreProcessing_7E47989BDD054318919F4E5E935DC6FD_A008()
{
var message =
"This revision must be assigned to someone in the Purchasing Department for approval.";
throw new Ice.Common.BusinessObjectException(
new Ice.Common.BusinessObjectMessage(message)
{
Type = Ice.Common.BusinessObjectMessageType.Error,
});
}
private bool PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C016(object currentRow = null)
{
if (currentRow == null)
{
return this.ttECORev.Any(r => !r.Unchanged() && r.UDField<System.Boolean>("Dept_SupChain_c") == ((true)));
}
var typedRow = currentRow as Erp.Tablesets.ECORevRow;
if (typedRow == null) return true;
return !typedRow.Unchanged() && typedRow.UDField<System.Boolean>("Dept_SupChain_c") == ((true));
}
private bool PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C017(object currentRow = null)
{
if (currentRow == null)
{
return this.ttECORev.Any(r => !r.Unchanged() && string.Equals(r.UDField<System.String>("SupChainAssignedTo_c"), (""), StringComparison.OrdinalIgnoreCase));
}
var typedRow = currentRow as Erp.Tablesets.ECORevRow;
if (typedRow == null) return true;
return !typedRow.Unchanged() && string.Equals(typedRow.UDField<System.String>("SupChainAssignedTo_c"), (""), StringComparison.OrdinalIgnoreCase);
}
private void PreProcessing_7E47989BDD054318919F4E5E935DC6FD_A009()
{
var message =
"This revision must be assigned to someone in the Supply Chain Department for approval.";
throw new Ice.Common.BusinessObjectException(
new Ice.Common.BusinessObjectMessage(message)
{
Type = Ice.Common.BusinessObjectMessageType.Error,
});
}
private bool PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C018(object currentRow = null)
{
if (currentRow == null)
{
return this.ttECORev.Any(r => !r.Unchanged() && r.UDField<System.Boolean>("Dept_Serv_c") == ((true)));
}
var typedRow = currentRow as Erp.Tablesets.ECORevRow;
if (typedRow == null) return true;
return !typedRow.Unchanged() && typedRow.UDField<System.Boolean>("Dept_Serv_c") == ((true));
}
private bool PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C019(object currentRow = null)
{
if (currentRow == null)
{
return this.ttECORev.Any(r => !r.Unchanged() && string.Equals(r.UDField<System.String>("ServAssignedTo_c"), (""), StringComparison.OrdinalIgnoreCase));
}
var typedRow = currentRow as Erp.Tablesets.ECORevRow;
if (typedRow == null) return true;
return !typedRow.Unchanged() && string.Equals(typedRow.UDField<System.String>("ServAssignedTo_c"), (""), StringComparison.OrdinalIgnoreCase);
}
private void PreProcessing_7E47989BDD054318919F4E5E935DC6FD_A010()
{
var message =
"This revision needs to be assigned to someone in the Service Department for approval";
throw new Ice.Common.BusinessObjectException(
new Ice.Common.BusinessObjectMessage(message)
{
Type = Ice.Common.BusinessObjectMessageType.Error,
});
}
private bool PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C020(object currentRow = null)
{
if (currentRow == null)
{
return this.ttECORev.Any(r => !r.Unchanged() && r.UDField<System.Boolean>("Dept_Sales_c") == ((true)));
}
var typedRow = currentRow as Erp.Tablesets.ECORevRow;
if (typedRow == null) return true;
return !typedRow.Unchanged() && typedRow.UDField<System.Boolean>("Dept_Sales_c") == ((true));
}
private bool PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C021(object currentRow = null)
{
if (currentRow == null)
{
return this.ttECORev.Any(r => !r.Unchanged() && string.Equals(r.UDField<System.String>("SalesAssignedTo_c"), (""), StringComparison.OrdinalIgnoreCase));
}
var typedRow = currentRow as Erp.Tablesets.ECORevRow;
if (typedRow == null) return true;
return !typedRow.Unchanged() && string.Equals(typedRow.UDField<System.String>("SalesAssignedTo_c"), (""), StringComparison.OrdinalIgnoreCase);
}
private void PreProcessing_7E47989BDD054318919F4E5E935DC6FD_A011()
{
var message =
"This revision needs to be assigned to someone in the Sales Department for approval.";
throw new Ice.Common.BusinessObjectException(
new Ice.Common.BusinessObjectMessage(message)
{
Type = Ice.Common.BusinessObjectMessageType.Error,
});
}
private bool PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C022(object currentRow = null)
{
if (currentRow == null)
{
return this.ttECORev.Any(r => !r.Unchanged() && r.UDField<System.Boolean>("Dept_Mkt_c") == ((true)));
}
var typedRow = currentRow as Erp.Tablesets.ECORevRow;
if (typedRow == null) return true;
return !typedRow.Unchanged() && typedRow.UDField<System.Boolean>("Dept_Mkt_c") == ((true));
}
private bool PreProcessing_7E47989BDD054318919F4E5E935DC6FD_C023(object currentRow = null)
{
if (currentRow == null)
{
return this.ttECORev.Any(r => !r.Unchanged() && string.Equals(r.UDField<System.String>("MktAssignedTo_c"), (""), StringComparison.OrdinalIgnoreCase));
}
var typedRow = currentRow as Erp.Tablesets.ECORevRow;
if (typedRow == null) return true;
return !typedRow.Unchanged() && string.Equals(typedRow.UDField<System.String>("MktAssignedTo_c"), (""), StringComparison.OrdinalIgnoreCase);
}
private void PreProcessing_7E47989BDD054318919F4E5E935DC6FD_A012()
{
var message =
"This revision needs to be assigned to someone in the Marketing Department for approval.";
throw new Ice.Common.BusinessObjectException(
new Ice.Common.BusinessObjectMessage(message)
{
Type = Ice.Common.BusinessObjectMessageType.Error,
});
}
#endregion // Directives
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment