Esempio n. 1
0
        public static void ParseMail(string path)
        {
            if (System.IO.File.Exists(path) == false)
            {
                LogHelper.showLog("文件不存在:" + path);
                return;
            }

            string dstFileName = System.IO.Path.GetFileNameWithoutExtension(path);


            string mailPath = string.Format(@"{0}\{1}\非QQ邮箱_{2}.txt",
                                            PublicConfig.SaveDir,
                                            dstFileName,
                                            dstFileName);

            string qqMailPath = string.Format(@"{0}\{1}\QQ邮箱_{2}.txt",
                                              PublicConfig.SaveDir,
                                              dstFileName,
                                              dstFileName);

            PublicUtil.MakeSureDirectoryPathExists(mailPath);

            List <ExcelRow> listRow = getRowList(path);

            SaveMail(listRow, mailPath, qqMailPath);
        }
Esempio n. 2
0
        public static void ParseExcel(string path)
        {
            if (System.IO.File.Exists(path) == false)
            {
                LogHelper.showLog("文件不存在:" + path);
                return;
            }

            string dstFileName = System.IO.Path.GetFileNameWithoutExtension(path);

            if (PublicConfig.ExportCompanyName)
            {
                dstFileName += "_2";
            }

            string dstFilePath = string.Format(@"{0}\{1}\xls\{2}.xls",
                                               PublicConfig.SaveDir,
                                               dstFileName,
                                               dstFileName);

            PublicUtil.MakeSureDirectoryPathExists(dstFilePath);


            List <ExcelRow> listRow = getRowList(path);

            if (PublicConfig.ExportCompanyName)
            {
                saveXls(listRow, PublicConfig.XlsTemplatePath2, dstFilePath);
            }
            else
            {
                saveXls(listRow, PublicConfig.XlsTemplatePath, dstFilePath);
            }
        }
Esempio n. 3
0
 private void addGSNBPhone(string sPhone)
 {
     if (PublicUtil.IsPhoneNumber(sPhone))
     {
         DtGSNBPhone.Add(sPhone);
     }
     if (PublicUtil.IsZuoJiNumber(sPhone))
     {
         DtZuoJi.Add(sPhone);
     }
 }
Esempio n. 4
0
 private void addPhone(string sPhone)
 {
     if (PublicUtil.IsPhoneNumber(sPhone))
     {
         if (sPhone.Length > 11)
         {
             sPhone = sPhone.Substring(0, 11);
         }
         DtPhone.Add(sPhone);
     }
     if (PublicUtil.IsZuoJiNumber(sPhone))
     {
         DtZuoJi.Add(sPhone);
     }
 }