Esempio n. 1
0
        public CityArea CreateCityArea(string description)
        {
            var entity = new CityArea();

            entity.CityAreaId = this.Context.GenerateNextIntId();

            entity.Name = description;

            this.Context.CityAreas.Add(entity);

            return(entity);
        }
Esempio n. 2
0
        // public void AddPermission(long? parentObjectId, User entity, CityArea child)
        //{
        //    AddPermission(parentObjectId, entity.UserId, childAreaId, PermissionTypeEnum.CityArea);
        //}

        //public void AddPermission(Group entity, CityArea child)
        //{
        //    AddPermission(entity.GroupId, childAreaId, PermissionTypeEnum.CityArea);
        //}

        public void AddPermission(BusinessType entity, CityArea child)
        {
            AddPermission(null, EntityEnum.BusinessType, (long)entity.BusinessTypeId, EntityEnum.CityArea, child.CityAreaId, PermissionTypeEnum.CityArea);
        }