Esempio n. 1
0
        private void ctxViewRule_Click(object sender, EventArgs e)
        {
            DataMapType theType = EnumPlus.ConvertString(typeof(DataMapType), mppedObjectsTree.SelectedNode.Tag.GetType().Name);
            var         store   = Result.ReferenceInfo.StoreReferences.Where(x => x.MapType == theType);

            if (store != null)
            {
                IDataRule storeRule = null;
                switch (theType)
                {
                case DataMapType.FieldColumnMap:
                case DataMapType.PropertyColumnMap:
                    RuleStore rStore = (RuleStore)store.First();
                    storeRule = rStore.Rules.Where(x => x.FieldName.Equals(mppedObjectsTree.SelectedNode.Text.Trim())).FirstOrDefault();
                    break;

                case DataMapType.MethodParameterMap:
                    RuleStore rpStore = (RuleStore)store.Where(x => x.DataStoreName.Equals(mppedObjectsTree.SelectedNode.Text.Trim()) && x.ParamterCount.Equals(lstMapDetails.Items.Count)).First();
                    storeRule = rpStore.Rules.Where(x => x.FieldName.Equals(lstMapDetails.SelectedItems[0].SubItems[0].Text.Trim())).First();
                    break;
                }
                DisplayRule(storeRule, false);
            }
        }