You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.3 KiB
47 lines
1.3 KiB
4 years ago
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Linq;
|
||
|
using System.Text;
|
||
|
using QMAPP.WinForm.Common;
|
||
|
using QMAPP.FJC.Entity.Basic;
|
||
|
using System.IO;
|
||
|
|
||
|
namespace QMAPP.WinForm.Forms.Operation
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 用来拷贝打印模板
|
||
|
/// </summary>
|
||
|
public class PrintTempleCopyClass
|
||
|
{
|
||
|
|
||
|
//lmw32打印程序使用的打印模板每隔一段时间会出现模板损坏的情况
|
||
|
//导致无法正常打印,在每次打印程序界面上初始化过程中复制打印模板
|
||
|
|
||
|
/// <summary>
|
||
|
/// 通过页面类型来拷贝打印模板
|
||
|
/// </summary>
|
||
|
/// <param name="printFlag"></param>
|
||
|
public void CopyPrintTemple(string printFlag)
|
||
|
{
|
||
|
|
||
|
List<PrintModelCopy> list = new BasicData().GetPrintModelCopy(printFlag);
|
||
|
|
||
|
foreach (var pmc in list)
|
||
|
{
|
||
|
if (File.Exists(@pmc.SOURCEDIR + @"\" + @pmc.FILENAME))
|
||
|
{
|
||
|
|
||
|
if (!System.IO.Directory.Exists(@pmc.DESDIR))
|
||
|
{
|
||
|
// 目录不存在,建立目录
|
||
|
System.IO.Directory.CreateDirectory(@pmc.DESDIR);
|
||
|
}
|
||
|
|
||
|
System.IO.File.Copy(@pmc.SOURCEDIR + @"\" + @pmc.FILENAME, (@pmc.DESDIR + @"\" + @pmc.FILENAME), true);
|
||
|
}
|
||
|
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|