Beispiel #1
0
        static void Main(string[] args)
        {
            var readDirectory       = ConfigurationManager.AppSettings["Directory"];
            var writeDirectory      = ConfigurationManager.AppSettings["WriteDirectory"];
            var directory           = ConfigurationManager.AppSettings["Directory"];
            var sourceFilePerson    = FileMatch.GetFullFileName(readDirectory, ConfigurationManager.AppSettings["GESOURCEFILEPERSON"]);
            var worksheetNamePerson = ConfigurationManager.AppSettings["PersonWorkSheetName"];
            var sourceFileEntity    = FileMatch.GetFullFileName(readDirectory, ConfigurationManager.AppSettings["GESOURCEFILEENTITY"]);
            var worksheetNameEntity = ConfigurationManager.AppSettings["EntityWorkSheetName"];
            var headings            = ConfigurationManager.AppSettings["Headings"];

            DependencyResolution.ConstructContainer();
            var serializer       = DependencyResolution.GetGESerializer(readDirectory + sourceFilePerson, worksheetNamePerson, readDirectory + sourceFileEntity, worksheetNameEntity);
            var serializedResult = serializer.Serialize();

            var personWorksheetName = ConfigurationManager.AppSettings["PersonWorksheetName"];

            var in_customer_ge     = ConfigurationManager.AppSettings["in_customer_ge"];
            var in_customer_ge_ext = ConfigurationManager.AppSettings["in_customer_ge_ext"];
            var GERelationship     = ConfigurationManager.AppSettings["GERelationship"];
            var UnUsed             = ConfigurationManager.AppSettings["UnUsed"];

            var writer = DependencyResolution.GetFICOFileWriter(writeDirectory + in_customer_ge,
                                                                writeDirectory + in_customer_ge_ext, headings);

            writer.Write(serializedResult.OutputAndExtension, "");
            var relationWriter = DependencyResolution.GetGERelationshipWriter(writeDirectory + GERelationship,
                                                                              UnUsed, "INSTITUTE|CUSTNO|REL_CUSTNO|REL_TYPE|REL_SHARE|REL_FLAG1|REL_FLAG2|REL_FLAG3|REL_COMMENT|PROCESSFLAG");

            relationWriter.Write(serializedResult.RelationshipList, "|");
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            StreamWriter sr = new StreamWriter(ConfigurationManager.AppSettings["logFileLocation"], append: true);
            //try
            //{
            var readDirectory = ConfigurationManager.AppSettings["Directory"];

            sr.WriteLine("Completed reading all config values." + readDirectory);
            var writeDirectory = ConfigurationManager.AppSettings["WriteDirectory"];

            sr.WriteLine("Completed reading all config values." + writeDirectory);
            var sourceTemp = FileMatch.GetFullFileName(readDirectory, ConfigurationManager.AppSettings["GGETEMP"]);

            sr.WriteLine("Completed reading all config values." + sourceTemp);
            var sourceTempworksheetName = ConfigurationManager.AppSettings["TempSheetName"];

            sr.WriteLine("Completed reading all config values." + sourceTempworksheetName);
            var sourcePerm = FileMatch.GetFullFileName(readDirectory, ConfigurationManager.AppSettings["GGEPERM"]);

            sr.WriteLine("Completed reading all config values." + sourcePerm);
            var sourcePermworksheetName = ConfigurationManager.AppSettings["PermSheetName"];

            sr.WriteLine("Completed reading all config values." + sourcePermworksheetName);
            InputlistPair serializedResult = new InputlistPair();

            Console.WriteLine("Completed reading all config values." + DateTime.Now);

            sr.WriteLine("Completed reading all config values.");
            if (args[0] == "0")
            {
                Console.WriteLine("Text file version.");
                sr.WriteLine("Text file version." + DateTime.Now);
                var ggeSerializer = DependencyResolution.GetGGESerializer(readDirectory + sourcePerm, readDirectory + sourceTemp, sourceTempworksheetName);
                serializedResult = ggeSerializer.Serialize();
            }
            else
            {
                Console.WriteLine("Excel Version.");
                sr.WriteLine("Excel Version." + DateTime.Now);
                var ggeSerializer = DependencyResolution.GetGGESerializer(readDirectory + sourcePerm, sourcePermworksheetName, readDirectory + sourceTemp, sourceTempworksheetName);
                serializedResult = ggeSerializer.Serialize();
            }

            var GGE_Customer = ConfigurationManager.AppSettings["GGE_Customer"];
            var GGE_ext      = ConfigurationManager.AppSettings["GGE_ext"];

            var writer = DependencyResolution.GetFICOFileWriter(writeDirectory + GGE_Customer,
                                                                writeDirectory + GGE_ext, "");

            writer.Write(serializedResult.OutputAndExtension, "");
            sr.Close();
            //}
            //catch(Exception e)
            //{
            //    sr.WriteLine("Failed for reason: " + DateTime.Now + e );
            //    sr.Close();
            //}
        }
        static void Main(string[] args)
        {
            DependencyResolution.ConstructContainer();
            var reader           = DependencyResolution.GetDJExcelFileReader();
            var result           = reader.GetData();
            var serializer       = DependencyResolution.GetFICOSerializer();
            var serializedResult = serializer.Serialize(result);
            var writer           = DependencyResolution.GetFICOFileWriter(@"C:\Users\jyp1510\Documents\TestData\TestOutput.csv",
                                                                          "INSTITUTE|" +
                                                                          "CUSTNO|" +
                                                                          "FIRST_NAME|" +
                                                                          "LASTNAME_COMPANYNAME|" +
                                                                          "STREET|" +
                                                                          "ZIP|" +
                                                                          "TOWN|" +
                                                                          "H_COUNTRY|" +
                                                                          "CUSY|" +
                                                                          "FK_CSMNO|" +
                                                                          "PROFESSION|" +
                                                                          "BRANCH|" +
                                                                          "BIRTHDATE|" +
                                                                          "CUSTCONTACT|" +
                                                                          "EXEMPTIONFLAG|" +
                                                                          "EXEMPTIONAMOUNT|" +
                                                                          "ASYLSYN|" +
                                                                          "SALARY|" +
                                                                          "SALARYDATE|" +
                                                                          "NAT_COUNTRY|" +
                                                                          "TOT_WEALTH|" +
                                                                          "CUST_TYPE|" +
                                                                          "CUST_FLAG_01|" +
                                                                          "PASS_NO|" +
                                                                          "BIRTH_COUNTRY|" +
                                                                          "BIRTH_PLACE|" +
                                                                          "BORROWEYN|" +
                                                                          "DIRECT_DEBITYN|" +
                                                                          "GENDER|" +
                                                                          "RISK_CLASS");

            writer.Write(serializedResult);
        }
Beispiel #4
0
        static void Main(string[] args)
        {
            var readDirectory  = ConfigurationManager.AppSettings["Directory"];
            var writeDirectory = ConfigurationManager.AppSettings["WriteDirectory"];

            var personSourceFile    = FileMatch.GetFullFileName(readDirectory, ConfigurationManager.AppSettings["GESOURCEFILEPERSON"]);
            var personWorksheetName = ConfigurationManager.AppSettings["PersonWorksheetName"];

            var entitySourceFile    = FileMatch.GetFullFileName(readDirectory, ConfigurationManager.AppSettings["GESOURCEFILEENTITY"]);
            var entityWorksheetName = ConfigurationManager.AppSettings["EntityWorksheetName"];

            var headings = ConfigurationManager.AppSettings["Headings"];

            DependencyResolution.ConstructContainer();
            var reader = DependencyResolution.GetGEFileReader();

            var personResult = reader.GetData(readDirectory + personSourceFile, personWorksheetName, 4);
            var entityResult = reader.GetData(readDirectory + entitySourceFile, entityWorksheetName, 2);


            var serializer       = DependencyResolution.GetFICOSerializer();
            var serializedResult = serializer.Serialize(personResult, entityResult);

            var LibFin_Customer    = ConfigurationManager.AppSettings["LibFin_Customer"];
            var LibFin_Ext         = ConfigurationManager.AppSettings["LibFin_Ext"];
            var LibFinRelationship = ConfigurationManager.AppSettings["LibFinRelationship"];
            var UnUsed             = ConfigurationManager.AppSettings["UnUsed"];


            var writer = DependencyResolution.GetFICOFileWriter(writeDirectory + LibFin_Customer,
                                                                writeDirectory + LibFin_Ext, headings);

            writer.Write(serializedResult.OutputAndExtension, "");

            var relationWriter = DependencyResolution.GetGERelationshipWriter(writeDirectory + LibFinRelationship,
                                                                              UnUsed, "INSTITUTE|CUSTNO|REL_CUSTNO|REL_TYPE|REL_SHARE|REL_FLAG1|REL_FLAG2|REL_FLAG3|REL_COMMENT|PROCESSFLAG");

            relationWriter.Write(serializedResult.RelationshipList, "|");
        }