Сильно переделанная версия, добавлены избранные контакты, отправка фото и т.п.
This commit is contained in:
+12
-8
@@ -3,6 +3,7 @@
|
||||
public class EmployeeContact
|
||||
{
|
||||
public static string GeneralPhoneNumber => "+78123352577";
|
||||
|
||||
public EmployeeContact(Employee employee)
|
||||
{
|
||||
FullName = employee.FullName;
|
||||
@@ -20,7 +21,9 @@ public class EmployeeContact
|
||||
Department = employee.Department;
|
||||
Position = employee.Position;
|
||||
ExtensionNumber = employee.Phone ?? null; //string.IsNullOrEmpty(employee.Phone) ? null : employee.Phone;
|
||||
Phone = string.IsNullOrEmpty(ExtensionNumber) ? GeneralPhoneNumber : $"{GeneralPhoneNumber},{ExtensionNumber}";
|
||||
Phone = string.IsNullOrEmpty(ExtensionNumber)
|
||||
? GeneralPhoneNumber
|
||||
: $"{GeneralPhoneNumber},{ExtensionNumber}";
|
||||
if (!string.IsNullOrEmpty(employee.Mobile))
|
||||
{
|
||||
Mobile = employee.Mobile;
|
||||
@@ -34,13 +37,14 @@ public class EmployeeContact
|
||||
{
|
||||
get
|
||||
{
|
||||
string text = "BEGIN:VCARD\n"
|
||||
+ "VERSION:2.1\n"
|
||||
+ $"N:{LastName};{FirstName}\n"
|
||||
+ $"FN:{FullName}\n"
|
||||
+ "ORG:NSSZ\n"
|
||||
+ $"ROLE:{Department}\n"
|
||||
+ $"TITLE:{Position}\n";
|
||||
string text =
|
||||
"BEGIN:VCARD\n"
|
||||
+ "VERSION:2.1\n"
|
||||
+ $"N:{LastName};{FirstName}\n"
|
||||
+ $"FN:{FullName}\n"
|
||||
+ "ORG:NSSZ\n"
|
||||
+ $"ROLE:{Department}\n"
|
||||
+ $"TITLE:{Position}\n";
|
||||
if (!string.IsNullOrEmpty(Mobile))
|
||||
text += $"TEL;CELL:{Mobile}\n";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user