From 33b2eb8e9dd150a078ae9b421734e06990ebee3c Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Wed, 11 Nov 2020 01:11:21 +0000 Subject: [PATCH] --- server/AyaNova/DataList/CustomerDataList.cs | 109 +++++++++----------- server/AyaNova/biz/UiFieldDataType.cs | 3 +- 2 files changed, 52 insertions(+), 60 deletions(-) diff --git a/server/AyaNova/DataList/CustomerDataList.cs b/server/AyaNova/DataList/CustomerDataList.cs index f557ae02..90e294b3 100644 --- a/server/AyaNova/DataList/CustomerDataList.cs +++ b/server/AyaNova/DataList/CustomerDataList.cs @@ -76,7 +76,6 @@ namespace AyaNova.DataList SqlValueColumnName = "acustomer.webaddress" }); - FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "CustomerPopUpNotes", @@ -112,62 +111,15 @@ namespace AyaNova.DataList FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "UsesBanking", - FieldKey = "usesbanking", + FieldKey = "customerusesbanking", UiFieldDataType = (int)UiFieldDataType.Bool, SqlValueColumnName = "acustomer.usesbanking" }); - FieldDefinitions.Add(new AyaDataListFieldDefinition - { - TKey = "CustomerStartDate", - FieldKey = "customerstartdate", - UiFieldDataType = (int)UiFieldDataType.DateTime, - SqlValueColumnName = "acustomer.startdate" - }); - - - - - - - - - - //------- FieldDefinitions.Add(new AyaDataListFieldDefinition { - TKey = "CustomerSerial", - FieldKey = "customerserial", - UiFieldDataType = (int)UiFieldDataType.Integer, - SqlValueColumnName = "acustomer.serial" - }); - FieldDefinitions.Add(new AyaDataListFieldDefinition - { - TKey = "CustomerDollarAmount", - FieldKey = "customerdollaramount", - UiFieldDataType = (int)UiFieldDataType.Currency, - SqlValueColumnName = "acustomer.dollaramount" - }); - FieldDefinitions.Add(new AyaDataListFieldDefinition - { - TKey = "CustomerCount", - FieldKey = "customercount", - UiFieldDataType = (int)UiFieldDataType.Integer, - SqlValueColumnName = "acustomer.count" - }); - FieldDefinitions.Add(new AyaDataListFieldDefinition - { - TKey = "UserType", - FieldKey = "customerusertype", - UiFieldDataType = (int)UiFieldDataType.Enum, - EnumType = AyaNova.Util.StringUtil.TrimTypeName(typeof(UserType).ToString()), - SqlValueColumnName = "acustomer.usertype" - }); - - FieldDefinitions.Add(new AyaDataListFieldDefinition - { TKey = "Contract", - FieldKey = "Contract", + FieldKey = "customercontract", UiFieldDataType = (int)UiFieldDataType.Text, AyaObjectType = (int)AyaType.Contract, SqlIdColumnName = "acontract.id", @@ -177,23 +129,62 @@ namespace AyaNova.DataList FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "ContractExpires", - FieldKey = "contractexpires", + FieldKey = "customercontractexpires", UiFieldDataType = (int)UiFieldDataType.DateTime, SqlValueColumnName = "acustomer.contractexpires" }); - - //FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "User", FieldKey = "userid", UiFieldDataType = (int)AyaUiFieldDataType.Text, AyaObjectType = (int)AyaType.User }); FieldDefinitions.Add(new AyaDataListFieldDefinition { - FieldKey = "username", - TKey = "User", - UiFieldDataType = (int)UiFieldDataType.Text, - AyaObjectType = (int)AyaType.User, - SqlIdColumnName = "auser.id", - SqlValueColumnName = "auser.name" + TKey = "CustomerPhone1", + FieldKey = "customerphone1", + UiFieldDataType = (int)UiFieldDataType.PhoneNumber, + SqlValueColumnName = "acustomer.phone1" }); + FieldDefinitions.Add(new AyaDataListFieldDefinition + { + TKey = "CustomerPhone2", + FieldKey = "customerphone2", + UiFieldDataType = (int)UiFieldDataType.PhoneNumber, + SqlValueColumnName = "acustomer.phone2" + }); + + FieldDefinitions.Add(new AyaDataListFieldDefinition + { + TKey = "CustomerPhone3", + FieldKey = "customerphone3", + UiFieldDataType = (int)UiFieldDataType.PhoneNumber, + SqlValueColumnName = "acustomer.phone3" + }); + + FieldDefinitions.Add(new AyaDataListFieldDefinition + { + TKey = "CustomerPhone4", + FieldKey = "customerphone4", + UiFieldDataType = (int)UiFieldDataType.PhoneNumber, + SqlValueColumnName = "acustomer.phone4" + }); + + FieldDefinitions.Add(new AyaDataListFieldDefinition + { + TKey = "CustomerPhone5", + FieldKey = "customerphone5", + UiFieldDataType = (int)UiFieldDataType.PhoneNumber, + SqlValueColumnName = "acustomer.phone5" + }); + + FieldDefinitions.Add(new AyaDataListFieldDefinition + { + TKey = "CustomerEmail", + FieldKey = "customeremail", + UiFieldDataType = (int)UiFieldDataType.EmailAddress, + SqlValueColumnName = "acustomer.emailaddress" + }); + + todo: Postal addresses + + FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "CustomerCustom1", FieldKey = "customercustom1", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "acustomer.customfields" }); FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "CustomerCustom2", FieldKey = "customercustom2", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "acustomer.customfields" }); diff --git a/server/AyaNova/biz/UiFieldDataType.cs b/server/AyaNova/biz/UiFieldDataType.cs index ec695c17..289790fb 100644 --- a/server/AyaNova/biz/UiFieldDataType.cs +++ b/server/AyaNova/biz/UiFieldDataType.cs @@ -20,6 +20,7 @@ namespace AyaNova.Biz HTTP = 12, InternalId = 13, MemorySize = 14,//this is so client can convert what would normally be an Integer type to human readable file / ram size value - TimeSpan=15 + TimeSpan=15, + PhoneNumber=16//this is so client can dial directly } }