case 3823
This commit is contained in:
@@ -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;
|
||||
/// <summary>
|
||||
/// Client record to display
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -3385,8 +3385,9 @@ At first I was happy to find your code that solved my problem, but I did not lik
|
||||
/// <param name="ObjectType"></param>
|
||||
/// <param name="ID"></param>
|
||||
/// <param name="OptionalIDForCreate"></param>
|
||||
/// <param name="subTypeIdToOpen"></param>
|
||||
/// <returns></returns>
|
||||
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());
|
||||
|
||||
Reference in New Issue
Block a user