Dim cj As WinForm.DateTimePicker = e.Form.Controls("DateTimePicker2")
If cj.Text = Nothing Then
messagebox.show("请在导入月终日期输入日期!")
Else
Dim y,m,d1 As Integer
Dim dt2 As Date
dt2 = vars("cc")
Dim dt1 As Date = #1/01/0001#
DateYMD(dt1,dt2, y, m, d1)
y=y+1
m=m+1
Dim aa As String
Dim xx As String
aa=vars("aa")
If aa ="报表1" Then
FileSys.CopyDirectory ("E:\财务数据汇总\报表1","E:\财务数据汇总\报表\报表" & y & Format(m,"00") ,True)
For Each file As String In filesys .GetFiles(ProjectPath & aa)
xx = FileSys.GetName(file)
FileSys.DeleteFile("E:\财务数据汇总\报表1\" & xx)
Next
Else If aa ="报表2" Then
FileSys.CopyDirectory ("E:\财务数据汇总\报表1","E:\财务数据汇总\报表\报表" & y & Format(m,"00") ,True)
For Each file As String In filesys .GetFiles(ProjectPath & aa)
xx = FileSys.GetName(file)
FileSys.DeleteFile("E:\财务数据汇总\报表2\" & xx)
Next
Else
messagebox.show("请输入文件名")
End If
End If