Ejemplo n.º 1
0
        private void FixupClient(Client previousValue)
        {
            if (previousValue != null && previousValue.ClientBuildings.Contains(this))
            {
                previousValue.ClientBuildings.Remove(this);
            }

            if (Client != null)
            {
                if (!Client.ClientBuildings.Contains(this))
                {
                    Client.ClientBuildings.Add(this);
                }
                if (Client_Id != Client.Id)
                {
                    Client_Id = Client.Id;
                }
            }
            else if (!_settingFK)
            {
                Client_Id = null;
            }
        }
Ejemplo n.º 2
0
        public static Client GetEntity(this ClientPrimitive primitive)
        {
            Client result = new Client();

                result.Id = primitive.Id;

                result.InternalName = primitive.InternalName;

                result.NIP = primitive.NIP;

                result.Name = primitive.Name;

                result.City = primitive.City;

                result.Street = primitive.Street;

                result.ZIPCode = primitive.ZIPCode;

                result.HouseNo = primitive.HouseNo;

                result.Phone = primitive.Phone;

                result.Deleted = primitive.Deleted;

                result.Deactivated = primitive.Deactivated;

                return result;
        }