Ejemplo n.º 1
0
        private static string HideDetailFields(IDslModel dslModel, PropertyInfo info)
        {
            string entityName = CaptionHelper.RemoveBrowseSufix(info.DataStructure.Name);

            bool isDetail = dslModel.Concepts.OfType <ReferenceDetailInfo>().Any(
                d => d.Reference.Name == info.Name &&
                d.Reference.DataStructure.Name == entityName &&
                d.Reference.DataStructure.Module.Name == info.DataStructure.Module.Name);

            if (isDetail)
            {
                return(EditModeHidden);
            }
            return("");
        }
Ejemplo n.º 2
0
        private static string HideLookupFields(IDslModel dslModel, PropertyInfo info)
        {
            bool isBrowse = info.DataStructure.Name.EndsWith("Browse");

            if (isBrowse)
            {
                string dataStructureName = CaptionHelper.RemoveBrowseSufix(info.DataStructure.Name);

                bool existsInBaseEntitety = dslModel.Concepts.OfType <PropertyInfo>().Any(
                    p => p.DataStructure.Name == dataStructureName && p.Name == info.Name && p.DataStructure.Module.Name == info.DataStructure.Module.Name);

                if (!existsInBaseEntitety)
                {
                    return(EditModeHidden);
                }
            }
            return("");
        }
Ejemplo n.º 3
0
        public static string GetCaptionConstant(DataStructureInfo info)
        {
            string entityName = CaptionHelper.RemoveBrowseSufix(info.Name);

            return(info.Module.Name + "_" + entityName);
        }