case 3815

This commit is contained in:
2020-10-16 19:27:07 +00:00
parent 79c5561a7a
commit 21dff8b1cf

View File

@@ -222,25 +222,36 @@ namespace AyaNova
{
if (!listMaxResults.ContainsKey(sCurrentListKey))
{
//Case 316 - workaround so MIAD gets all rows by default
if (AyaBizUtils.REGTO == "Miad Systems Ltd")
listMaxResults.Add(sCurrentListKey, 0);
else
{
//case 1553
User u = User.GetItem(User.CurrentThreadUserID);
foreach (ValueListItem vi in cbTop.Items)
{
if ((int)vi.DataValue == u.MainGridLastRowCount)
{
cbTop.SelectedItem = vi;
break;
}
}
//case 3815 row count defaults, also removed this miad shit below, they are no longer a customer
//this code was intended to copy whatever the row count was last in use by the user when they last exited
//when viewing a new grid this session, instead, I'm removing all that and just defaulting to 100 when there is no
// previously saved count
////Case 316 - workaround so MIAD gets all rows by default
//if (AyaBizUtils.REGTO == "Miad Systems Ltd")
// listMaxResults.Add(sCurrentListKey, 0);
//else
//{
// //case 1553
// User u = User.GetItem(User.CurrentThreadUserID);
//foreach (ValueListItem vi in cbTop.Items)
//{
// if ((int)vi.DataValue == u.MainGridLastRowCount)
// {
// cbTop.SelectedItem = vi;
// break;
// }
//}
listMaxResults.Add(sCurrentListKey,cbTop.SelectedIndex);
}
// listMaxResults.Add(sCurrentListKey,cbTop.SelectedIndex);
//}
cbTop.SelectedIndex = 1;//100
listMaxResults.Add(sCurrentListKey, 1);
}
return listMaxResults[sCurrentListKey];
@@ -265,8 +276,16 @@ namespace AyaNova
if (!listCache.ContainsKey(key))
{
listCache.Add(key,ListFactory.GetList(key, FilterXML, System.Convert.ToInt32(cbTop.Value)));
//case 3815 list timeout handler
try
{
listCache.Add(key, ListFactory.GetList(key, FilterXML, System.Convert.ToInt32(cbTop.Value)));
}
catch (Exception e) {
Exception exInner = Util.CrackException(e);
Util.debugLog(exInner.Message);
}
}