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); }
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); } }
private void addGSNBPhone(string sPhone) { if (PublicUtil.IsPhoneNumber(sPhone)) { DtGSNBPhone.Add(sPhone); } if (PublicUtil.IsZuoJiNumber(sPhone)) { DtZuoJi.Add(sPhone); } }
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); } }