Ejemplo n.º 1
0
        public List <DependentInfo> GetDependentEntities(string entitySchemaName, Guid recordId)
        {
            UserConnection           userConnection = GetUserConnection();
            EntityDependenciesHelper helper         = GetEntityDependenciesHelper(userConnection);
            List <DependentInfo>     entities       = helper.GetDependentEntitiesContainRecords(entitySchemaName, recordId);

            return(entities);
        }
Ejemplo n.º 2
0
        protected virtual void LoadDependentRecordsInfo()
        {
            EntityDependenciesHelper helper = GetEntityDependenciesHelperInstance();

            foreach (Guid recordId in RecordIds)
            {
                IEnumerable <DependentInfo> collection = helper.GetDependentEntitiesContainRecords(SchemaName,
                                                                                                   recordId, true);
                MergeDependentInfoCollection(collection);
            }
            int dependentRecordsCount = DependentInfos.Sum(info => info.RecordsCount);

            if (Parameters.ContainsKey("DependentRecordsCount"))
            {
                Parameters["DependentRecordsCount"] = dependentRecordsCount;
            }
            else
            {
                Parameters.Add("DependentRecordsCount", dependentRecordsCount);
            }
        }