55 lines
1.6 KiB
C#
55 lines
1.6 KiB
C#
using WX.CRM.Model.Entity;
|
|
using WX.CRM.Model.MAP;
|
|
|
|
namespace WX.CRM.WEB.Handler
|
|
{
|
|
public class WxMessageHandler
|
|
{
|
|
public static string GetRcontactNickName(WX_WorkRCONTACT rcontact)
|
|
{
|
|
string text = string.Empty;
|
|
if (!string.IsNullOrEmpty(rcontact.NICKNAME))
|
|
{
|
|
text = rcontact.NICKNAME;
|
|
}
|
|
else if (!string.IsNullOrEmpty(rcontact.ALIAS))
|
|
{
|
|
text = rcontact.ALIAS;
|
|
}
|
|
else if (!string.IsNullOrEmpty(rcontact.USERNAME))
|
|
{
|
|
text = rcontact.USERNAME;
|
|
}
|
|
if (!string.IsNullOrEmpty(rcontact.CONREMARK))
|
|
{
|
|
text += "(" + rcontact.CONREMARK + ")";
|
|
}
|
|
return text;
|
|
}
|
|
public static string GetRcontactNickNameByRcontact(WX_RCONTACT rcontact)
|
|
{
|
|
string text = string.Empty;
|
|
if (rcontact == null)
|
|
{
|
|
return text;
|
|
}
|
|
if (!string.IsNullOrEmpty(rcontact.NICKNAME))
|
|
{
|
|
text = rcontact.NICKNAME;
|
|
}
|
|
else if (!string.IsNullOrEmpty(rcontact.ALIAS))
|
|
{
|
|
text = rcontact.ALIAS;
|
|
}
|
|
else if (!string.IsNullOrEmpty(rcontact.USERNAME))
|
|
{
|
|
text = rcontact.USERNAME;
|
|
}
|
|
if (!string.IsNullOrEmpty(rcontact.CONREMARK))
|
|
{
|
|
text += "(" + rcontact.CONREMARK + ")";
|
|
}
|
|
return text;
|
|
}
|
|
}
|
|
} |