Exemplo n.º 1
0
        public static int Create(int VCardId, VCardAddressTypes type, string UserId, bool IsPrefered)
        {
            VCardEmailRow row = new VCardEmailRow();

            row.VCardId     = VCardId;
            row.IsPrefered  = IsPrefered;
            row.EmailTypeId = (int)type;
            row.UserId      = UserId;

            row.Update();

            return(row.PrimaryKeyId);
        }
Exemplo n.º 2
0
        private static string GetAddressName(VCardAddressTypes type, string locale)
        {
            string name;

            if (locale == "ru-RU")
            {
                switch (type)
                {
                case VCardAddressTypes.Home:
                    name = "Домашний";
                    break;

                case VCardAddressTypes.Work:
                    name = "Рабочий";
                    break;

                case VCardAddressTypes.None:
                default:
                    name = "Основной";
                    break;
                }
            }
            else
            {
                switch (type)
                {
                case VCardAddressTypes.Home:
                    name = "Home";
                    break;

                case VCardAddressTypes.Work:
                    name = "Work";
                    break;

                case VCardAddressTypes.None:
                default:
                    name = "General";
                    break;
                }
            }

            return(name);
        }
Exemplo n.º 3
0
        public static int Create(int VCardId, VCardAddressTypes type,
                                 string Country, string PostalCode, string Region, string Locality, string Street, string ExtraAddress,
                                 bool IsPrefered)
        {
            VCardAddressRow row = new VCardAddressRow();

            row.VCardId            = VCardId;
            row.VCardAddressTypeId = (int)type;
            row.IsPrefered         = IsPrefered;
            row.Country            = Country;
            row.PostalCode         = PostalCode;
            row.Region             = Region;
            row.Locality           = Locality;
            row.Street             = Street;
            row.ExtraAddress       = ExtraAddress;

            row.Update();

            return(row.PrimaryKeyId);
        }
Exemplo n.º 4
0
        public static int Create(int VCardId, VCardAddressTypes type,
			string Country, string PostalCode, string Region, string Locality, string Street, string ExtraAddress,
			bool IsPrefered)
        {
            VCardAddressRow row = new VCardAddressRow();

            row.VCardId = VCardId;
            row.VCardAddressTypeId = (int)type;
            row.IsPrefered = IsPrefered;
            row.Country = Country;
            row.PostalCode = PostalCode;
            row.Region = Region;
            row.Locality = Locality;
            row.Street = Street;
            row.ExtraAddress = ExtraAddress;

            row.Update();

            return row.PrimaryKeyId;
        }
Exemplo n.º 5
0
        public static int Create(int VCardId, VCardAddressTypes type, string UserId, bool IsPrefered)
        {
            VCardEmailRow row = new VCardEmailRow();

            row.VCardId = VCardId;
            row.IsPrefered = IsPrefered;
            row.EmailTypeId = (int)type;
            row.UserId = UserId;

            row.Update();

            return row.PrimaryKeyId;
        }