Dim r As Row = Tables("项目汇总").Current
If r Is Nothing Then
Return
End If
Dim str() As String ={"项目名称","项目类型","客户名称","项目编号","制作流程_模型制作","制作流程_渲染制作","制作流程_后期制作"}
For i As Integer = 0 To str.Length -1
If r.IsNull(Str(i)) Then
MessageBox.Show(Str(i) & " 的信息请输入完整!", "警告!", MessageBoxButtons.Ok, MessageBoxIcon.Warning)
Return
End If
Next
Dim yslujing As String = ProjectPath & "客人原始文件\" & r("项目名称") & r("项目类型") & r("客户名称") & r("项目编号")
If FileSys.DirectoryExists(yslujing) Then '如果目录C:\MyFolder存在
Dim wenjianlujing As String = r("项目名称") & r("项目类型") & r("客户名称") & r("项目编号")
Dim yslujingxia As String = ProjectPath & "客人原始文件\" & r("项目名称") & r("项目类型") & r("客户名称") & r("项目编号") & "\" & wenjianlujing & ".zip"
If MessageBox.Show("确定需要压缩原始文件吗?", "提示!", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = DialogResult.Yes Then
Dim zip As New zipFile
zip.Create(yslujingxia)
zip.AddFolder(yslujing)
zip.Close()
MessageBox.Show("压缩完毕!", "提示!", MessageBoxButtons.YesNo, MessageBoxIcon.Information)
Else
Return
End If
Else
If MessageBox.Show("指定目录不存在需要创建改目录吗?", "提示!", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = DialogResult.Yes Then
FileSys.CreateDirectory(yslujing)
MessageBox.Show(yslujing & " 的目录创建成功!","提示!", MessageBoxButtons.YesNo, MessageBoxIcon.Information)
Else
Return
End If
End If