Contacts page.

This commit is contained in:
2021-07-11 16:09:42 +01:00
parent 5043a629db
commit b8cfd87860
147 changed files with 1621 additions and 425 deletions
@@ -111,8 +111,9 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
{
if (!systemCodeCache.ContainsKey(systemCode))
systemCodeCache.Add(systemCode, SbmSystem.GetCodesOfType(UserContext, systemCode));
return systemCodeCache.GetValueOrDefault(systemCode, new List<TypeCodeDesc>());
return new List<TypeCodeDesc>(systemCodeCache.GetValueOrDefault(systemCode, new List<TypeCodeDesc>()));
}
public List<TypeCodeDesc> AffiliateTypeCodes { get { return GetCodesOfType(Sbm.SystemCode.AffiliateType); } }
//-------------------------------------------------------------------
// Managers.
@@ -1,4 +1,5 @@
using Sarand.BusinessMgr.Net.Standard.Base.Bus;
using Newtonsoft.Json;
using Sarand.BusinessMgr.Net.Standard.Base.Bus;
using Sarand.Net.Standard.Base.App;
using Sarand.Net.Standard.Base.Bus;
using Sarand.Net.Standard.Base.Core;
@@ -35,6 +36,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
//-------------------------------------------------------------------
// Properties.
[JsonIgnore]
public SbmUserContext UserContext { get; }
//-------------------------------------------------------------------
@@ -1,4 +1,5 @@
using Sarand.Net.Standard.Base.App;
using Newtonsoft.Json;
using Sarand.Net.Standard.Base.App;
namespace Sarand.BusinessMgr.Net.Standard.Base.App
{
@@ -7,6 +8,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.App
{
//-------------------------------------------------------------------
// Construction.
[JsonConstructor]
protected SbmSessionContext(ushort index, Sbm.Application application) : base(index)
{
Index = index;
@@ -19,6 +19,8 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
Pos,
Id,
// Affiliate.
Type,
Type_Code,
Type_Desc,
Name,
Abbrev,
@@ -734,7 +736,11 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
// List parameters.
public enum StatusCat
{
Any, ActiveOnly,
Any,
CurrentOnly,
OnHoldOnly,
NotDeleted,
DeletedOnly,
}
/// <summary>
/// Item list parameters.
@@ -748,6 +754,8 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
public Sbm.AffiliateType AffiliateType { get; set; } = Sbm.AffiliateType.Any;
public SysId AffiliateIdParent { get; set; }
public SysId UserId { get; set; }
/// <summary>Generic search value - name, phone, website, address etc.</summary>
public String Search { get; set; }
public String Name { get; set; }
public String NamePartial { get; set; }
public String PhonePartial { get; set; }
@@ -378,10 +378,13 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr
switch ((SbmAffiliate.Column)column.Id)
{
// Affiliate type description.
case SbmAffiliate.Column.Type_Code:
case SbmAffiliate.Column.Type_Desc:
{
Sbm.AffiliateType affiliateType = (Sbm.AffiliateType)values.GetValue(column.DataName).AsLong();
value = new DataValue(AffiliateTypes.GetDescForType(affiliateType, affiliateType.ToString()));
if (column.Id == (int)SbmAffiliate.Column.Type_Desc)
value = new DataValue(AffiliateTypes.GetDescForType(affiliateType, affiliateType.ToString()));
else value = new DataValue(AffiliateTypes.GetCodeForType(affiliateType, affiliateType.ToString()));
}
break;