コード例 #1
0
        public void DeleteFieldVersionDetail(string selectedPlatform, string selectedVersion, int index, int detailIndex)
        {
            FileColumns fc = FORIS.Interbilling.NTS.Mediation.Configurations.Configuration.GetNotCashedConfiguration <FileColumns>();
            string      selectedFileType            = selectedPlatform;
            VersionDeterminationMethods valueMethod = (VersionDeterminationMethods)Enum.Parse(typeof(VersionDeterminationMethods), selectedVersion);
            var version = fc.Files.Find(p => p.Method == valueMethod && p.fileType == selectedFileType).Versions[index];
            var columns = version.Columns;

            string logString = "FileType:" + selectedPlatform + "|" +
                               "VersionMethod:" + selectedVersion + "|" +
                               "VersionName:" + version.VersionName + "|" +
                               "ColumnName:" + columns[index].ColumnName + "|" +
                               "ColumnLength:" + columns[index].ColumnLength;

            WriteLog("DELETE", "MED Configuration", "FileControl.Column", System.Security.Principal.WindowsIdentity.GetCurrent().Name, logString, "");

            columns.RemoveAt(detailIndex);

            FORIS.Interbilling.NTS.Mediation.Configurations.Configuration.SaveConfiguration(fc.GetType(), fc);
        }
コード例 #2
0
        public void InsertFieldVersion(string selectedPlatform, string selectedVersion, string version, string format, string dateFrom, string dateTo)
        {
            FileColumns fc = FORIS.Interbilling.NTS.Mediation.Configurations.Configuration.GetNotCashedConfiguration <FileColumns>();


            var fileType = selectedPlatform;
            var method   = (VersionDeterminationMethods)Enum.Parse(typeof(VersionDeterminationMethods), selectedVersion);
            List <FileTypeVersion.Version> versionList = new List <FileTypeVersion.Version>();
            bool exist             = fc.Files.Exists(p => p.fileType == fileType && p.Method == method);
            bool fileTypeHasMethod = fc.Files.Exists(p => p.fileType == fileType && p.Method != method);

            if (exist)
            {
                versionList = fc.Files.Find(p => p.fileType == fileType && p.Method == method).Versions;
            }
            else
            {
                versionList = new List <FileTypeVersion.Version>();
            }
            FileTypeVersion.Version v = new FileTypeVersion.Version();
            v.VersionName           = version;
            v.VersionStartDate      = dateFrom;
            v.VersionEndDate        = dateTo;
            v.VersionFileNameFormat = format;
            versionList.Add(v);
            if (!exist)
            {
                FileTypeVersion newFileTypeVersion = new FileTypeVersion();
                newFileTypeVersion.fileType = fileType;
                newFileTypeVersion.Method   = method;
                newFileTypeVersion.Versions = versionList;
                fc.Files.Add(newFileTypeVersion);
            }
            string logString = "FileType:" + fileType + "|" +
                               "VersionMethod:" + method + "|" +
                               "VersionName:" + v.VersionName + "|" +
                               "VersionStartDate:" + v.VersionStartDate + "|" +
                               "VersionEndDate:" + v.VersionEndDate + "|" +
                               "VersionFileNameFormat:" + v.VersionFileNameFormat + "|";

            //   WriteLog("INSERT", "MED Configuration", "FileColumns.Version", System.Security.Principal.WindowsIdentity.GetCurrent().Name, logString, "");
            FORIS.Interbilling.NTS.Mediation.Configurations.Configuration.SaveConfiguration(fc.GetType(), fc);
        }
コード例 #3
0
        public void InsertFieldVersionDetail(string selectedPlatform, string selectedVersion, int index, string name, string length)
        {
            FileColumns fc = FORIS.Interbilling.NTS.Mediation.Configurations.Configuration.GetNotCashedConfiguration <FileColumns>();

            string selectedFileType = selectedPlatform;
            VersionDeterminationMethods valueMethod = (VersionDeterminationMethods)Enum.Parse(typeof(VersionDeterminationMethods), selectedVersion);

            FileTypeVersion.Version ver = fc.Files.Find(p => p.Method == valueMethod && p.fileType == selectedFileType).Versions[index];

            Column col = new Column();

            col.ColumnName   = name;
            col.ColumnLength = length;

            ver.Columns.Add(col);
            FORIS.Interbilling.NTS.Mediation.Configurations.Configuration.SaveConfiguration(fc.GetType(), fc);

            string logString = "VersionName:" + ver.VersionName + "|" +
                               "ColumnName:" + col.ColumnName + "|" +
                               "ColumLenght:" + col.ColumnLength;

            WriteLog("INSERT", "MED Configuration", "FileColumns.Columns", System.Security.Principal.WindowsIdentity.GetCurrent().Name, logString, "");
        }
コード例 #4
0
        public void DeleteFieldVersion(int index, string selectedPlatform, string selectedVersion)
        {
            FileColumns fc = FORIS.Interbilling.NTS.Mediation.Configurations.Configuration.GetNotCashedConfiguration <FileColumns>();
            string      selectedFileType            = selectedPlatform;
            VersionDeterminationMethods valueMethod = (VersionDeterminationMethods)Enum.Parse(typeof(VersionDeterminationMethods), selectedVersion);

            var versions = fc.Files.Find(p => p.Method == valueMethod && p.fileType == selectedFileType).Versions;
            var file     = fc.Files.Find(p => p.Method == valueMethod && p.fileType == selectedFileType && p.Versions == versions);

            string logString = "FileType:" + selectedPlatform + "|" +
                               "VersionMethod:" + selectedVersion + "|" +
                               "VersionName:" + versions[index].VersionName + "|" +
                               "VersionFileNameFormat:" + versions[index].VersionFileNameFormat + "|" +
                               "VersionStartDate:" + versions[index].VersionStartDate + "|" +
                               "VersionEndDate:" + versions[index].VersionEndDate;

            WriteLog("DELETE", "MED Configuration", "FileControl.Version", System.Security.Principal.WindowsIdentity.GetCurrent().Name, logString, "");

            fc.Files.Remove(file);

            FORIS.Interbilling.NTS.Mediation.Configurations.Configuration.SaveConfiguration(fc.GetType(), fc);
        }