示例#1
0
        public Dictionary <string, List <string> > getMappingOIDwithPersonalAccount()
        {
            // Physical Path of Root Folder
            string rootPath = System.Web.HttpContext.Current.Server.MapPath("~/UploadedFiles");

            Dictionary <string, List <string> > dictMappingOIDwithPersonalAccount = new Dictionary <string, List <string> >();

            List <string> contentFile = ReadWriteFileTxt.readFile(rootPath + "\\MappingOIDwithPersonalAccount.txt");

            for (int i = 0; i < contentFile.Count; i++)
            {
                string[] oidAccount = contentFile[i].Split(' ');

                if (dictMappingOIDwithPersonalAccount.ContainsKey(oidAccount[0]))
                {
                    dictMappingOIDwithPersonalAccount[oidAccount[0]].Add(oidAccount[1]);
                }
                else if (oidAccount.Length > 1)
                {
                    List <string> listPersAccount = new List <string>();
                    listPersAccount.Add(oidAccount[1]);
                    dictMappingOIDwithPersonalAccount.Add(oidAccount[0], listPersAccount);
                }
            }

            return(dictMappingOIDwithPersonalAccount);
        }
示例#2
0
        public void writeInFile(AccrualPayment[] accrualPayments)
        {
            // Physical Path of Root Folder
            string rootPath = System.Web.HttpContext.Current.Server.MapPath("~/UploadedFiles");

            List <string> personalAccount = new List <string>();

            for (int i = 0; i < accrualPayments.Length; i++)
            {
                if (accrualPayments[i].OIDobject.Equals("Not Found"))
                {
                    personalAccount.Add(accrualPayments[i].PersonalAccount);
                }
            }

            ReadWriteFileTxt.writeFile(personalAccount, rootPath, "NotFoundPersonalAccount" + DateTime.UtcNow.ToString().Replace('.', '_'), "txt");
        }