case 4180

This commit is contained in:
2022-08-25 18:17:50 +00:00
parent 318fd4d6b2
commit 677831dd7b
8 changed files with 41 additions and 1190 deletions

View File

@@ -62,4 +62,4 @@ using System.Runtime.InteropServices;
[assembly: log4net.Config.XmlConfigurator(ConfigFile="Log4Net.config",Watch=true)] [assembly: log4net.Config.XmlConfigurator(ConfigFile="Log4Net.config",Watch=true)]
//[assembly: log4net.Config.XmlConfigurator(Watch=true)] //[assembly: log4net.Config.XmlConfigurator(Watch=true)]
[assembly: ComVisibleAttribute(false)] [assembly: ComVisibleAttribute(false)]
[assembly: AssemblyFileVersionAttribute("7.6.15.0")] [assembly: AssemblyFileVersionAttribute("7.6.16.0")]

File diff suppressed because it is too large Load Diff

View File

@@ -64,4 +64,4 @@ using System.Security.Permissions;
// Configure log4net using the .config file // Configure log4net using the .config file
//[assembly: log4net.Config.XmlConfigurator(ConfigFile="Log4Net.config",Watch=true)] //[assembly: log4net.Config.XmlConfigurator(ConfigFile="Log4Net.config",Watch=true)]
//[assembly: log4net.Config.XmlConfigurator( ConfigFile="Log4Net.config",Watch=true )] //[assembly: log4net.Config.XmlConfigurator( ConfigFile="Log4Net.config",Watch=true )]
[assembly: AssemblyFileVersionAttribute("7.6.15.0")] [assembly: AssemblyFileVersionAttribute("7.6.16.0")]

View File

@@ -2565,8 +2565,8 @@ namespace GZTW.AyaNova.BLL
#if(DEBUG) #if(DEBUG)
throw new System.ArgumentException("AyaBizUtils->GetSearchResultFor: " + RootObjectType.ToString() + " IS NOT IMPLEMENTED"); throw new System.ArgumentException("AyaBizUtils->GetSearchResultFor: " + RootObjectType.ToString() + " IS NOT IMPLEMENTED");
#else #else
//case 1116 //case 1116
return new SearchResult(); return new SearchResult();
#endif #endif
} }
@@ -2639,7 +2639,7 @@ namespace GZTW.AyaNova.BLL
#else #else
//In a release build only order by first 4 columns for performance //In a release build only order by first 4 columns for performance
//anything more is pretty much redundant 99.9% of the time //anything more is pretty much redundant 99.9% of the time
if(nSortColumnsAddedToCriteria>4) break; if (nSortColumnsAddedToCriteria > 4) break;
#endif #endif
sCurrentColumnName = TabRow["CM"].ToString(); sCurrentColumnName = TabRow["CM"].ToString();
@@ -4497,13 +4497,30 @@ namespace GZTW.AyaNova.BLL
int startIndex = s.IndexOf(openTag); int startIndex = s.IndexOf(openTag);
if (startIndex == -1) if (startIndex == -1)
throw new System.IndexOutOfRangeException("ExtractString->Error: open tag not found"); throw new System.IndexOutOfRangeException("ExtractString->Error: open tag not found");
startIndex+=openTag.Length; startIndex += openTag.Length;
int endIndex = s.IndexOf(closeTag, startIndex); int endIndex = s.IndexOf(closeTag, startIndex);
if(endIndex==-1) if (endIndex == -1)
throw new System.IndexOutOfRangeException("ExtractString->Error: closing tag not found"); throw new System.IndexOutOfRangeException("ExtractString->Error: closing tag not found");
return s.Substring(startIndex, endIndex - startIndex); return s.Substring(startIndex, endIndex - startIndex);
} }
/// <summary>
/// Replace bare linefeeds issue case 4180
/// </summary>
/// <param name="s"></param>
/// <returns>string with any bare \n replaced with \r\n</returns>
public static string ReplaceBareLineFeeds(string s)
{
//the string may and probably does already have \r\n in addition to bare line feeds
//so replace those with bare linefeeds so it's *all* bare linefeeds then fix up
return s.Replace("\r\n", "\n").Replace("\n", "\r\n");
}
#endregion misc string helpers #endregion misc string helpers
#region Regular expressions #region Regular expressions

View File

@@ -89,7 +89,7 @@ namespace GZTW.AyaNova.BLL
//email.SetFromMimeText(n.GetContentAsString); //email.SetFromMimeText(n.GetContentAsString);
email.Mailer = "AyaNova service management software licensed to " + AyaBizUtils.REGTO; email.Mailer = "AyaNova service management software licensed to " + AyaBizUtils.REGTO;
email.Body = sMessageFields[1]; email.Body = AyaBizUtils.ReplaceBareLineFeeds(sMessageFields[1]);//case 4180
email.Subject = sMessageFields[2]; email.Subject = sMessageFields[2];
//case 1601 //case 1601

View File

@@ -85,7 +85,8 @@ namespace GZTW.AyaNova.BLL
sms.Login=GZTW.AyaNova.BLL.AyaBizUtils.GlobalSettings.NotifySMTPAccount; sms.Login=GZTW.AyaNova.BLL.AyaBizUtils.GlobalSettings.NotifySMTPAccount;
sms.Password=GZTW.AyaNova.BLL.AyaBizUtils.GlobalSettings.NotifySMTPPassword; sms.Password=GZTW.AyaNova.BLL.AyaBizUtils.GlobalSettings.NotifySMTPPassword;
sms.Message=info.Message;
sms.Message=AyaBizUtils.ReplaceBareLineFeeds(info.Message);//case 4180
sms.Subject="";//info.Subject; sms.Subject="";//info.Subject;
sms.ToAddress=info.Address; sms.ToAddress=info.Address;
sms.Deliver(); sms.Deliver();

View File

@@ -47,7 +47,7 @@ namespace GZTW.AyaNova.BLL
// Create a simple email. // Create a simple email.
Chilkat.Email email = new Chilkat.Email(); Chilkat.Email email = new Chilkat.Email();
email.Body = Message; email.Body = AyaBizUtils.ReplaceBareLineFeeds(Message);//case 4180
email.Subject = Subject; email.Subject = Subject;
//case 1601 //case 1601

View File

@@ -43,7 +43,7 @@ namespace GZTW.AyaNova.BLL
// Create a simple email. // Create a simple email.
Chilkat.Email email = new Chilkat.Email(); Chilkat.Email email = new Chilkat.Email();
email.Body = Message; email.Body = AyaBizUtils.ReplaceBareLineFeeds(Message);//case 4180
email.Subject = Subject; email.Subject = Subject;
//case 1601 //case 1601