CSLA - Extension
This commit is contained in:
@@ -3,7 +3,6 @@ using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Csla;
|
||||
using Csla.Data;
|
||||
using Csla.Validation;
|
||||
using System.Data.SqlClient;
|
||||
using System.Data;
|
||||
using Volian.Base.Library;
|
||||
@@ -143,35 +142,20 @@ namespace VEPROMS.CSLA.Library
|
||||
public delegate void ItemInfoListCCEvent(object sender, ItemInfoListCCEventArgs args);
|
||||
public class ItemInfoListCCEventArgs : EventArgs
|
||||
{
|
||||
private ProcedureInfo _MyProcedure;
|
||||
public ProcedureInfo MyProcedure { get; set; }
|
||||
|
||||
public ProcedureInfo MyProcedure
|
||||
public int MyCount { get; set; }
|
||||
public ItemInfoListCCEventArgs(ProcedureInfo myProcedure, int myCount)
|
||||
{
|
||||
get { return _MyProcedure; }
|
||||
set { _MyProcedure = value; }
|
||||
}
|
||||
private int _MyCount;
|
||||
|
||||
public int MyCount
|
||||
{
|
||||
get { return _MyCount; }
|
||||
set { _MyCount = value; }
|
||||
}
|
||||
public ItemInfoListCCEventArgs(ProcedureInfo myProcedure, int myCount)
|
||||
{
|
||||
_MyProcedure = myProcedure;
|
||||
_MyCount = myCount;
|
||||
MyProcedure = myProcedure;
|
||||
MyCount = myCount;
|
||||
}
|
||||
}
|
||||
public partial class ItemInfoList
|
||||
{
|
||||
public static event ItemInfoListCCEvent ConsistencyCheckUpdated;
|
||||
private static void OnConsistencyCheckUpdated(object sender, ItemInfoListCCEventArgs args)
|
||||
{
|
||||
if (ConsistencyCheckUpdated != null)
|
||||
ConsistencyCheckUpdated(sender, args);
|
||||
}
|
||||
public static ItemInfoList GetMoreProcedures(List<ProcedureInfo> procs)
|
||||
private static void OnConsistencyCheckUpdated(object sender, ItemInfoListCCEventArgs args) => ConsistencyCheckUpdated?.Invoke(sender, args);
|
||||
public static ItemInfoList GetMoreProcedures(List<ProcedureInfo> procs)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder("<Items>");
|
||||
int count = 1;
|
||||
@@ -290,11 +274,8 @@ namespace VEPROMS.CSLA.Library
|
||||
get { return _DocVersionID; }
|
||||
set { _DocVersionID = value; }
|
||||
}
|
||||
public ItemListAllInConsistenciesCriteria(int docVersionID)
|
||||
{
|
||||
_DocVersionID = docVersionID;
|
||||
}
|
||||
}
|
||||
public ItemListAllInConsistenciesCriteria(int docVersionID) => _DocVersionID = docVersionID;
|
||||
}
|
||||
private void DataPortal_Fetch(ItemListAllInConsistenciesCriteria criteria)
|
||||
{
|
||||
this.RaiseListChangedEvents = false;
|
||||
@@ -359,16 +340,9 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
public static Revision GetByItemIDAndRevisionNumber(int itemID, string revisionNumber)
|
||||
{
|
||||
if (!CanGetObject())
|
||||
throw new System.Security.SecurityException("User not authorized to view a Revision");
|
||||
try
|
||||
{
|
||||
//Revision tmp = GetCachedByPrimaryKey(revisionID);
|
||||
//if (tmp == null)
|
||||
//{
|
||||
Revision tmp = DataPortal.Fetch<Revision>(new ItemRevisionNumberCriteria(itemID, revisionNumber));
|
||||
// AddToCache(tmp);
|
||||
//}
|
||||
Revision tmp = DataPortal.Fetch<Revision>(new ItemRevisionNumberCriteria(itemID, revisionNumber));
|
||||
if (tmp.ErrorMessage == "No Record Found")
|
||||
{
|
||||
tmp.Dispose(); // Clean-up Revision
|
||||
@@ -384,13 +358,11 @@ namespace VEPROMS.CSLA.Library
|
||||
[Serializable()]
|
||||
protected class ItemRevisionNumberCriteria
|
||||
{
|
||||
private int _ItemID;
|
||||
public int ItemID
|
||||
{ get { return _ItemID; } }
|
||||
private string _RevisionNumber;
|
||||
public string RevisionNumber
|
||||
{ get { return _RevisionNumber; } }
|
||||
public ItemRevisionNumberCriteria(int itemID, string revisionNumber)
|
||||
private readonly int _ItemID;
|
||||
public int ItemID => _ItemID;
|
||||
private readonly string _RevisionNumber;
|
||||
public string RevisionNumber => _RevisionNumber;
|
||||
public ItemRevisionNumberCriteria(int itemID, string revisionNumber)
|
||||
{
|
||||
_ItemID = itemID;
|
||||
_RevisionNumber = revisionNumber;
|
||||
@@ -442,16 +414,9 @@ namespace VEPROMS.CSLA.Library
|
||||
//jcb 20120625
|
||||
public static Revision GetByItemIDAndRevisionNumberAndUnitID(int itemID, string revisionNumber, int unitID)
|
||||
{
|
||||
if (!CanGetObject())
|
||||
throw new System.Security.SecurityException("User not authorized to view a Revision");
|
||||
try
|
||||
{
|
||||
//Revision tmp = GetCachedByPrimaryKey(revisionID);
|
||||
//if (tmp == null)
|
||||
//{
|
||||
Revision tmp = DataPortal.Fetch<Revision>(new UnitItemRevisionNumberCriteria(itemID, revisionNumber, unitID));
|
||||
// AddToCache(tmp);
|
||||
//}
|
||||
if (tmp.ErrorMessage == "No Record Found")
|
||||
{
|
||||
tmp.Dispose(); // Clean-up Revision
|
||||
@@ -467,16 +432,13 @@ namespace VEPROMS.CSLA.Library
|
||||
[Serializable()]
|
||||
protected class UnitItemRevisionNumberCriteria
|
||||
{
|
||||
private int _ItemID;
|
||||
public int ItemID
|
||||
{ get { return _ItemID; } }
|
||||
private string _RevisionNumber;
|
||||
public string RevisionNumber
|
||||
{ get { return _RevisionNumber; } }
|
||||
private int _UnitID;
|
||||
public int UnitID
|
||||
{ get { return _UnitID; } }
|
||||
public UnitItemRevisionNumberCriteria(int itemID, string revisionNumber, int unitID)
|
||||
private readonly int _ItemID;
|
||||
public int ItemID => _ItemID;
|
||||
private readonly string _RevisionNumber;
|
||||
public string RevisionNumber => _RevisionNumber;
|
||||
private readonly int _UnitID;
|
||||
public int UnitID => _UnitID;
|
||||
public UnitItemRevisionNumberCriteria(int itemID, string revisionNumber, int unitID)
|
||||
{
|
||||
_ItemID = itemID;
|
||||
_RevisionNumber = revisionNumber;
|
||||
@@ -535,12 +497,9 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
try
|
||||
{
|
||||
//if (_RevisionInfoList != null)
|
||||
// return _RevisionInfoList;
|
||||
RevisionInfoList tmp = DataPortal.Fetch<RevisionInfoList>(new ItemCriteria(itemID));
|
||||
RevisionInfo.AddList(tmp);
|
||||
tmp.AddEvents();
|
||||
//_RevisionInfoList = tmp;
|
||||
return tmp;
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -551,14 +510,10 @@ namespace VEPROMS.CSLA.Library
|
||||
[Serializable()]
|
||||
protected class ItemCriteria
|
||||
{
|
||||
private int _ItemID;
|
||||
public int ItemID
|
||||
{ get { return _ItemID; } }
|
||||
public ItemCriteria(int itemID)
|
||||
{
|
||||
_ItemID = itemID;
|
||||
}
|
||||
}
|
||||
private readonly int _ItemID;
|
||||
public int ItemID => _ItemID;
|
||||
public ItemCriteria(int itemID) => _ItemID = itemID;
|
||||
}
|
||||
private void DataPortal_Fetch(ItemCriteria criteria)
|
||||
{
|
||||
this.RaiseListChangedEvents = false;
|
||||
@@ -594,12 +549,9 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
try
|
||||
{
|
||||
//if (_RevisionInfoList != null)
|
||||
// return _RevisionInfoList;
|
||||
RevisionInfoList tmp = DataPortal.Fetch<RevisionInfoList>(new ItemUnitCriteria(itemID, unitID));
|
||||
RevisionInfo.AddList(tmp);
|
||||
tmp.AddEvents();
|
||||
//_RevisionInfoList = tmp;
|
||||
return tmp;
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -610,13 +562,11 @@ namespace VEPROMS.CSLA.Library
|
||||
[Serializable()]
|
||||
protected class ItemUnitCriteria
|
||||
{
|
||||
private int _ItemID;
|
||||
public int ItemID
|
||||
{ get { return _ItemID; } }
|
||||
private int _UnitID;
|
||||
public int UnitID
|
||||
{ get { return _UnitID; } }
|
||||
public ItemUnitCriteria(int itemID, int unitID)
|
||||
private readonly int _ItemID;
|
||||
public int ItemID => _ItemID;
|
||||
private readonly int _UnitID;
|
||||
public int UnitID => _UnitID;
|
||||
public ItemUnitCriteria(int itemID, int unitID)
|
||||
{
|
||||
_ItemID = itemID;
|
||||
_UnitID = unitID;
|
||||
@@ -671,14 +621,10 @@ namespace VEPROMS.CSLA.Library
|
||||
[Serializable()]
|
||||
protected class ItemCriteria
|
||||
{
|
||||
private int _ItemID;
|
||||
public int ItemID
|
||||
{ get { return _ItemID; } }
|
||||
public ItemCriteria(int itemID)
|
||||
{
|
||||
_ItemID = itemID;
|
||||
}
|
||||
private int _UnitID = 0;
|
||||
private readonly int _ItemID;
|
||||
public int ItemID => _ItemID;
|
||||
public ItemCriteria(int itemID) => _ItemID = itemID;
|
||||
private int _UnitID = 0;
|
||||
public int UnitID
|
||||
{
|
||||
get{return _UnitID;}
|
||||
@@ -696,12 +642,9 @@ namespace VEPROMS.CSLA.Library
|
||||
[Serializable()]
|
||||
protected class CurrentItemUnitCriteria : ItemCriteria
|
||||
{
|
||||
public CurrentItemUnitCriteria(int itemID, int unitID)
|
||||
: base(itemID)
|
||||
{
|
||||
UnitID = unitID;
|
||||
}
|
||||
}
|
||||
public CurrentItemUnitCriteria(int itemID, int unitID)
|
||||
: base(itemID) => UnitID = unitID;
|
||||
}
|
||||
[Serializable()]
|
||||
protected class PreviousItemCriteria : ItemCriteria
|
||||
{
|
||||
@@ -714,12 +657,6 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
try
|
||||
{
|
||||
//RevisionInfo tmp = GetCachedByPrimaryKey(revisionID);
|
||||
//if (tmp == null)
|
||||
//{
|
||||
// tmp = DataPortal.Fetch<RevisionInfo>(new PKCriteria(revisionID));
|
||||
// AddToCache(tmp);
|
||||
//}
|
||||
RevisionInfo tmp = DataPortal.Fetch<RevisionInfo>(new CurrentItemCriteria(itemID));
|
||||
if (tmp.ErrorMessage == "No Record Found")
|
||||
{
|
||||
@@ -754,12 +691,6 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
try
|
||||
{
|
||||
//RevisionInfo tmp = GetCachedByPrimaryKey(revisionID);
|
||||
//if (tmp == null)
|
||||
//{
|
||||
// tmp = DataPortal.Fetch<RevisionInfo>(new PKCriteria(revisionID));
|
||||
// AddToCache(tmp);
|
||||
//}
|
||||
RevisionInfo tmp = DataPortal.Fetch<RevisionInfo>(new PreviousItemCriteria(itemID));
|
||||
if (tmp.ErrorMessage == "No Record Found")
|
||||
{
|
||||
@@ -906,9 +837,11 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
public static string BuildRevisionChecks(ProcedureInfo proc)
|
||||
{
|
||||
ConsistencyChecks cc = new ConsistencyChecks();
|
||||
cc.ItemID = proc.ItemID;
|
||||
BuildROChecks(cc, proc);
|
||||
ConsistencyChecks cc = new ConsistencyChecks
|
||||
{
|
||||
ItemID = proc.ItemID
|
||||
};
|
||||
BuildROChecks(cc, proc);
|
||||
BuildTransitionFromChecks(cc, proc);
|
||||
BuildTransitionToChecks(cc, proc);
|
||||
BuildLibDocChecks(cc, proc);
|
||||
@@ -933,13 +866,11 @@ namespace VEPROMS.CSLA.Library
|
||||
|
||||
//create checkro record for each roid
|
||||
//_MyTimer.ActiveProcess = "Get DocVersionInfo";
|
||||
// DocVersionInfo dbi = proc.ActiveParent as DocVersionInfo;
|
||||
DocVersionInfo dvi = proc.MyDocVersion;
|
||||
//_MyTimer.ActiveProcess = "Get MyROFst";
|
||||
if (dvi.DocVersionAssociations == null || dvi.DocVersionAssociations.Count == 0) return; // B2020-124: don't crash if docversion doesn't have rofst
|
||||
ROFstInfo rofst = ROFstInfo.GetJustROFst(dvi.DocVersionAssociations[0].ROFstID);
|
||||
//_MyTimer.ActiveProcess = "Get ROFst Lookup";
|
||||
//rofst.docVer = dvi;
|
||||
ROFSTLookup lookup = rofst.GetROFSTLookup(dvi);
|
||||
//_MyTimer.ActiveProcess = "Populating RevisionChecksXML table";
|
||||
cc.ROConsistency.ROFstDate = rofst.DTS;
|
||||
@@ -957,27 +888,21 @@ namespace VEPROMS.CSLA.Library
|
||||
using (TransitionInfoList myList = TransitionInfoList.GetAllForProcedure(proc, true))
|
||||
foreach (TransitionInfo myTI in myList)
|
||||
{
|
||||
//\v <START]\v0 EMG\u160?ES\u8209?02, REACTOR TRIP RESPONSE, Step 14\v #Link:Transition:0 1 102[END>\v0
|
||||
string lookFor = string.Format(@"<START\](\\[^v \\]+)*\\v0(\\[^v '?{{}}~\\]+)*( |\\u[0-9]{{1,4}}?|\\'[0-9a-fA-F]{{2}}|\\[{{}}~])(.*?)(\\[^v'?{{}}~ \\]+)*\\v(\\[^v \\]+)* #Link:Transition[^:]*?:{0} {1}( [0-9]*){{1,2}}\[END>", myTI.TranType, myTI.TransitionID);
|
||||
//string lookFor = string.Format(@"<START\](\\[^v \\]+)*\\v0(\\[^v \\]+)* ([^#]*?)(\\[^v'? \\]+)*\\v(\\[^v \\]+)* #Link:Transition[^:]*?:{0} {1}( [0-9]*){{1,2}}\[END>", myTI.TranType, myTI.TransitionID);
|
||||
//string lookFor = string.Format(@"<START\]\\v0 ([^#]*?)\\v #Link:Transition[^:]*?:{0} {1} [0-9]*\[END>", tran.TranType, tran.TransitionID);
|
||||
string lookFor = string.Format(@"<START\](\\[^v \\]+)*\\v0(\\[^v '?{{}}~\\]+)*( |\\u[0-9]{{1,4}}?|\\'[0-9a-fA-F]{{2}}|\\[{{}}~])(.*?)(\\[^v'?{{}}~ \\]+)*\\v(\\[^v \\]+)* #Link:Transition[^:]*?:{0} {1}( [0-9]*){{1,2}}\[END>", myTI.TranType, myTI.TransitionID);
|
||||
Match m = Regex.Match(myTI.ContentText, lookFor);
|
||||
if (m != null && m.Groups.Count > 1)
|
||||
{
|
||||
int myIndex = m.Groups[4].Index;
|
||||
int myLength = m.Groups[4].Length;
|
||||
if (m.Groups[3].Value != " ")
|
||||
{
|
||||
myIndex = m.Groups[3].Index;
|
||||
myLength += m.Groups[3].Length;
|
||||
}
|
||||
string gg = myTI.ContentText.Substring(myIndex, myLength);
|
||||
cc.AddTransitionFromCheck(myTI.TransitionID, gg);
|
||||
// System.Text.RegularExpressions.Group g = m.Groups[3];
|
||||
// cc.AddTransitionFromCheck(myTI.TransitionID, g.ToString());
|
||||
int myIndex = m.Groups[4].Index;
|
||||
int myLength = m.Groups[4].Length;
|
||||
if (m.Groups[3].Value != " ")
|
||||
{
|
||||
myIndex = m.Groups[3].Index;
|
||||
myLength += m.Groups[3].Length;
|
||||
}
|
||||
string gg = myTI.ContentText.Substring(myIndex, myLength);
|
||||
cc.AddTransitionFromCheck(myTI.TransitionID, gg);
|
||||
}
|
||||
//_MyTimer.ActiveProcess = "get from path";
|
||||
//string myPath = myTI.MyItemToID.ShortPath;
|
||||
}
|
||||
}
|
||||
private static void BuildTransitionToChecks(ConsistencyChecks cc, ProcedureInfo proc)
|
||||
@@ -985,24 +910,20 @@ namespace VEPROMS.CSLA.Library
|
||||
using (TransitionInfoList myList = TransitionInfoList.GetAllForProcedure(proc, false))
|
||||
foreach (TransitionInfo myTI in myList)
|
||||
{
|
||||
string lookFor = string.Format(@"<START\](\\[^v \\]+)*\\v0(\\[^v '?{{}}~\\]+)*( |\\u[0-9]{{1,4}}?|\\'[0-9a-fA-F]{{2}}|\\[{{}}~])(.*?)(\\[^v'?{{}}~ \\]+)*\\v(\\[^v \\]+)* #Link:Transition[^:]*?:{0} {1}( [0-9]*){{1,2}}\[END>", myTI.TranType, myTI.TransitionID);
|
||||
//string lookFor = string.Format(@"<START\](\\[^v \\]+)*\\v0(\\[^v \\]+)* ([^#]*?)(\\[^v'? \\]+)*\\v(\\[^v \\]+)* #Link:Transition[^:]*?:{0} {1}( [0-9]*){{1,2}}\[END>", myTI.TranType, myTI.TransitionID);
|
||||
//string lookFor = string.Format(@"<START\]\\v0 ([^#]*?)\\v #Link:Transition[^:]*?:{0} {1} [0-9]*\[END>", tran.TranType, tran.TransitionID);
|
||||
string lookFor = string.Format(@"<START\](\\[^v \\]+)*\\v0(\\[^v '?{{}}~\\]+)*( |\\u[0-9]{{1,4}}?|\\'[0-9a-fA-F]{{2}}|\\[{{}}~])(.*?)(\\[^v'?{{}}~ \\]+)*\\v(\\[^v \\]+)* #Link:Transition[^:]*?:{0} {1}( [0-9]*){{1,2}}\[END>", myTI.TranType, myTI.TransitionID);
|
||||
Match m = Regex.Match(myTI.ContentText, lookFor);
|
||||
if (m != null && m.Groups.Count > 1)
|
||||
{
|
||||
int myIndex = m.Groups[4].Index;
|
||||
int myLength = m.Groups[4].Length;
|
||||
if (m.Groups[3].Value != " ")
|
||||
{
|
||||
myIndex = m.Groups[3].Index;
|
||||
myLength += m.Groups[3].Length;
|
||||
}
|
||||
string gg = myTI.ContentText.Substring(myIndex, myLength);
|
||||
gg = gg.Replace("{", @"\{").Replace("}", @"\}");
|
||||
cc.AddTransitionToCheck(myTI.TransitionID, gg);
|
||||
// System.Text.RegularExpressions.Group g = m.Groups[3];
|
||||
// cc.AddTransitionToCheck(myTI.TransitionID, g.ToString());
|
||||
int myIndex = m.Groups[4].Index;
|
||||
int myLength = m.Groups[4].Length;
|
||||
if (m.Groups[3].Value != " ")
|
||||
{
|
||||
myIndex = m.Groups[3].Index;
|
||||
myLength += m.Groups[3].Length;
|
||||
}
|
||||
string gg = myTI.ContentText.Substring(myIndex, myLength);
|
||||
gg = gg.Replace("{", @"\{").Replace("}", @"\}");
|
||||
cc.AddTransitionToCheck(myTI.TransitionID, gg);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1013,25 +934,16 @@ namespace VEPROMS.CSLA.Library
|
||||
cc.AddLibDocCheck(myDI.DocID, myDI.DTS);
|
||||
}
|
||||
private static Volian.Base.Library.VlnTimer _MyTimer;
|
||||
public static void SetupTimer()
|
||||
{
|
||||
_MyTimer = new Volian.Base.Library.VlnTimer();
|
||||
}
|
||||
public static void ShowTimer()
|
||||
{
|
||||
_MyTimer.ShowElapsedTimes("BuildROChecks");
|
||||
}
|
||||
}
|
||||
public static void SetupTimer() => _MyTimer = new Volian.Base.Library.VlnTimer();
|
||||
public static void ShowTimer() => _MyTimer.ShowElapsedTimes("BuildROChecks");
|
||||
}
|
||||
public partial class RoUsageInfoList
|
||||
{
|
||||
[Serializable()]
|
||||
private class AllForProcedureCriteria
|
||||
{
|
||||
public AllForProcedureCriteria(int itemID)
|
||||
{
|
||||
_ItemID = itemID;
|
||||
}
|
||||
private int _ItemID;
|
||||
public AllForProcedureCriteria(int itemID) => _ItemID = itemID;
|
||||
private int _ItemID;
|
||||
public int ItemID
|
||||
{
|
||||
get { return _ItemID; }
|
||||
@@ -1090,11 +1002,8 @@ namespace VEPROMS.CSLA.Library
|
||||
[Serializable()]
|
||||
private class AllForProcedureCriteria
|
||||
{
|
||||
public AllForProcedureCriteria(int itemID)
|
||||
{
|
||||
_ItemID = itemID;
|
||||
}
|
||||
private int _ItemID;
|
||||
public AllForProcedureCriteria(int itemID) => _ItemID = itemID;
|
||||
private int _ItemID;
|
||||
public int ItemID
|
||||
{
|
||||
get { return _ItemID; }
|
||||
@@ -1217,9 +1126,11 @@ namespace VEPROMS.CSLA.Library
|
||||
IsReadOnly = false;
|
||||
while (dr.Read())
|
||||
{
|
||||
TransitionInfo ti = new TransitionInfo(dr);
|
||||
ti.ContentText = dr.GetString("ContentText");
|
||||
this.Add(ti);
|
||||
TransitionInfo ti = new TransitionInfo(dr)
|
||||
{
|
||||
ContentText = dr.GetString("ContentText")
|
||||
};
|
||||
this.Add(ti);
|
||||
}
|
||||
IsReadOnly = true;
|
||||
}
|
||||
@@ -1239,11 +1150,8 @@ namespace VEPROMS.CSLA.Library
|
||||
[Serializable()]
|
||||
private class AllForProcedureCriteria
|
||||
{
|
||||
public AllForProcedureCriteria(int itemID)
|
||||
{
|
||||
_ItemID = itemID;
|
||||
}
|
||||
private int _ItemID;
|
||||
public AllForProcedureCriteria(int itemID) => _ItemID = itemID;
|
||||
private int _ItemID;
|
||||
public int ItemID
|
||||
{
|
||||
get { return _ItemID; }
|
||||
@@ -1301,15 +1209,9 @@ namespace VEPROMS.CSLA.Library
|
||||
[XmlRoot("ConsistencyChecks")]
|
||||
public class ConsistencyChecks
|
||||
{
|
||||
public static ConsistencyChecks Get(string xml)
|
||||
{
|
||||
return GenericSerializer<ConsistencyChecks>.StringDeserialize(xml);
|
||||
}
|
||||
public override string ToString()
|
||||
{
|
||||
return GenericSerializer<ConsistencyChecks>.StringSerialize(this);
|
||||
}
|
||||
private int _ItemID;
|
||||
public static ConsistencyChecks Get(string xml) => GenericSerializer<ConsistencyChecks>.StringDeserialize(xml);
|
||||
public override string ToString() => GenericSerializer<ConsistencyChecks>.StringSerialize(this);
|
||||
private int _ItemID;
|
||||
[XmlAttribute("ItemID")]
|
||||
public int ItemID
|
||||
{
|
||||
@@ -1326,12 +1228,9 @@ namespace VEPROMS.CSLA.Library
|
||||
get { return _ROConsistency; }
|
||||
set { _ROConsistency = value; }
|
||||
}
|
||||
public void AddROCheck(string roid, string roValue)
|
||||
{
|
||||
ROConsistency.AddROCheck(roid, roValue);
|
||||
}
|
||||
public void AddROCheck(string roid, string roValue) => ROConsistency.AddROCheck(roid, roValue);
|
||||
|
||||
private TransitionConsistency _TransitionFromConsistency = new TransitionConsistency();
|
||||
private TransitionConsistency _TransitionFromConsistency = new TransitionConsistency();
|
||||
[XmlElement("TransitionFromChecks")]
|
||||
[Category("Transitions")]
|
||||
[Description("Transition From Consistency Data")]
|
||||
@@ -1341,11 +1240,8 @@ namespace VEPROMS.CSLA.Library
|
||||
get { return _TransitionFromConsistency; }
|
||||
set { _TransitionFromConsistency = value; }
|
||||
}
|
||||
public void AddTransitionFromCheck(int transitionid, string transitionValue)
|
||||
{
|
||||
TransitionFromConsistency.AddTransitionCheck(transitionid, transitionValue);
|
||||
}
|
||||
private TransitionConsistency _TransitionToConsistency = new TransitionConsistency();
|
||||
public void AddTransitionFromCheck(int transitionid, string transitionValue) => TransitionFromConsistency.AddTransitionCheck(transitionid, transitionValue);
|
||||
private TransitionConsistency _TransitionToConsistency = new TransitionConsistency();
|
||||
[XmlElement("TransitionToChecks")]
|
||||
[Category("Transitions")]
|
||||
[Description("Transition To Consistency Data")]
|
||||
@@ -1355,11 +1251,8 @@ namespace VEPROMS.CSLA.Library
|
||||
get { return _TransitionToConsistency; }
|
||||
set { _TransitionToConsistency = value; }
|
||||
}
|
||||
public void AddTransitionToCheck(int transitionid, string transitionValue)
|
||||
{
|
||||
TransitionToConsistency.AddTransitionCheck(transitionid, transitionValue);
|
||||
}
|
||||
private TransitionConsistency _TransitionConsistency = new TransitionConsistency();
|
||||
public void AddTransitionToCheck(int transitionid, string transitionValue) => TransitionToConsistency.AddTransitionCheck(transitionid, transitionValue);
|
||||
private TransitionConsistency _TransitionConsistency = new TransitionConsistency();
|
||||
[XmlElement("TransitionChecks")]
|
||||
[Category("Transitions")]
|
||||
[Description("Transition Consistency Data")]
|
||||
@@ -1380,11 +1273,8 @@ namespace VEPROMS.CSLA.Library
|
||||
get { return _LibDocConsistency; }
|
||||
set { _LibDocConsistency = value; }
|
||||
}
|
||||
public void AddLibDocCheck(int docid, DateTime docdate)
|
||||
{
|
||||
LibDocConsistency.AddLibDocCheck(docid, docdate);
|
||||
}
|
||||
}
|
||||
public void AddLibDocCheck(int docid, DateTime docdate) => LibDocConsistency.AddLibDocCheck(docid, docdate);
|
||||
}
|
||||
[Serializable]
|
||||
[TypeConverter(typeof(ExpandableObjectConverter))]
|
||||
public class ROConsistency
|
||||
@@ -1422,11 +1312,8 @@ namespace VEPROMS.CSLA.Library
|
||||
if (!_ROCheckList.ContainsKey(roid))
|
||||
_ROCheckList.Add(roid, new ROCheck(roid, roValue));
|
||||
}
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("{0} ROs", _ROCheckList.Count);
|
||||
}
|
||||
}
|
||||
public override string ToString() => string.Format("{0} ROs", _ROCheckList.Count);
|
||||
}
|
||||
[Serializable]
|
||||
[TypeConverter(typeof(ExpandableObjectConverter))]
|
||||
public class ROCheck
|
||||
@@ -1463,11 +1350,8 @@ namespace VEPROMS.CSLA.Library
|
||||
public ROCheck()
|
||||
{
|
||||
}
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("{0} - '{1}'", ROID, ROValue);
|
||||
}
|
||||
}
|
||||
public override string ToString() => string.Format("{0} - '{1}'", ROID, ROValue);
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
[TypeConverter(typeof(ExpandableObjectConverter))]
|
||||
@@ -1497,11 +1381,8 @@ namespace VEPROMS.CSLA.Library
|
||||
if (!_TransitionCheckList.ContainsKey(transitionid))
|
||||
_TransitionCheckList.Add(transitionid, new TransitionCheck(transitionid, transitionValue));
|
||||
}
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("{0} Transitions", _TransitionCheckList.Count);
|
||||
}
|
||||
}
|
||||
public override string ToString() => string.Format("{0} Transitions", _TransitionCheckList.Count);
|
||||
}
|
||||
[Serializable]
|
||||
[TypeConverter(typeof(ExpandableObjectConverter))]
|
||||
public class TransitionCheck
|
||||
@@ -1538,11 +1419,8 @@ namespace VEPROMS.CSLA.Library
|
||||
public TransitionCheck()
|
||||
{
|
||||
}
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("{0} - '{1}'", TransitionID, TransitionValue);
|
||||
}
|
||||
}
|
||||
public override string ToString() => string.Format("{0} - '{1}'", TransitionID, TransitionValue);
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
[TypeConverter(typeof(ExpandableObjectConverter))]
|
||||
@@ -1572,11 +1450,8 @@ namespace VEPROMS.CSLA.Library
|
||||
if (!_LibDocCheckList.ContainsKey(docid))
|
||||
_LibDocCheckList.Add(docid, new LibDocCheck(docid, docDate));
|
||||
}
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("{0} LibDocs", _LibDocCheckList.Count);
|
||||
}
|
||||
}
|
||||
public override string ToString() => string.Format("{0} LibDocs", _LibDocCheckList.Count);
|
||||
}
|
||||
[Serializable]
|
||||
[TypeConverter(typeof(ExpandableObjectConverter))]
|
||||
public class LibDocCheck
|
||||
@@ -1604,16 +1479,10 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
get
|
||||
{
|
||||
//if (_OldDocDate == DateTime.MinValue)
|
||||
// return null;
|
||||
return _OldDocDate;
|
||||
}
|
||||
set
|
||||
{
|
||||
//if (value == null)
|
||||
// _OldDocDate = DateTime.MinValue;
|
||||
//else
|
||||
// _OldDocDate = value.Value;
|
||||
_OldDocDate = value;
|
||||
}
|
||||
}
|
||||
@@ -1625,11 +1494,8 @@ namespace VEPROMS.CSLA.Library
|
||||
public LibDocCheck()
|
||||
{
|
||||
}
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("{0} - '{1}'", DocID, DocDate);
|
||||
}
|
||||
}
|
||||
public override string ToString() => string.Format("{0} - '{1}'", DocID, DocDate);
|
||||
}
|
||||
public enum Rev_Types : int
|
||||
{
|
||||
Revision = 1, TempMod = 2
|
||||
|
||||
Reference in New Issue
Block a user