private void PrepareFormulaInstance(TableDrivedEntityDTO mainEntity)
        {
            var dataItem = new ProxyLibrary.DP_DataRepository(EntityID, "");

            dataItem.IsFullData = true;

            FormulaInstance       = new FormulaDefinitionInstance(MyProjectManager.GetMyProjectManager.GetRequester(), dataItem, mainEntity);
            ExpressionEditor.Item = FormulaInstance.MainFormulaObject;
        }
 public DP_DataRepository GetRelatedDataOfOriginalData(DP_DataRepository orginalData)
 {
     return(RelatedData.First(z => orginalData.KeyProperties.All(y => z.KeyProperties.Any(u => u.ColumnID == y.ColumnID && u.Value == y.Value))));
 }
        //اینجا وظیفه چک کردن هم داده ها و هم ستونهای داده را دارد
        internal void AddChangeMonitor(string generalKey, string usageKey, string restTail, int columnID, DP_DataRepository dataToCall)
        {
            ChangeMonitorItems.Add(new ChangeMonitor()
            {
                GeneralKey = generalKey,
                UsageKey   = usageKey,
                DataToCall = dataToCall,
                columnID   = columnID,
                RestTail   = restTail
            });

            //if (!string.IsNullOrEmpty(restTail))
            //{
            foreach (var relatedData in RelatedData)
            {
                relatedData.AddChangeMonitor(generalKey, usageKey, restTail, columnID, dataToCall);
            }
            //}
        }
 public void RemoveRelatedData(DP_DataRepository dP_DataRepository)
 {
     //var childRelationshipInfo = ChildRelationshipInfos.FirstOrDefault(x => x.Relationship.ID == relationshipID);
     //if (childRelationshipInfo != null)
     RelatedData.Remove(dP_DataRepository);
 }
 public bool DataItemIsAdded(DP_DataRepository item)
 {
     return(item.IsNewItem || !item.KeyProperties.All(y => OriginalRelatedData.Any(z => z.KeyProperties.Any(u => u.ColumnID == y.ColumnID && u.Value == y.Value))));
 }
Example #6
0
 public CodeFunctionParamOneDataItem(DP_DataRepository dataItem, DR_Requester requester) : base(requester)
 {
     DataItem = dataItem;
 }
Example #7
0
        public void AddChangeMonitor(string generalKey, string usageKey, string restTail, int columnID = 0, DP_DataRepository dataToCall = null)
        {
            if (string.IsNullOrEmpty(restTail) && columnID == 0)
            {
                return;
            }
            if (dataToCall == null)
            {
                dataToCall = this;
            }

            ChangeMonitorItems.Add(new ChangeMonitor()
            {
                GeneralKey = generalKey,
                UsageKey   = usageKey,
                DataToCall = dataToCall,
                columnID   = columnID,
                RestTail   = restTail
            });
            if (!string.IsNullOrEmpty(restTail))
            {
                CheckChildRelationshipInfoChangeMonitor();
            }
        }