From 6ce273b16b0bc5126719fc54608897a13e4e6efb Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 15 Oct 2020 19:28:11 +0000 Subject: [PATCH] case 3823 --- TODO.txt | 3 +++ source/WinFormApp/ClientInfoForm.cs | 6 +++++- source/WinFormApp/MainGrid.cs | 24 +++++++++++++++++++++++- source/WinFormApp/Util.cs | 3 ++- 4 files changed, 33 insertions(+), 3 deletions(-) diff --git a/TODO.txt b/TODO.txt index dde25b9..c873660 100644 --- a/TODO.txt +++ b/TODO.txt @@ -6,3 +6,6 @@ ////////////////////////////////////////////////////////// //DONE STUFF +3822 - by design +3827 - Issue: Stale Client notifications could build up in database. Fix: Client notifications automatically removed if their deliver after date is older than 7 days. +3826 - Issue: System warning memos to Administrator automatically by internal Utility account (generator) un-readable due to being sent from a Utility type User account with no name. Fixes: New memo warnings will be automatically changed from Utility user to Administrator account. Old memos: will substitute the "-" empty record symbol instead of trying to fetch the name to display for the Utility account making it possible to open old Memo system warnings. diff --git a/source/WinFormApp/ClientInfoForm.cs b/source/WinFormApp/ClientInfoForm.cs index f40a39a..943ea30 100644 --- a/source/WinFormApp/ClientInfoForm.cs +++ b/source/WinFormApp/ClientInfoForm.cs @@ -2087,7 +2087,11 @@ namespace AyaNova #region Business object editing / adding / deletion related code - + //case 3823 + private TypeAndID mClientNoteToDisplay; + public TypeAndID ClientNoteToDisplay { get { return mClientNoteToDisplay; } set { mClientNoteToDisplay = value; } } + + private Client mClient; /// /// Client record to display diff --git a/source/WinFormApp/MainGrid.cs b/source/WinFormApp/MainGrid.cs index f77b9e8..f306c94 100644 --- a/source/WinFormApp/MainGrid.cs +++ b/source/WinFormApp/MainGrid.cs @@ -1837,7 +1837,29 @@ namespace AyaNova //Open workorder item instead object o=e.Cell.Row.Cells["LT_WorkorderItem_Label_ID"].Value; bRefreshGrid = Util.EditRecord(RootObjectTypes.WorkorderItem, (Guid)o); - } + } + else if (sCurrentListKey == "SearchResultList")//case 3823 + { + //was just using else below but case 3823 requires opening directly client note if that is the search result type + + object oType = e.Cell.Row.Cells["RootObjectType"].Value; + if (oType != null && oType is RootObjectTypes && ((RootObjectTypes)oType) == RootObjectTypes.ClientNote) + { + object oId = e.Cell.Row.Cells["RootObjectID"].Value; + if (oId != null && oId is Guid) + { + bRefreshGrid = Util.EditRecord(RootObjectTypes.ClientNote, (Guid)oId); + } + else + { + bRefreshGrid = Util.EditRecord(i.RootObjectType, i.Value); + } + } + else + { + bRefreshGrid = Util.EditRecord(i.RootObjectType, i.Value); + } + } else bRefreshGrid = Util.EditRecord(i.RootObjectType, i.Value); diff --git a/source/WinFormApp/Util.cs b/source/WinFormApp/Util.cs index f50dae6..037ea49 100644 --- a/source/WinFormApp/Util.cs +++ b/source/WinFormApp/Util.cs @@ -3385,8 +3385,9 @@ At first I was happy to find your code that solved my problem, but I did not lik /// /// /// + /// /// - static public bool EditRecord(RootObjectTypes ObjectType, Guid ID, Guid OptionalIDForCreate) + static public bool EditRecord(RootObjectTypes ObjectType, Guid ID, Guid OptionalIDForCreate, TypeAndID subTypeIdToOpen=null) { //case 1039 //if(log.IsDebugEnabled) //case 1039 //log.Debug("EditRecord(" + ObjectType.ToString()+", " + ID.ToString());