From d97582303f297c1dae2990cdc94fce1eafc44eb7 Mon Sep 17 00:00:00 2001 From: John Date: Thu, 22 Sep 2011 19:50:39 +0000 Subject: [PATCH] =?UTF-8?q?added=20error=20message=20for=20invalid=20Unit?= =?UTF-8?q?=20RO=20Fix=20for=20missing=20transitions=20that=20who=E2=80=99?= =?UTF-8?q?s=20ToNumber=20ends=20with=20=E2=80=9C0S=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/DataLoader/RefObjs.cs | 7 ++++++- PROMS/DataLoader/Transitions.cs | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/PROMS/DataLoader/RefObjs.cs b/PROMS/DataLoader/RefObjs.cs index b64ce1e9..0aea15a7 100644 --- a/PROMS/DataLoader/RefObjs.cs +++ b/PROMS/DataLoader/RefObjs.cs @@ -83,7 +83,12 @@ namespace DataLoader // add an annotation stating "Invalid Unit RO 'ROID'. Need an Item for this, so just add // it to a list of 'invalid ros' so that calling method can add annotations to the Item. if (roval == "?") - InvalidROs.Add(string.Format("Invalid RO '{0}'", ROID.Substring(0, 12))); + { + if (ROID.StartsWith("FFFF")) + InvalidROs.Add(string.Format("Invalid Unit RO '{0}'", ROID.Substring(0, 12))); + else + InvalidROs.Add(string.Format("Invalid RO '{0}'", ROID.Substring(0, 12))); + } //if (roval.Contains("\r") || roval.Contains("\n")) // Console.WriteLine("RO has new Lines"); //string results = string.Format(@"\v \v0 ", diff --git a/PROMS/DataLoader/Transitions.cs b/PROMS/DataLoader/Transitions.cs index 55b20a20..dd4b21db 100644 --- a/PROMS/DataLoader/Transitions.cs +++ b/PROMS/DataLoader/Transitions.cs @@ -40,6 +40,8 @@ namespace DataLoader { List migrationErrors = new List(); string thekey = dr["TONUMBER"].ToString() + "|" + dr["TOSEQUENCE"].ToString(); + if (thekey.EndsWith("0S")) + thekey = thekey.Substring(0, thekey.Length - 1); string dti = dr["DTI"].ToString().PadRight(18, ' '); string userid = dti.Substring(13, 5).Trim(); int itype = 0;