Browse Source

添加了测试连接的功能,修复了几个BUG

zoule 11 months ago
parent
commit
9783194291

+ 1 - 1
DbBackup.sln

@@ -7,7 +7,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DbBackup", "DbBackup\DbBack
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Oracle11", "Oracle11\Oracle11.csproj", "{65DB1E82-4A36-462D-8258-73876E819522}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SevenZip", "Zip\SevenZip.csproj", "{1BEC4A58-4FC4-4468-9DAF-0CCF90D1A576}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SevenZip", "SevenZip\SevenZip.csproj", "{1BEC4A58-4FC4-4468-9DAF-0CCF90D1A576}"
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution

+ 0 - 4
DbBackup/DbBackup.csproj

@@ -185,10 +185,6 @@
       <Project>{65db1e82-4a36-462d-8258-73876e819522}</Project>
       <Name>Oracle11</Name>
     </ProjectReference>
-    <ProjectReference Include="..\Zip\SevenZip.csproj">
-      <Project>{1bec4a58-4fc4-4468-9daf-0ccf90d1a576}</Project>
-      <Name>SevenZip</Name>
-    </ProjectReference>
   </ItemGroup>
   <ItemGroup>
     <Content Include="Service.ico" />

+ 193 - 141
DbBackup/Form1.Designer.cs

@@ -40,8 +40,8 @@
             this.txtBackupAll = new DevExpress.XtraEditors.CheckEdit();
             this.txtBackupIncrement = new DevExpress.XtraEditors.CheckEdit();
             this.btnBackup = new DevExpress.XtraEditors.SimpleButton();
-            this.gcLog1 = new DevExpress.XtraGrid.GridControl();
-            this.gvLog1 = new DevExpress.XtraGrid.Views.Grid.GridView();
+            this.gcLog = new DevExpress.XtraGrid.GridControl();
+            this.gvLog = new DevExpress.XtraGrid.Views.Grid.GridView();
             this.txtService = new DevExpress.XtraEditors.TextEdit();
             this.txtPwd = new DevExpress.XtraEditors.TextEdit();
             this.txtUser = new DevExpress.XtraEditors.TextEdit();
@@ -51,8 +51,6 @@
             this.txtPwd2 = new DevExpress.XtraEditors.TextEdit();
             this.txtService2 = new DevExpress.XtraEditors.TextEdit();
             this.btnRestore = new DevExpress.XtraEditors.SimpleButton();
-            this.gcLog2 = new DevExpress.XtraGrid.GridControl();
-            this.gvLog2 = new DevExpress.XtraGrid.Views.Grid.GridView();
             this.btnOpenDir = new DevExpress.XtraEditors.SimpleButton();
             this.txtDataFile = new DevExpress.XtraEditors.ButtonEdit();
             this.txtSysPwd = new DevExpress.XtraEditors.TextEdit();
@@ -77,19 +75,23 @@
             this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.layoutControlGroup4 = new DevExpress.XtraLayout.LayoutControlGroup();
-            this.layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem();
             this.itemAllFile1 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem16 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlGroup5 = new DevExpress.XtraLayout.LayoutControlGroup();
-            this.simpleLabelItem1 = new DevExpress.XtraLayout.SimpleLabelItem();
+            this.btnConnectTest1 = new DevExpress.XtraEditors.SimpleButton();
+            this.layoutControlItem17 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.simpleLabelItem2 = new DevExpress.XtraLayout.SimpleLabelItem();
+            this.simpleLabelItem3 = new DevExpress.XtraLayout.SimpleLabelItem();
+            this.emptySpaceItem2 = new DevExpress.XtraLayout.EmptySpaceItem();
+            this.btnConnectTest2 = new DevExpress.XtraEditors.SimpleButton();
+            this.layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
             this.layoutControl1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.txtAllFile.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtBackupAll.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtBackupIncrement.Properties)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.gcLog1)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.gvLog1)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.gcLog)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.gvLog)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtService.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtPwd.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtUser.Properties)).BeginInit();
@@ -98,8 +100,6 @@
             ((System.ComponentModel.ISupportInitialize)(this.txtUser2.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtPwd2.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtService2.Properties)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.gcLog2)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.gvLog2)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtDataFile.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtSysPwd.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit();
@@ -123,12 +123,14 @@
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup4)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.itemAllFile1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem16)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup5)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.simpleLabelItem1)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem17)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.simpleLabelItem2)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.simpleLabelItem3)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).BeginInit();
             this.SuspendLayout();
             // 
             // layoutControl1
@@ -137,7 +139,7 @@
             this.layoutControl1.Controls.Add(this.txtBackupAll);
             this.layoutControl1.Controls.Add(this.txtBackupIncrement);
             this.layoutControl1.Controls.Add(this.btnBackup);
-            this.layoutControl1.Controls.Add(this.gcLog1);
+            this.layoutControl1.Controls.Add(this.gcLog);
             this.layoutControl1.Controls.Add(this.txtService);
             this.layoutControl1.Controls.Add(this.txtPwd);
             this.layoutControl1.Controls.Add(this.txtUser);
@@ -147,13 +149,15 @@
             this.layoutControl1.Controls.Add(this.txtPwd2);
             this.layoutControl1.Controls.Add(this.txtService2);
             this.layoutControl1.Controls.Add(this.btnRestore);
-            this.layoutControl1.Controls.Add(this.gcLog2);
             this.layoutControl1.Controls.Add(this.btnOpenDir);
             this.layoutControl1.Controls.Add(this.txtDataFile);
             this.layoutControl1.Controls.Add(this.txtSysPwd);
+            this.layoutControl1.Controls.Add(this.btnConnectTest1);
+            this.layoutControl1.Controls.Add(this.btnConnectTest2);
             this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
             this.layoutControl1.Location = new System.Drawing.Point(0, 0);
             this.layoutControl1.Name = "layoutControl1";
+            this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(1270, 301, 650, 400);
             this.layoutControl1.Root = this.Root;
             this.layoutControl1.Size = new System.Drawing.Size(948, 558);
             this.layoutControl1.TabIndex = 0;
@@ -161,7 +165,7 @@
             // 
             // txtAllFile
             // 
-            this.txtAllFile.Location = new System.Drawing.Point(24, 303);
+            this.txtAllFile.Location = new System.Drawing.Point(15, 294);
             this.txtAllFile.Name = "txtAllFile";
             this.txtAllFile.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
             new DevExpress.XtraEditors.Controls.EditorButton()});
@@ -172,10 +176,10 @@
             // 
             // txtBackupAll
             // 
-            this.txtBackupAll.Location = new System.Drawing.Point(124, 252);
+            this.txtBackupAll.Location = new System.Drawing.Point(90, 243);
             this.txtBackupAll.Name = "txtBackupAll";
             this.txtBackupAll.Properties.Caption = "全量备份";
-            this.txtBackupAll.Size = new System.Drawing.Size(96, 20);
+            this.txtBackupAll.Size = new System.Drawing.Size(121, 20);
             this.txtBackupAll.StyleController = this.layoutControl1;
             this.txtBackupAll.TabIndex = 11;
             this.txtBackupAll.CheckedChanged += new System.EventHandler(this.txtBackupAll_CheckedChanged);
@@ -183,17 +187,17 @@
             // txtBackupIncrement
             // 
             this.txtBackupIncrement.EditValue = true;
-            this.txtBackupIncrement.Location = new System.Drawing.Point(24, 252);
+            this.txtBackupIncrement.Location = new System.Drawing.Point(15, 243);
             this.txtBackupIncrement.Name = "txtBackupIncrement";
             this.txtBackupIncrement.Properties.Caption = "增量备份";
-            this.txtBackupIncrement.Size = new System.Drawing.Size(96, 20);
+            this.txtBackupIncrement.Size = new System.Drawing.Size(71, 20);
             this.txtBackupIncrement.StyleController = this.layoutControl1;
             this.txtBackupIncrement.TabIndex = 10;
             this.txtBackupIncrement.CheckedChanged += new System.EventHandler(this.txtBackupIncrement_CheckedChanged);
             // 
             // btnBackup
             // 
-            this.btnBackup.Location = new System.Drawing.Point(24, 347);
+            this.btnBackup.Location = new System.Drawing.Point(15, 384);
             this.btnBackup.Name = "btnBackup";
             this.btnBackup.Size = new System.Drawing.Size(186, 22);
             this.btnBackup.StyleController = this.layoutControl1;
@@ -201,25 +205,25 @@
             this.btnBackup.Text = "备份";
             this.btnBackup.Click += new System.EventHandler(this.btnBackup_Click);
             // 
-            // gcLog1
+            // gcLog
             // 
-            this.gcLog1.Location = new System.Drawing.Point(225, 70);
-            this.gcLog1.MainView = this.gvLog1;
-            this.gcLog1.Name = "gcLog1";
-            this.gcLog1.Size = new System.Drawing.Size(698, 463);
-            this.gcLog1.TabIndex = 8;
-            this.gcLog1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
-            this.gvLog1});
+            this.gcLog.Location = new System.Drawing.Point(219, 34);
+            this.gcLog.MainView = this.gvLog;
+            this.gcLog.Name = "gcLog";
+            this.gcLog.Size = new System.Drawing.Size(716, 511);
+            this.gcLog.TabIndex = 8;
+            this.gcLog.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
+            this.gvLog});
             // 
-            // gvLog1
+            // gvLog
             // 
-            this.gvLog1.GridControl = this.gcLog1;
-            this.gvLog1.Name = "gvLog1";
+            this.gvLog.GridControl = this.gcLog;
+            this.gvLog.Name = "gvLog";
             // 
             // txtService
             // 
             this.txtService.EditValue = "orcl";
-            this.txtService.Location = new System.Drawing.Point(24, 218);
+            this.txtService.Location = new System.Drawing.Point(15, 209);
             this.txtService.Name = "txtService";
             this.txtService.Properties.NullValuePrompt = "orcl";
             this.txtService.Size = new System.Drawing.Size(186, 20);
@@ -228,7 +232,7 @@
             // 
             // txtPwd
             // 
-            this.txtPwd.Location = new System.Drawing.Point(24, 167);
+            this.txtPwd.Location = new System.Drawing.Point(15, 158);
             this.txtPwd.Name = "txtPwd";
             this.txtPwd.Size = new System.Drawing.Size(186, 20);
             this.txtPwd.StyleController = this.layoutControl1;
@@ -236,7 +240,7 @@
             // 
             // txtUser
             // 
-            this.txtUser.Location = new System.Drawing.Point(24, 116);
+            this.txtUser.Location = new System.Drawing.Point(15, 107);
             this.txtUser.Name = "txtUser";
             this.txtUser.Size = new System.Drawing.Size(186, 20);
             this.txtUser.StyleController = this.layoutControl1;
@@ -248,7 +252,7 @@
             // txtDbAddr
             // 
             this.txtDbAddr.EditValue = "127.0.0.1:1521";
-            this.txtDbAddr.Location = new System.Drawing.Point(24, 65);
+            this.txtDbAddr.Location = new System.Drawing.Point(15, 56);
             this.txtDbAddr.Name = "txtDbAddr";
             this.txtDbAddr.Properties.NullValuePrompt = "127.0.0.1:1521";
             this.txtDbAddr.Size = new System.Drawing.Size(186, 20);
@@ -258,7 +262,7 @@
             // txtDbAddr2
             // 
             this.txtDbAddr2.EditValue = "127.0.0.1:1521";
-            this.txtDbAddr2.Location = new System.Drawing.Point(24, 65);
+            this.txtDbAddr2.Location = new System.Drawing.Point(15, 56);
             this.txtDbAddr2.Name = "txtDbAddr2";
             this.txtDbAddr2.Properties.NullValuePrompt = "127.0.0.1:1521";
             this.txtDbAddr2.Size = new System.Drawing.Size(186, 20);
@@ -267,7 +271,7 @@
             // 
             // txtUser2
             // 
-            this.txtUser2.Location = new System.Drawing.Point(24, 116);
+            this.txtUser2.Location = new System.Drawing.Point(15, 107);
             this.txtUser2.Name = "txtUser2";
             this.txtUser2.Size = new System.Drawing.Size(186, 20);
             this.txtUser2.StyleController = this.layoutControl1;
@@ -278,7 +282,7 @@
             // 
             // txtPwd2
             // 
-            this.txtPwd2.Location = new System.Drawing.Point(24, 167);
+            this.txtPwd2.Location = new System.Drawing.Point(15, 158);
             this.txtPwd2.Name = "txtPwd2";
             this.txtPwd2.Size = new System.Drawing.Size(186, 20);
             this.txtPwd2.StyleController = this.layoutControl1;
@@ -287,7 +291,7 @@
             // txtService2
             // 
             this.txtService2.EditValue = "orcl";
-            this.txtService2.Location = new System.Drawing.Point(24, 269);
+            this.txtService2.Location = new System.Drawing.Point(15, 260);
             this.txtService2.Name = "txtService2";
             this.txtService2.Properties.NullValuePrompt = "orcl";
             this.txtService2.Size = new System.Drawing.Size(186, 20);
@@ -296,7 +300,7 @@
             // 
             // btnRestore
             // 
-            this.btnRestore.Location = new System.Drawing.Point(24, 364);
+            this.btnRestore.Location = new System.Drawing.Point(15, 401);
             this.btnRestore.Name = "btnRestore";
             this.btnRestore.Size = new System.Drawing.Size(186, 22);
             this.btnRestore.StyleController = this.layoutControl1;
@@ -304,24 +308,9 @@
             this.btnRestore.Text = "还原";
             this.btnRestore.Click += new System.EventHandler(this.btnRestore_Click);
             // 
-            // gcLog2
-            // 
-            this.gcLog2.Location = new System.Drawing.Point(225, 70);
-            this.gcLog2.MainView = this.gvLog2;
-            this.gcLog2.Name = "gcLog2";
-            this.gcLog2.Size = new System.Drawing.Size(698, 463);
-            this.gcLog2.TabIndex = 8;
-            this.gcLog2.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
-            this.gvLog2});
-            // 
-            // gvLog2
-            // 
-            this.gvLog2.GridControl = this.gcLog2;
-            this.gvLog2.Name = "gvLog2";
-            // 
             // btnOpenDir
             // 
-            this.btnOpenDir.Location = new System.Drawing.Point(24, 393);
+            this.btnOpenDir.Location = new System.Drawing.Point(15, 430);
             this.btnOpenDir.Name = "btnOpenDir";
             this.btnOpenDir.Size = new System.Drawing.Size(186, 22);
             this.btnOpenDir.StyleController = this.layoutControl1;
@@ -331,7 +320,7 @@
             // 
             // txtDataFile
             // 
-            this.txtDataFile.Location = new System.Drawing.Point(24, 320);
+            this.txtDataFile.Location = new System.Drawing.Point(15, 311);
             this.txtDataFile.Name = "txtDataFile";
             this.txtDataFile.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
             new DevExpress.XtraEditors.Controls.EditorButton()});
@@ -345,7 +334,7 @@
             // 
             // txtSysPwd
             // 
-            this.txtSysPwd.Location = new System.Drawing.Point(24, 218);
+            this.txtSysPwd.Location = new System.Drawing.Point(15, 209);
             this.txtSysPwd.Name = "txtSysPwd";
             this.txtSysPwd.Size = new System.Drawing.Size(186, 20);
             this.txtSysPwd.StyleController = this.layoutControl1;
@@ -356,7 +345,8 @@
             this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
             this.Root.GroupBordersVisible = false;
             this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
-            this.tabbedControlGroup1});
+            this.tabbedControlGroup1,
+            this.layoutControlGroup2});
             this.Root.Name = "Root";
             this.Root.Size = new System.Drawing.Size(948, 558);
             this.Root.TextVisible = false;
@@ -365,8 +355,9 @@
             // 
             this.tabbedControlGroup1.Location = new System.Drawing.Point(0, 0);
             this.tabbedControlGroup1.Name = "tabbedControlGroup1";
-            this.tabbedControlGroup1.SelectedTabPage = this.layoutControlGroup1;
-            this.tabbedControlGroup1.Size = new System.Drawing.Size(928, 538);
+            this.tabbedControlGroup1.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0);
+            this.tabbedControlGroup1.SelectedTabPage = this.layoutControlGroup3;
+            this.tabbedControlGroup1.Size = new System.Drawing.Size(206, 538);
             this.tabbedControlGroup1.TabPages.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
             this.layoutControlGroup1,
             this.layoutControlGroup3,
@@ -381,15 +372,17 @@
             this.layoutControlItem4,
             this.layoutControlItem5,
             this.emptySpaceItem1,
-            this.layoutControlGroup2,
             this.layoutControlItem13,
             this.layoutControlItem14,
             this.layoutControlItem15,
-            this.itemAllFile});
+            this.itemAllFile,
+            this.layoutControlItem17});
             this.layoutControlGroup1.Location = new System.Drawing.Point(0, 0);
             this.layoutControlGroup1.Name = "layoutControlGroup1";
-            this.layoutControlGroup1.Size = new System.Drawing.Size(904, 490);
-            this.layoutControlGroup1.Text = "          备份              ";
+            this.layoutControlGroup1.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0);
+            this.layoutControlGroup1.Size = new System.Drawing.Size(200, 508);
+            this.layoutControlGroup1.Spacing = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0);
+            this.layoutControlGroup1.Text = "  备份  ";
             // 
             // layoutControlItem1
             // 
@@ -403,7 +396,7 @@
             this.layoutControlItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem1.Text = "数据库地址";
             this.layoutControlItem1.TextLocation = DevExpress.Utils.Locations.Top;
-            this.layoutControlItem1.TextSize = new System.Drawing.Size(122, 14);
+            this.layoutControlItem1.TextSize = new System.Drawing.Size(91, 14);
             // 
             // layoutControlItem2
             // 
@@ -417,7 +410,7 @@
             this.layoutControlItem2.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem2.Text = "用户名";
             this.layoutControlItem2.TextLocation = DevExpress.Utils.Locations.Top;
-            this.layoutControlItem2.TextSize = new System.Drawing.Size(122, 14);
+            this.layoutControlItem2.TextSize = new System.Drawing.Size(91, 14);
             // 
             // layoutControlItem3
             // 
@@ -431,7 +424,7 @@
             this.layoutControlItem3.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem3.Text = "密码";
             this.layoutControlItem3.TextLocation = DevExpress.Utils.Locations.Top;
-            this.layoutControlItem3.TextSize = new System.Drawing.Size(122, 14);
+            this.layoutControlItem3.TextSize = new System.Drawing.Size(91, 14);
             // 
             // layoutControlItem4
             // 
@@ -445,12 +438,12 @@
             this.layoutControlItem4.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem4.Text = "服务名";
             this.layoutControlItem4.TextLocation = DevExpress.Utils.Locations.Top;
-            this.layoutControlItem4.TextSize = new System.Drawing.Size(122, 14);
+            this.layoutControlItem4.TextSize = new System.Drawing.Size(91, 14);
             // 
             // layoutControlItem5
             // 
             this.layoutControlItem5.Control = this.btnBackup;
-            this.layoutControlItem5.Location = new System.Drawing.Point(0, 279);
+            this.layoutControlItem5.Location = new System.Drawing.Point(0, 325);
             this.layoutControlItem5.MaxSize = new System.Drawing.Size(200, 46);
             this.layoutControlItem5.MinSize = new System.Drawing.Size(200, 46);
             this.layoutControlItem5.Name = "layoutControlItem5";
@@ -463,12 +456,12 @@
             // emptySpaceItem1
             // 
             this.emptySpaceItem1.AllowHotTrack = false;
-            this.emptySpaceItem1.Location = new System.Drawing.Point(0, 371);
+            this.emptySpaceItem1.Location = new System.Drawing.Point(0, 417);
             this.emptySpaceItem1.MaxSize = new System.Drawing.Size(200, 0);
             this.emptySpaceItem1.MinSize = new System.Drawing.Size(200, 10);
             this.emptySpaceItem1.Name = "emptySpaceItem1";
             this.emptySpaceItem1.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 12, 2, 2);
-            this.emptySpaceItem1.Size = new System.Drawing.Size(200, 119);
+            this.emptySpaceItem1.Size = new System.Drawing.Size(200, 91);
             this.emptySpaceItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
             // 
@@ -476,19 +469,19 @@
             // 
             this.layoutControlGroup2.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
             this.layoutControlItem6});
-            this.layoutControlGroup2.Location = new System.Drawing.Point(200, 0);
+            this.layoutControlGroup2.Location = new System.Drawing.Point(206, 0);
             this.layoutControlGroup2.Name = "layoutControlGroup2";
             this.layoutControlGroup2.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0);
-            this.layoutControlGroup2.Size = new System.Drawing.Size(704, 490);
+            this.layoutControlGroup2.Size = new System.Drawing.Size(722, 538);
             this.layoutControlGroup2.Text = "日志信息";
             // 
             // layoutControlItem6
             // 
-            this.layoutControlItem6.Control = this.gcLog1;
+            this.layoutControlItem6.Control = this.gcLog;
             this.layoutControlItem6.Location = new System.Drawing.Point(0, 0);
             this.layoutControlItem6.Name = "layoutControlItem6";
             this.layoutControlItem6.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0);
-            this.layoutControlItem6.Size = new System.Drawing.Size(698, 463);
+            this.layoutControlItem6.Size = new System.Drawing.Size(716, 511);
             this.layoutControlItem6.TextSize = new System.Drawing.Size(0, 0);
             this.layoutControlItem6.TextVisible = false;
             // 
@@ -497,7 +490,7 @@
             this.layoutControlItem13.Control = this.btnOpenDir;
             this.layoutControlItem13.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
             this.layoutControlItem13.CustomizationFormText = "layoutControlItem5";
-            this.layoutControlItem13.Location = new System.Drawing.Point(0, 325);
+            this.layoutControlItem13.Location = new System.Drawing.Point(0, 371);
             this.layoutControlItem13.MaxSize = new System.Drawing.Size(200, 46);
             this.layoutControlItem13.MinSize = new System.Drawing.Size(200, 46);
             this.layoutControlItem13.Name = "layoutControlItem13";
@@ -514,17 +507,17 @@
             this.layoutControlItem14.Location = new System.Drawing.Point(0, 194);
             this.layoutControlItem14.Name = "layoutControlItem14";
             this.layoutControlItem14.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 12, 2);
-            this.layoutControlItem14.Size = new System.Drawing.Size(100, 34);
+            this.layoutControlItem14.Size = new System.Drawing.Size(75, 34);
             this.layoutControlItem14.TextSize = new System.Drawing.Size(0, 0);
             this.layoutControlItem14.TextVisible = false;
             // 
             // layoutControlItem15
             // 
             this.layoutControlItem15.Control = this.txtBackupAll;
-            this.layoutControlItem15.Location = new System.Drawing.Point(100, 194);
+            this.layoutControlItem15.Location = new System.Drawing.Point(75, 194);
             this.layoutControlItem15.Name = "layoutControlItem15";
             this.layoutControlItem15.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 12, 2);
-            this.layoutControlItem15.Size = new System.Drawing.Size(100, 34);
+            this.layoutControlItem15.Size = new System.Drawing.Size(125, 34);
             this.layoutControlItem15.TextSize = new System.Drawing.Size(0, 0);
             this.layoutControlItem15.TextVisible = false;
             // 
@@ -537,7 +530,7 @@
             this.itemAllFile.Size = new System.Drawing.Size(200, 51);
             this.itemAllFile.Text = "全量文件";
             this.itemAllFile.TextLocation = DevExpress.Utils.Locations.Top;
-            this.itemAllFile.TextSize = new System.Drawing.Size(122, 14);
+            this.itemAllFile.TextSize = new System.Drawing.Size(91, 14);
             // 
             // layoutControlGroup3
             // 
@@ -547,13 +540,15 @@
             this.layoutControlItem9,
             this.layoutControlItem10,
             this.layoutControlItem11,
-            this.layoutControlGroup4,
             this.itemAllFile1,
-            this.layoutControlItem16});
+            this.layoutControlItem16,
+            this.layoutControlItem12});
             this.layoutControlGroup3.Location = new System.Drawing.Point(0, 0);
             this.layoutControlGroup3.Name = "layoutControlGroup3";
-            this.layoutControlGroup3.Size = new System.Drawing.Size(904, 490);
-            this.layoutControlGroup3.Text = "          还原              ";
+            this.layoutControlGroup3.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0);
+            this.layoutControlGroup3.Size = new System.Drawing.Size(200, 508);
+            this.layoutControlGroup3.Spacing = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0);
+            this.layoutControlGroup3.Text = "  还原  ";
             // 
             // layoutControlItem7
             // 
@@ -569,7 +564,7 @@
             this.layoutControlItem7.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem7.Text = "数据库地址";
             this.layoutControlItem7.TextLocation = DevExpress.Utils.Locations.Top;
-            this.layoutControlItem7.TextSize = new System.Drawing.Size(122, 14);
+            this.layoutControlItem7.TextSize = new System.Drawing.Size(91, 14);
             // 
             // layoutControlItem8
             // 
@@ -585,7 +580,7 @@
             this.layoutControlItem8.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem8.Text = "用户名";
             this.layoutControlItem8.TextLocation = DevExpress.Utils.Locations.Top;
-            this.layoutControlItem8.TextSize = new System.Drawing.Size(122, 14);
+            this.layoutControlItem8.TextSize = new System.Drawing.Size(91, 14);
             // 
             // layoutControlItem9
             // 
@@ -601,7 +596,7 @@
             this.layoutControlItem9.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem9.Text = "密码";
             this.layoutControlItem9.TextLocation = DevExpress.Utils.Locations.Top;
-            this.layoutControlItem9.TextSize = new System.Drawing.Size(122, 14);
+            this.layoutControlItem9.TextSize = new System.Drawing.Size(91, 14);
             // 
             // layoutControlItem10
             // 
@@ -617,47 +612,24 @@
             this.layoutControlItem10.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem10.Text = "服务名";
             this.layoutControlItem10.TextLocation = DevExpress.Utils.Locations.Top;
-            this.layoutControlItem10.TextSize = new System.Drawing.Size(122, 14);
+            this.layoutControlItem10.TextSize = new System.Drawing.Size(91, 14);
             // 
             // layoutControlItem11
             // 
             this.layoutControlItem11.Control = this.btnRestore;
             this.layoutControlItem11.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
             this.layoutControlItem11.CustomizationFormText = "layoutControlItem5";
-            this.layoutControlItem11.Location = new System.Drawing.Point(0, 296);
+            this.layoutControlItem11.Location = new System.Drawing.Point(0, 342);
             this.layoutControlItem11.MaxSize = new System.Drawing.Size(200, 46);
             this.layoutControlItem11.MinSize = new System.Drawing.Size(200, 46);
             this.layoutControlItem11.Name = "layoutControlItem11";
             this.layoutControlItem11.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 12, 22, 2);
-            this.layoutControlItem11.Size = new System.Drawing.Size(200, 194);
+            this.layoutControlItem11.Size = new System.Drawing.Size(200, 166);
             this.layoutControlItem11.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem11.Text = "layoutControlItem5";
             this.layoutControlItem11.TextSize = new System.Drawing.Size(0, 0);
             this.layoutControlItem11.TextVisible = false;
             // 
-            // layoutControlGroup4
-            // 
-            this.layoutControlGroup4.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
-            this.layoutControlItem12});
-            this.layoutControlGroup4.Location = new System.Drawing.Point(200, 0);
-            this.layoutControlGroup4.Name = "layoutControlGroup4";
-            this.layoutControlGroup4.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0);
-            this.layoutControlGroup4.Size = new System.Drawing.Size(704, 490);
-            this.layoutControlGroup4.Text = "日志信息";
-            // 
-            // layoutControlItem12
-            // 
-            this.layoutControlItem12.Control = this.gcLog2;
-            this.layoutControlItem12.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
-            this.layoutControlItem12.CustomizationFormText = "layoutControlItem6";
-            this.layoutControlItem12.Location = new System.Drawing.Point(0, 0);
-            this.layoutControlItem12.Name = "layoutControlItem12";
-            this.layoutControlItem12.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0);
-            this.layoutControlItem12.Size = new System.Drawing.Size(698, 463);
-            this.layoutControlItem12.Text = "layoutControlItem6";
-            this.layoutControlItem12.TextSize = new System.Drawing.Size(0, 0);
-            this.layoutControlItem12.TextVisible = false;
-            // 
             // itemAllFile1
             // 
             this.itemAllFile1.Control = this.txtDataFile;
@@ -669,7 +641,7 @@
             this.itemAllFile1.Size = new System.Drawing.Size(200, 51);
             this.itemAllFile1.Text = "数据文件";
             this.itemAllFile1.TextLocation = DevExpress.Utils.Locations.Top;
-            this.itemAllFile1.TextSize = new System.Drawing.Size(122, 14);
+            this.itemAllFile1.TextSize = new System.Drawing.Size(91, 14);
             // 
             // layoutControlItem16
             // 
@@ -685,24 +657,102 @@
             this.layoutControlItem16.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem16.Text = "SYS账户密码";
             this.layoutControlItem16.TextLocation = DevExpress.Utils.Locations.Top;
-            this.layoutControlItem16.TextSize = new System.Drawing.Size(122, 14);
+            this.layoutControlItem16.TextSize = new System.Drawing.Size(91, 14);
             // 
             // layoutControlGroup5
             // 
             this.layoutControlGroup5.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
-            this.simpleLabelItem1});
+            this.simpleLabelItem2,
+            this.simpleLabelItem3,
+            this.emptySpaceItem2});
             this.layoutControlGroup5.Location = new System.Drawing.Point(0, 0);
             this.layoutControlGroup5.Name = "layoutControlGroup5";
-            this.layoutControlGroup5.Size = new System.Drawing.Size(904, 490);
-            this.layoutControlGroup5.Text = "自定义备份计划";
+            this.layoutControlGroup5.Size = new System.Drawing.Size(200, 508);
+            this.layoutControlGroup5.Text = "  计划  ";
+            // 
+            // btnConnectTest1
+            // 
+            this.btnConnectTest1.Location = new System.Drawing.Point(15, 338);
+            this.btnConnectTest1.Name = "btnConnectTest1";
+            this.btnConnectTest1.Size = new System.Drawing.Size(186, 22);
+            this.btnConnectTest1.StyleController = this.layoutControl1;
+            this.btnConnectTest1.TabIndex = 9;
+            this.btnConnectTest1.Text = "测试连接";
+            this.btnConnectTest1.Click += new System.EventHandler(this.btnConnectTest1_Click);
+            // 
+            // layoutControlItem17
+            // 
+            this.layoutControlItem17.Control = this.btnConnectTest1;
+            this.layoutControlItem17.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
+            this.layoutControlItem17.CustomizationFormText = "layoutControlItem5";
+            this.layoutControlItem17.Location = new System.Drawing.Point(0, 279);
+            this.layoutControlItem17.MaxSize = new System.Drawing.Size(200, 46);
+            this.layoutControlItem17.MinSize = new System.Drawing.Size(200, 46);
+            this.layoutControlItem17.Name = "layoutControlItem17";
+            this.layoutControlItem17.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 12, 22, 2);
+            this.layoutControlItem17.Size = new System.Drawing.Size(200, 46);
+            this.layoutControlItem17.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
+            this.layoutControlItem17.Text = "layoutControlItem5";
+            this.layoutControlItem17.TextSize = new System.Drawing.Size(0, 0);
+            this.layoutControlItem17.TextVisible = false;
+            // 
+            // simpleLabelItem2
+            // 
+            this.simpleLabelItem2.AllowHotTrack = false;
+            this.simpleLabelItem2.AppearanceItemCaption.ForeColor = System.Drawing.Color.Red;
+            this.simpleLabelItem2.AppearanceItemCaption.Options.UseForeColor = true;
+            this.simpleLabelItem2.Location = new System.Drawing.Point(0, 0);
+            this.simpleLabelItem2.Name = "simpleLabelItem2";
+            this.simpleLabelItem2.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 100, 2);
+            this.simpleLabelItem2.Size = new System.Drawing.Size(200, 116);
+            this.simpleLabelItem2.Text = "每月1号全量备份";
+            this.simpleLabelItem2.TextSize = new System.Drawing.Size(91, 14);
+            // 
+            // simpleLabelItem3
+            // 
+            this.simpleLabelItem3.AllowHotTrack = false;
+            this.simpleLabelItem3.AppearanceItemCaption.ForeColor = System.Drawing.Color.LimeGreen;
+            this.simpleLabelItem3.AppearanceItemCaption.Options.UseForeColor = true;
+            this.simpleLabelItem3.Location = new System.Drawing.Point(0, 116);
+            this.simpleLabelItem3.Name = "simpleLabelItem3";
+            this.simpleLabelItem3.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 100, 2);
+            this.simpleLabelItem3.Size = new System.Drawing.Size(200, 116);
+            this.simpleLabelItem3.Text = "每周1增量备份";
+            this.simpleLabelItem3.TextSize = new System.Drawing.Size(91, 14);
+            // 
+            // emptySpaceItem2
+            // 
+            this.emptySpaceItem2.AllowHotTrack = false;
+            this.emptySpaceItem2.Location = new System.Drawing.Point(0, 232);
+            this.emptySpaceItem2.Name = "emptySpaceItem2";
+            this.emptySpaceItem2.Size = new System.Drawing.Size(200, 276);
+            this.emptySpaceItem2.TextSize = new System.Drawing.Size(0, 0);
+            // 
+            // btnConnectTest2
+            // 
+            this.btnConnectTest2.Location = new System.Drawing.Point(15, 355);
+            this.btnConnectTest2.Name = "btnConnectTest2";
+            this.btnConnectTest2.Size = new System.Drawing.Size(186, 22);
+            this.btnConnectTest2.StyleController = this.layoutControl1;
+            this.btnConnectTest2.TabIndex = 9;
+            this.btnConnectTest2.Text = "测试连接";
+            this.btnConnectTest2.Click += new System.EventHandler(this.btnConnectTest2_Click);
             // 
-            // simpleLabelItem1
+            // layoutControlItem12
             // 
-            this.simpleLabelItem1.AllowHotTrack = false;
-            this.simpleLabelItem1.Location = new System.Drawing.Point(0, 0);
-            this.simpleLabelItem1.Name = "simpleLabelItem1";
-            this.simpleLabelItem1.Size = new System.Drawing.Size(904, 490);
-            this.simpleLabelItem1.TextSize = new System.Drawing.Size(122, 14);
+            this.layoutControlItem12.Control = this.btnConnectTest2;
+            this.layoutControlItem12.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
+            this.layoutControlItem12.CustomizationFormText = "layoutControlItem5";
+            this.layoutControlItem12.Location = new System.Drawing.Point(0, 296);
+            this.layoutControlItem12.MaxSize = new System.Drawing.Size(200, 46);
+            this.layoutControlItem12.MinSize = new System.Drawing.Size(200, 46);
+            this.layoutControlItem12.Name = "layoutControlItem12";
+            this.layoutControlItem12.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 12, 22, 2);
+            this.layoutControlItem12.Size = new System.Drawing.Size(200, 46);
+            this.layoutControlItem12.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
+            this.layoutControlItem12.Text = "layoutControlItem5";
+            this.layoutControlItem12.TextSize = new System.Drawing.Size(0, 0);
+            this.layoutControlItem12.TextVisible = false;
             // 
             // Form1
             // 
@@ -720,8 +770,8 @@
             ((System.ComponentModel.ISupportInitialize)(this.txtAllFile.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtBackupAll.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtBackupIncrement.Properties)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.gcLog1)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.gvLog1)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.gcLog)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.gvLog)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtService.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtPwd.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtUser.Properties)).EndInit();
@@ -730,8 +780,6 @@
             ((System.ComponentModel.ISupportInitialize)(this.txtUser2.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtPwd2.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtService2.Properties)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.gcLog2)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.gvLog2)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtDataFile.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtSysPwd.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit();
@@ -755,12 +803,14 @@
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup4)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.itemAllFile1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem16)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup5)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.simpleLabelItem1)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem17)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.simpleLabelItem2)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.simpleLabelItem3)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).EndInit();
             this.ResumeLayout(false);
 
         }
@@ -773,8 +823,8 @@
         private DevExpress.XtraEditors.TextEdit txtPwd;
         private DevExpress.XtraEditors.TextEdit txtUser;
         private DevExpress.XtraEditors.TextEdit txtService;
-        private DevExpress.XtraGrid.GridControl gcLog1;
-        private DevExpress.XtraGrid.Views.Grid.GridView gvLog1;
+        private DevExpress.XtraGrid.GridControl gcLog;
+        private DevExpress.XtraGrid.Views.Grid.GridView gvLog;
         private DevExpress.XtraEditors.SimpleButton btnBackup;
         private DevExpress.XtraLayout.TabbedControlGroup tabbedControlGroup1;
         private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1;
@@ -797,12 +847,7 @@
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem10;
         private DevExpress.XtraEditors.SimpleButton btnRestore;
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem11;
-        private DevExpress.XtraGrid.GridControl gcLog2;
-        private DevExpress.XtraGrid.Views.Grid.GridView gvLog2;
-        private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup4;
-        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem12;
         private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup5;
-        private DevExpress.XtraLayout.SimpleLabelItem simpleLabelItem1;
         private DevExpress.XtraEditors.SimpleButton btnOpenDir;
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem13;
         private DevExpress.XtraEditors.CheckEdit txtBackupAll;
@@ -815,6 +860,13 @@
         private DevExpress.XtraLayout.LayoutControlItem itemAllFile1;
         private DevExpress.XtraEditors.TextEdit txtSysPwd;
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem16;
+        private DevExpress.XtraEditors.SimpleButton btnConnectTest1;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem17;
+        private DevExpress.XtraLayout.SimpleLabelItem simpleLabelItem2;
+        private DevExpress.XtraLayout.SimpleLabelItem simpleLabelItem3;
+        private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem2;
+        private DevExpress.XtraEditors.SimpleButton btnConnectTest2;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem12;
     }
 }
 

+ 68 - 36
DbBackup/Form1.cs

@@ -1,7 +1,6 @@
 using DbBackup.ViewModel;
 using DevExpress.XtraEditors;
 using Oracle11;
-using SevenZip;
 using System;
 using System.Collections.Generic;
 using System.ComponentModel;
@@ -24,15 +23,9 @@ namespace DbBackup
         {
             InitializeComponent();
             tabbedControlGroup1.SelectedTabPageIndex = 0;
-            gcLog1.UseDefault(logData1).UseClear<LogInfo>().UseRowNumber().SetLogImageColumn(nameof(LogInfo.LogType), typeof(EnumLogType));
-            gcLog2.UseDefault(logData2).UseClear<LogInfo>().UseRowNumber().SetLogImageColumn(nameof(LogInfo.LogType), typeof(EnumLogType));
-            logData1.Add(new LogInfo()
-            {
-                LogContent = "123",
-                LogType = EnumLogType.Error
-            });
-            gvLog1.Columns[nameof(LogInfo.LogType)].MaxWidth = 100;
-            gvLog1.Columns[nameof(LogInfo.LogTime)].MaxWidth = 150;
+            gcLog.UseDefault(logData1).UseClear<LogInfo>().UseRowNumber().SetLogImageColumn(nameof(LogInfo.LogType), typeof(EnumLogType));
+            gvLog.Columns[nameof(ViewModel.LogInfo.LogType)].MaxWidth = 100;
+            gvLog.Columns[nameof(ViewModel.LogInfo.LogTime)].MaxWidth = 150;
         }
 
         private void Form1_Load(object sender, EventArgs e)
@@ -60,13 +53,14 @@ namespace DbBackup
                   {
                       try
                       {
-
+                          Info("开始全量备份...");
                           var zipFile = DbHelper.BackupDb(dbAddr, user, pwd, service);//全量备份
-                          LogInfo1($"全量备份完成,文件={zipFile}");
+                          Info($"全量备份完成,文件={zipFile}");
                       }
                       catch (Exception ex)
                       {
-                          LogErr1("全量备份出错", ex);
+                          Err("全量备份出错", ex);
+                          ClearNoneZipFile();
                       }
                   }
                   else
@@ -74,12 +68,14 @@ namespace DbBackup
                       try
                       {
                           var allFile = txtAllFile.Text.Trim();
+                          Info("开始增量备份...");
                           var zipFile = DbHelper.BackupIncrementDb(allFile, dbAddr, user, pwd, service);//增量备份
-                          LogInfo1($"增量备份完成,文件={zipFile}");
+                          Info($"增量备份完成,文件={zipFile}");
                       }
                       catch (Exception ex)
                       {
-                          LogErr1("增量备份出错", ex);
+                          Err("增量备份出错", ex);
+                          ClearNoneZipFile();
                       }
                   }
               });
@@ -105,15 +101,21 @@ namespace DbBackup
                      string service = txtService2.Text.Trim();
                      file = txtDataFile.Text.Trim();
                      var fileName = Path.GetFileNameWithoutExtension(file);
+                     Info($"开始还原文件{file}...");
                      if (fileName.Contains("Increment"))
+                     {
                          DbHelper.RestoreIncrementDb(file, dbAddr, user, pwd, service);//还原增量文件
+                     }
                      else
+                     {
                          DbHelper.RestoreDb(file, dbAddr, user, pwd, sysPwd, service);//还原全量文件
-                     LogInfo2($"文件{file}还原完成");
+                     }
+                     Info($"文件{file}还原完成");
                  }
                  catch (Exception ex)
                  {
-                     LogErr2($"文件{file}还原失败", ex);
+                     Err($"文件{file}还原失败", ex);
+                     ClearNoneZipFile();
                  }
              });
             btnBackup.Enabled = true;
@@ -156,43 +158,73 @@ namespace DbBackup
                 ctrl.Text = openFileDialog.FileName;
             }
         }
-        private void LogInfo1(string msg)
+        private void Info(string msg)
         {
             Serilog.Log.Information(msg);
             this.Invoke(new Action(() =>
             {
                 this.logData1.Insert(0, new LogInfo() { LogType = EnumLogType.Info, LogContent = msg });
-                gvLog1.RefreshData();
+                gvLog.RefreshData();
             }));
         }
-        private void LogInfo2(string msg)
+        private void Err(string msg, Exception ex = null)
         {
-            Serilog.Log.Information(msg);
+            Serilog.Log.Error(ex, msg);
             this.Invoke(new Action(() =>
             {
-                this.logData2.Insert(0, new LogInfo() { LogType = EnumLogType.Info, LogContent = msg });
-                gvLog2.RefreshData();
+                this.logData1.Insert(0, new LogInfo() { LogType = EnumLogType.Error, LogContent = msg });
+                gvLog.RefreshData();
             }));
-
         }
-        private void LogErr1(string msg, Exception ex = null)
+
+        private void btnConnectTest1_Click(object sender, EventArgs e)
         {
-            Serilog.Log.Error(ex, msg);
-            this.Invoke(new Action(() =>
+            try
             {
-                this.logData1.Insert(0, new LogInfo() { LogType = EnumLogType.Error, LogContent = msg });
-                gvLog1.RefreshData();
-            }));
+                string dbAddr = txtDbAddr.Text.Trim();
+                string user = txtUser.Text.Trim();
+                string pwd = txtPwd.Text.Trim();
+                string service = txtService.Text.Trim();
+                DbHelper.TestConnection(dbAddr, user, pwd, service);
+                Info("数据库连接测试成功");
+            }
+            catch (Exception ex)
+            {
+                Err("数据库连接测试失败!", ex);
+            }
         }
-        private void LogErr2(string msg, Exception ex = null)
+
+        private void btnConnectTest2_Click(object sender, EventArgs e)
         {
-            Serilog.Log.Error(ex, msg);
-            this.Invoke(new Action(() =>
+            try
             {
-                this.logData2.Insert(0, new LogInfo() { LogType = EnumLogType.Error, LogContent = msg });
-                gvLog2.RefreshData();
-            }));
+                string dbAddr = txtDbAddr2.Text.Trim();
+                string sysPwd = txtSysPwd.Text.Trim();
+                string service = txtService2.Text.Trim();
+                DbHelper.TestSysConnection(dbAddr, sysPwd, service);
+                Info("数据库连接测试成功");
+            }
+            catch (Exception ex)
+            {
+                Err("数据库连接测试失败!", ex);
+            }
+        }
 
+        private void ClearNoneZipFile()
+        {
+            var files=Directory.GetFiles("Backup");
+            foreach (var item in files)
+            {
+                if (!item.ToUpper().EndsWith("7Z"))
+                {
+                    try
+                    {
+                        File.Delete(item);
+                    }
+                    catch
+                    { }
+                }
+            }
         }
     }
 }

+ 233 - 154
Oracle11/DbHelper.cs

@@ -18,6 +18,7 @@ namespace Oracle11
     /// </summary>
     public static class DbHelper
     {
+        #region 备份及还原
         /// <summary>
         /// 全量备份(返回一个7z压缩文件)
         /// </summary>
@@ -71,7 +72,7 @@ namespace Oracle11
                     .Replace($"ALTER TRIGGER {item.Key} ENABLE", "").Trim().Trim("\n".ToCharArray());
                 sqls.Add($"-- ----------------------------\r\n-- 创建触发器{item.Key}\r\n-- ----------------------------\r\n{sql}");
             }
-            File.WriteAllText("Backup\\triggers.sql", $"{string.Join("\r\n/\r\n", sqls)};");
+            File.WriteAllText("Backup\\triggers.sql", $"{string.Join("\r\n/\r\n", sqls)}");
             sqls.Clear();
 
             var indexs = GetAllIndexSql(dbAddr, user, pwd, serviceName);
@@ -416,93 +417,108 @@ namespace Oracle11
                 OracleHelper.ExecuteNonQuery(connString, item);
             }
             DisableAllFk(dbAddr, connString, pwd, serviceName);//导入数据前禁用所有外键约束
+            DisableAllTrigger(dbAddr, connString, pwd, serviceName);//导入数据前禁用所有触发器
             var datFiles = Directory.GetFiles(dir, "*.dat");
             foreach (var item in datFiles)
             {
-                string tableName = Path.GetFileNameWithoutExtension(item);
-                using (BinaryReader br = new BinaryReader(new FileStream(item, FileMode.Open), Encoding.UTF8))
+                var con = new OracleConnection(connString);
+                con.Open();
+                var trans = con.BeginTransaction();
+                try
                 {
-                    if (br.BaseStream.Position >= br.BaseStream.Length) continue;
-                    int columnCount = br.ReadInt32();
-
-                    while (br.BaseStream.Position < br.BaseStream.Length)
+                    string tableName = Path.GetFileNameWithoutExtension(item);
+                    using (BinaryReader br = new BinaryReader(new FileStream(item, FileMode.Open), Encoding.UTF8))
                     {
-                        StringBuilder sb = new StringBuilder();
-                        sb.Append($"insert into {tableName} values(");
-                        OracleParameter[] parameters = new OracleParameter[columnCount];
-                        for (int i = 0; i < columnCount; i++)
+                        if (br.BaseStream.Position >= br.BaseStream.Length) continue;
+                        int columnCount = br.ReadInt32();
+
+                        while (br.BaseStream.Position < br.BaseStream.Length)
                         {
-                            parameters[i] = new OracleParameter();
-                            parameters[i].ParameterName = $"val{i}";
-                            if (i != 0)
-                                sb.Append(",");
-                            sb.Append($":val{i}");
-                            var colType = br.ReadByte();
-                            if (colType == 100)//DBNull.Value
-                            {
-                                parameters[i].Value = null;
-                            }
-                            if (colType == 0)//string
-                            {
-                                var val = br.ReadString();
-                                parameters[i].Value = val;
-                            }
-                            else if (colType == 1)//DateTime
-                            {
-                                var val = br.ReadInt64();
-                                var time = DateTime.FromBinary(val);
-                                parameters[i].Value = time;
-                            }
-                            else if (colType == 2)//long
-                            {
-                                var val = br.ReadInt64();
-                                parameters[i].Value = val;
-                            }
-                            else if (colType == 3)//int
-                            {
-                                var val = br.ReadInt32();
-                                parameters[i].Value = val;
-                            }
-                            else if (colType == 4)//short
-                            {
-                                var val = br.ReadInt16();
-                                parameters[i].Value = val;
-                            }
-                            else if (colType == 5)//byte
-                            {
-                                var val = br.ReadByte();
-                                parameters[i].Value = val;
-                            }
-                            else if (colType == 6)//decimal
-                            {
-                                var val = br.ReadDecimal();
-                                parameters[i].Value = val;
-                            }
-                            else if (colType == 7)//float
-                            {
-                                var val = br.ReadSingle();
-                                parameters[i].Value = val;
-                            }
-                            else if (colType == 8)//double
-                            {
-                                var val = br.ReadDouble();
-                                parameters[i].Value = val;
-                            }
-                            else if (colType == 9)//byte[]
+                            StringBuilder sb = new StringBuilder();
+                            sb.Append($"insert into {tableName} values(");
+                            OracleParameter[] parameters = new OracleParameter[columnCount];
+                            for (int i = 0; i < columnCount; i++)
                             {
-                                var len = br.ReadInt32();
-                                var val = br.ReadBytes(len);
-                                parameters[i].Value = val;
+                                parameters[i] = new OracleParameter();
+                                parameters[i].ParameterName = $"val{i}";
+                                if (i != 0)
+                                    sb.Append(",");
+                                sb.Append($":val{i}");
+                                var colType = br.ReadByte();
+                                if (colType == 100)//DBNull.Value
+                                {
+                                    parameters[i].Value = null;
+                                }
+                                if (colType == 0)//string
+                                {
+                                    var val = br.ReadString();
+                                    parameters[i].Value = val;
+                                }
+                                else if (colType == 1)//DateTime
+                                {
+                                    var val = br.ReadInt64();
+                                    var time = DateTime.FromBinary(val);
+                                    parameters[i].Value = time;
+                                }
+                                else if (colType == 2)//long
+                                {
+                                    var val = br.ReadInt64();
+                                    parameters[i].Value = val;
+                                }
+                                else if (colType == 3)//int
+                                {
+                                    var val = br.ReadInt32();
+                                    parameters[i].Value = val;
+                                }
+                                else if (colType == 4)//short
+                                {
+                                    var val = br.ReadInt16();
+                                    parameters[i].Value = val;
+                                }
+                                else if (colType == 5)//byte
+                                {
+                                    var val = br.ReadByte();
+                                    parameters[i].Value = val;
+                                }
+                                else if (colType == 6)//decimal
+                                {
+                                    var val = br.ReadDecimal();
+                                    parameters[i].Value = val;
+                                }
+                                else if (colType == 7)//float
+                                {
+                                    var val = br.ReadSingle();
+                                    parameters[i].Value = val;
+                                }
+                                else if (colType == 8)//double
+                                {
+                                    var val = br.ReadDouble();
+                                    parameters[i].Value = val;
+                                }
+                                else if (colType == 9)//byte[]
+                                {
+                                    var len = br.ReadInt32();
+                                    var val = br.ReadBytes(len);
+                                    parameters[i].Value = val;
+                                }
                             }
+                            sb.Append(")");
+                            var insertSql = sb.ToString();
+                            OracleHelper.BatchInsert(con, trans, insertSql, parameters);
+                            //OracleHelper.ExecuteNonQuery(connString, insertSql, parameters);
                         }
-                        sb.Append(")");
-                        var insertSql = sb.ToString();
-                        OracleHelper.ExecuteNonQuery(connString, insertSql, parameters);
                     }
+                    trans.Commit();
+                    con.Dispose();
+                }
+                catch (Exception ex)
+                {
+                    trans.Rollback();
+                    throw;
                 }
             }
             EnableAllFk(dbAddr, connString, pwd, serviceName);//导入数据后启用所有外键约束
-
+            EnableAllTrigger(dbAddr, connString, pwd, serviceName);//导入数据后启用所有触发器
             var delFile = Directory.GetFiles(dir);
             foreach (var item in delFile)
             {
@@ -511,7 +527,6 @@ namespace Oracle11
                     File.Delete(item);
                 }
             }
-
         }
 
         /// <summary>
@@ -551,85 +566,100 @@ namespace Oracle11
                 var maxObj = OracleHelper.ExecuteScalar(connString, maxSql);
                 if (maxObj != DBNull.Value && Convert.ToInt64(maxObj) >= Convert.ToInt64(tupItem.Item3))
                     continue;//数据已存在,不要重复导入
-                using (BinaryReader br = new BinaryReader(new FileStream(item, FileMode.Open), Encoding.UTF8))
-                {
-                    if (br.BaseStream.Position >= br.BaseStream.Length) continue;
-                    int columnCount = br.ReadInt32();
 
-                    while (br.BaseStream.Position < br.BaseStream.Length)
+                var con = new OracleConnection(connString);
+                con.Open();
+                var trans = con.BeginTransaction();
+                try
+                {
+                    using (BinaryReader br = new BinaryReader(new FileStream(item, FileMode.Open), Encoding.UTF8))
                     {
-                        StringBuilder sb = new StringBuilder();
-                        sb.Append($"insert into {tableName} values(");
-                        OracleParameter[] parameters = new OracleParameter[columnCount];
-                        for (int i = 0; i < columnCount; i++)
+                        if (br.BaseStream.Position >= br.BaseStream.Length) continue;
+                        int columnCount = br.ReadInt32();
+
+                        while (br.BaseStream.Position < br.BaseStream.Length)
                         {
-                            parameters[i] = new OracleParameter();
-                            parameters[i].ParameterName = $"val{i}";
-                            if (i != 0)
-                                sb.Append(",");
-                            sb.Append($":val{i}");
-                            var colType = br.ReadByte();
-                            if (colType == 100)//DBNull.Value
-                            {
-                                parameters[i].Value = null;
-                            }
-                            if (colType == 0)//string
-                            {
-                                var val = br.ReadString();
-                                parameters[i].Value = val;
-                            }
-                            else if (colType == 1)//DateTime
-                            {
-                                var val = br.ReadInt64();
-                                var time = DateTime.FromBinary(val);
-                                parameters[i].Value = time;
-                            }
-                            else if (colType == 2)//long
-                            {
-                                var val = br.ReadInt64();
-                                parameters[i].Value = val;
-                            }
-                            else if (colType == 3)//int
-                            {
-                                var val = br.ReadInt32();
-                                parameters[i].Value = val;
-                            }
-                            else if (colType == 4)//short
-                            {
-                                var val = br.ReadInt16();
-                                parameters[i].Value = val;
-                            }
-                            else if (colType == 5)//byte
-                            {
-                                var val = br.ReadByte();
-                                parameters[i].Value = val;
-                            }
-                            else if (colType == 6)//decimal
-                            {
-                                var val = br.ReadDecimal();
-                                parameters[i].Value = val;
-                            }
-                            else if (colType == 7)//float
+                            StringBuilder sb = new StringBuilder();
+                            sb.Append($"insert into {tableName} values(");
+                            OracleParameter[] parameters = new OracleParameter[columnCount];
+                            for (int i = 0; i < columnCount; i++)
                             {
-                                var val = br.ReadSingle();
-                                parameters[i].Value = val;
-                            }
-                            else if (colType == 8)//double
-                            {
-                                var val = br.ReadDouble();
-                                parameters[i].Value = val;
-                            }
-                            else if (colType == 9)//byte[]
-                            {
-                                var len = br.ReadInt32();
-                                var val = br.ReadBytes(len);
-                                parameters[i].Value = val;
+                                parameters[i] = new OracleParameter();
+                                parameters[i].ParameterName = $"val{i}";
+                                if (i != 0)
+                                    sb.Append(",");
+                                sb.Append($":val{i}");
+                                var colType = br.ReadByte();
+                                if (colType == 100)//DBNull.Value
+                                {
+                                    parameters[i].Value = null;
+                                }
+                                if (colType == 0)//string
+                                {
+                                    var val = br.ReadString();
+                                    parameters[i].Value = val;
+                                }
+                                else if (colType == 1)//DateTime
+                                {
+                                    var val = br.ReadInt64();
+                                    var time = DateTime.FromBinary(val);
+                                    parameters[i].Value = time;
+                                }
+                                else if (colType == 2)//long
+                                {
+                                    var val = br.ReadInt64();
+                                    parameters[i].Value = val;
+                                }
+                                else if (colType == 3)//int
+                                {
+                                    var val = br.ReadInt32();
+                                    parameters[i].Value = val;
+                                }
+                                else if (colType == 4)//short
+                                {
+                                    var val = br.ReadInt16();
+                                    parameters[i].Value = val;
+                                }
+                                else if (colType == 5)//byte
+                                {
+                                    var val = br.ReadByte();
+                                    parameters[i].Value = val;
+                                }
+                                else if (colType == 6)//decimal
+                                {
+                                    var val = br.ReadDecimal();
+                                    parameters[i].Value = val;
+                                }
+                                else if (colType == 7)//float
+                                {
+                                    var val = br.ReadSingle();
+                                    parameters[i].Value = val;
+                                }
+                                else if (colType == 8)//double
+                                {
+                                    var val = br.ReadDouble();
+                                    parameters[i].Value = val;
+                                }
+                                else if (colType == 9)//byte[]
+                                {
+                                    var len = br.ReadInt32();
+                                    var val = br.ReadBytes(len);
+                                    parameters[i].Value = val;
+                                }
                             }
+                            sb.Append(")");
+                            var insertSql = sb.ToString();
+                            OracleHelper.BatchInsert(con, trans, insertSql, parameters);
+                            //OracleHelper.ExecuteNonQuery(connString, insertSql, parameters);
                         }
-                        sb.Append(")");
-                        var insertSql = sb.ToString();
-                        OracleHelper.ExecuteNonQuery(connString, insertSql, parameters);
                     }
+                    trans.Commit();
+                    con.Dispose();
+                }
+                catch
+                {
+                    trans.Rollback();
+                    throw;
                 }
             }
             EnableAllFk(dbAddr, connString, pwd, serviceName);//导入数据后启用所有外键约束
@@ -644,6 +674,37 @@ namespace Oracle11
             }
 
         }
+        #endregion
+
+        #region 数据库连接测试
+        /// <summary>
+        /// 测试数据库连接
+        /// </summary>
+        /// <param name="oracleAddr">oracle地址(127.0.0.1:1521)</param>
+        /// <param name="user">用户名(不区分大小写)</param>
+        /// <param name="pwd">密码</param>
+        /// <param name="serviceName">服务名称(orcl)</param>
+        public static void TestConnection(string dbAddr, string user, string pwd, string serviceName = "orcl")
+        {
+            Directory.CreateDirectory("Backup");
+            user = user.ToUpper();
+            string connString = $"Data Source={dbAddr}/{serviceName}; User Id={user}; Password={pwd};";
+            OracleHelper.TestConnection(connString);
+        }
+
+        /// <summary>
+        /// 测试数据库连接
+        /// </summary>
+        /// <param name="oracleAddr">oracle地址(127.0.0.1:1521)</param>
+        /// <param name="sysPwd">SYS账户密码</param>
+        /// <param name="serviceName">服务名称(orcl)</param>
+        public static void TestSysConnection(string dbAddr, string sysPwd, string serviceName = "orcl")
+        {
+            Directory.CreateDirectory("Backup");
+            string connString = $"Data Source={dbAddr}/orcl; User Id=SYS; Password={sysPwd};DBA Privilege=SYSDBA;";
+            OracleHelper.TestConnection(connString);
+        }
+        #endregion
 
         #region private function
         //创建用户并授权
@@ -720,19 +781,37 @@ namespace Oracle11
             string connString = $"Data Source={dbAddr}/{serviceName}; User Id={user}; Password={pwd};";
             string sql = "select 'alter table '||table_name||' enable constraint '||constraint_name from user_constraints where constraint_type='R'";
             var sqls = OracleHelper.ExecuteDataTable(connString, sql).TableToListBcl<string>();
-            foreach (var item in sqls)
-            {
-                OracleHelper.ExecuteNonQuery(connString, item);
-            }
+            sql = string.Join("/", sqls);
+            OracleHelper.ExecuteNonQuery(connString, sql);
         }
 
         //禁用据库所有外键约束
-        private static List<string> DisableAllFk(string dbAddr, string user, string pwd, string serviceName = "orcl")
+        private static void DisableAllFk(string dbAddr, string user, string pwd, string serviceName = "orcl")
         {
             user = user.ToUpper();
             string connString = $"Data Source={dbAddr}/{serviceName}; User Id={user}; Password={pwd};";
             string sql = "select 'alter table '||table_name||' disable constraint '||constraint_name from user_constraints where constraint_type='R'";
-            return OracleHelper.ExecuteDataTable(connString, sql).TableToListBcl<string>();
+            var sqls = OracleHelper.ExecuteDataTable(connString, sql).TableToListBcl<string>();
+            sql = string.Join("/", sqls);
+            OracleHelper.ExecuteNonQuery(connString, sql);
+        }
+
+        //启用据库所有触发器
+        private static void EnableAllTrigger(string dbAddr, string user, string pwd, string serviceName = "orcl")
+        {
+            string connString = $"Data Source={dbAddr}/{serviceName}; User Id={user}; Password={pwd};";
+            var triggers = GetAllTriggerSql(dbAddr, user, pwd, serviceName).Keys.ToList();
+            var sql = string.Join("alter trigger trigger_name enable/", triggers);
+            OracleHelper.ExecuteNonQuery(connString, sql);
+        }
+
+        //禁用据库所有触发器
+        private static void DisableAllTrigger(string dbAddr, string user, string pwd, string serviceName = "orcl")
+        {
+            string connString = $"Data Source={dbAddr}/{serviceName}; User Id={user}; Password={pwd};";
+            var triggers = GetAllTriggerSql(dbAddr, user, pwd, serviceName).Keys.ToList();
+            var sql = string.Join("alter trigger trigger_name disable/", triggers);
+            OracleHelper.ExecuteNonQuery(connString, sql);
         }
 
         //获取表的主键列名(没有主键返回null)

+ 1 - 1
Oracle11/Oracle11.csproj

@@ -87,7 +87,7 @@
     <None Include="packages.config" />
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="..\Zip\SevenZip.csproj">
+    <ProjectReference Include="..\SevenZip\SevenZip.csproj">
       <Project>{1bec4a58-4fc4-4468-9daf-0ccf90d1a576}</Project>
       <Name>SevenZip</Name>
     </ProjectReference>

+ 16 - 0
Oracle11/OracleHelper.cs

@@ -15,6 +15,14 @@ namespace Oracle11
     /// </summary>
     static class OracleHelper
     {
+        public static void TestConnection(string connectionString)
+        {
+            using (OracleConnection con = new OracleConnection(connectionString))
+            {
+                con.Open();
+            }
+        }
+
         /// <summary>  
         /// 执行数据库非查询操作,返回受影响的行数  
         /// </summary>  
@@ -40,6 +48,14 @@ namespace Oracle11
             return val;
         }
 
+        public static void BatchInsert(OracleConnection conn, OracleTransaction trans,string sql, params OracleParameter[] cmdParms)
+        {
+            var cmd = conn.CreateCommand();
+            PrepareCommand(cmd, conn, trans, CommandType.Text, sql, cmdParms);
+            cmd.ExecuteNonQuery();
+            cmd.Parameters.Clear();
+        }
+
         /// <summary>  
         /// 执行数据库查询操作,返回DataTable类型的结果集  
         /// </summary>  

+ 0 - 0
Zip/7z.dll → SevenZip/7z.dll


+ 0 - 0
Zip/7z.exe → SevenZip/7z.exe


+ 0 - 0
Zip/Properties/AssemblyInfo.cs → SevenZip/Properties/AssemblyInfo.cs


+ 0 - 0
Zip/SevenZip.csproj → SevenZip/SevenZip.csproj


+ 0 - 0
Zip/SevenZipUtil.cs → SevenZip/SevenZipUtil.cs