Exemple #1
0
        //
        // It returns a reference path
        //
        public static string getReferenceFilePathName(string path)
        {
            string filePathName          = path;
            string referencePathFileName = "";

            // Get template folder
            var templateFolder =
                CodeValue.GetCodeValueExtended(MakConstant.CodeTypeString.SYSTSET, MakConstant.SYSFOLDER.TEMPLATEFOLDER);

            var templateFolderPhysical =
                CodeValue.GetCodeValueExtraString(MakConstant.CodeTypeString.SYSTSET, MakConstant.SYSFOLDER.TEMPLATEFOLDER);


            // Get template folder
            var clientFolder =
                CodeValue.GetCodeValueExtended(MakConstant.CodeTypeString.SYSTSET, MakConstant.SYSFOLDER.CLIENTFOLDER);

            if (filePathName.Contains(templateFolder))
            {
                referencePathFileName =
                    filePathName.Replace(templateFolder, MakConstant.SYSFOLDER.TEMPLATEFOLDER);
            }
            if (filePathName.Contains(templateFolderPhysical))
            {
                referencePathFileName =
                    filePathName.Replace(templateFolderPhysical, MakConstant.SYSFOLDER.TEMPLATEFOLDER);
            }


            if (filePathName.Contains(clientFolder))
            {
                referencePathFileName =
                    filePathName.Replace(clientFolder, MakConstant.SYSFOLDER.CLIENTFOLDER);
            }

            if (String.IsNullOrEmpty(referencePathFileName))
            {
                referencePathFileName = path;
            }

            return(referencePathFileName);
        }