初始化提交

仓库转移到Gitea,初始化提交,可能丢失以前的git版本日志
This commit is contained in:
2025-11-27 16:41:05 +08:00
commit 027d0f8024
663 changed files with 171319 additions and 0 deletions

View File

@@ -0,0 +1,133 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{94C9EAA9-FF26-487C-862E-D49EFEC6501D}</ProjectGuid>
<OutputType>WinExe</OutputType>
<StartupObject>AUTS_Vendor.My.MyApplication</StartupObject>
<RootNamespace>AUTS_Vendor</RootNamespace>
<AssemblyName>AUTS_Vendor</AssemblyName>
<FileAlignment>512</FileAlignment>
<MyType>WindowsForms</MyType>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\Debug\</OutputPath>
<DocumentationFile>AUTS_Vendor.xml</DocumentationFile>
<NoWarn>
</NoWarn>
<WarningsAsErrors>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</WarningsAsErrors>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<DefineDebug>false</DefineDebug>
<DefineTrace>true</DefineTrace>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>AUTS_Vendor.xml</DocumentationFile>
<NoWarn>
</NoWarn>
<WarningsAsErrors>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</WarningsAsErrors>
</PropertyGroup>
<PropertyGroup>
<OptionExplicit>On</OptionExplicit>
</PropertyGroup>
<PropertyGroup>
<OptionCompare>Binary</OptionCompare>
</PropertyGroup>
<PropertyGroup>
<OptionStrict>On</OptionStrict>
</PropertyGroup>
<PropertyGroup>
<OptionInfer>Off</OptionInfer>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
</ItemGroup>
<ItemGroup>
<Import Include="Microsoft.VisualBasic" />
<Import Include="System" />
<Import Include="System.Collections" />
<Import Include="System.Collections.Generic" />
<Import Include="System.Data" />
<Import Include="System.Drawing" />
<Import Include="System.Diagnostics" />
<Import Include="System.Windows.Forms" />
<Import Include="System.Linq" />
<Import Include="System.Xml.Linq" />
<Import Include="System.Threading.Tasks" />
</ItemGroup>
<ItemGroup>
<Compile Include="FrmMain.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmMain.Designer.vb">
<DependentUpon>FrmMain.vb</DependentUpon>
<SubType>Form</SubType>
</Compile>
<Compile Include="My Project\AssemblyInfo.vb" />
<Compile Include="My Project\Application.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Application.myapp</DependentUpon>
</Compile>
<Compile Include="My Project\Resources.Designer.vb">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="My Project\Settings.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="FrmMain.resx">
<DependentUpon>FrmMain.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="My Project\Resources.resx">
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
<CustomToolNamespace>My.Resources</CustomToolNamespace>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="My Project\Application.myapp">
<Generator>MyApplicationCodeGenerator</Generator>
<LastGenOutput>Application.Designer.vb</LastGenOutput>
</None>
<None Include="My Project\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<CustomToolNamespace>My</CustomToolNamespace>
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\UTS_Core\UTS_Core.vbproj">
<Project>{33c6456c-f00d-41ac-a6fb-db0601495c6a}</Project>
<Name>UTS_Core</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
</Project>

26
AUTS_Vendor/App.config Normal file
View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.4.0" newVersion="4.0.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Google.Protobuf" publicKeyToken="a7d26565bac4d604" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.30.1.0" newVersion="3.30.1.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

540
AUTS_Vendor/FrmMain.Designer.vb generated Normal file
View File

@@ -0,0 +1,540 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class FrmMain
Inherits System.Windows.Forms.Form
'Form 重写 Dispose以清理组件列表。
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Windows 窗体设计器所必需的
Private components As System.ComponentModel.IContainer
'注意: 以下过程是 Windows 窗体设计器所必需的
'可以使用 Windows 窗体设计器修改它。
'不要使用代码编辑器修改它。
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
Me.NudRemotePort = New System.Windows.Forms.NumericUpDown()
Me.Label8 = New System.Windows.Forms.Label()
Me.TxtRemotePublicDb = New System.Windows.Forms.TextBox()
Me.Label7 = New System.Windows.Forms.Label()
Me.TxtRemotePrivateDb = New System.Windows.Forms.TextBox()
Me.Label6 = New System.Windows.Forms.Label()
Me.TxtRemotePwd = New System.Windows.Forms.TextBox()
Me.Label5 = New System.Windows.Forms.Label()
Me.TxtRemoteUser = New System.Windows.Forms.TextBox()
Me.Label4 = New System.Windows.Forms.Label()
Me.TxtRemoteServer = New System.Windows.Forms.TextBox()
Me.Label3 = New System.Windows.Forms.Label()
Me.GroupBox2 = New System.Windows.Forms.GroupBox()
Me.BtnLoad = New System.Windows.Forms.Button()
Me.BtnCommit = New System.Windows.Forms.Button()
Me.TxtLocalPwd = New System.Windows.Forms.TextBox()
Me.Label9 = New System.Windows.Forms.Label()
Me.TxtLocalFileName = New System.Windows.Forms.TextBox()
Me.Label14 = New System.Windows.Forms.Label()
Me.GroupBox3 = New System.Windows.Forms.GroupBox()
Me.NudFtpPort = New System.Windows.Forms.NumericUpDown()
Me.Label10 = New System.Windows.Forms.Label()
Me.TxtFtpPwd = New System.Windows.Forms.TextBox()
Me.Label13 = New System.Windows.Forms.Label()
Me.TxtFtpUser = New System.Windows.Forms.TextBox()
Me.Label15 = New System.Windows.Forms.Label()
Me.TxtFtpHost = New System.Windows.Forms.TextBox()
Me.Label16 = New System.Windows.Forms.Label()
Me.GroupBox4 = New System.Windows.Forms.GroupBox()
Me.TxtRemard = New System.Windows.Forms.TextBox()
Me.Label11 = New System.Windows.Forms.Label()
Me.TxtMac = New System.Windows.Forms.TextBox()
Me.Label12 = New System.Windows.Forms.Label()
Me.Label2 = New System.Windows.Forms.Label()
Me.DtpExpirationDate = New System.Windows.Forms.DateTimePicker()
Me.TxtVendorName = New System.Windows.Forms.TextBox()
Me.Label1 = New System.Windows.Forms.Label()
Me.GroupBox5 = New System.Windows.Forms.GroupBox()
Me.RtxTip = New System.Windows.Forms.RichTextBox()
Me.StatusStrip1 = New System.Windows.Forms.StatusStrip()
Me.TsPrgInstall = New System.Windows.Forms.ToolStripProgressBar()
Me.GroupBox1.SuspendLayout
CType(Me.NudRemotePort,System.ComponentModel.ISupportInitialize).BeginInit
Me.GroupBox2.SuspendLayout
Me.GroupBox3.SuspendLayout
CType(Me.NudFtpPort,System.ComponentModel.ISupportInitialize).BeginInit
Me.GroupBox4.SuspendLayout
Me.GroupBox5.SuspendLayout
Me.StatusStrip1.SuspendLayout
Me.SuspendLayout
'
'GroupBox1
'
Me.GroupBox1.Controls.Add(Me.NudRemotePort)
Me.GroupBox1.Controls.Add(Me.Label8)
Me.GroupBox1.Controls.Add(Me.TxtRemotePublicDb)
Me.GroupBox1.Controls.Add(Me.Label7)
Me.GroupBox1.Controls.Add(Me.TxtRemotePrivateDb)
Me.GroupBox1.Controls.Add(Me.Label6)
Me.GroupBox1.Controls.Add(Me.TxtRemotePwd)
Me.GroupBox1.Controls.Add(Me.Label5)
Me.GroupBox1.Controls.Add(Me.TxtRemoteUser)
Me.GroupBox1.Controls.Add(Me.Label4)
Me.GroupBox1.Controls.Add(Me.TxtRemoteServer)
Me.GroupBox1.Controls.Add(Me.Label3)
Me.GroupBox1.Location = New System.Drawing.Point(9, 160)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(240, 199)
Me.GroupBox1.TabIndex = 4
Me.GroupBox1.TabStop = false
Me.GroupBox1.Text = "远程数据库"
'
'NudRemotePort
'
Me.NudRemotePort.Location = New System.Drawing.Point(63, 61)
Me.NudRemotePort.Maximum = New Decimal(New Integer() {65535, 0, 0, 0})
Me.NudRemotePort.Minimum = New Decimal(New Integer() {1, 0, 0, 0})
Me.NudRemotePort.Name = "NudRemotePort"
Me.NudRemotePort.Size = New System.Drawing.Size(171, 21)
Me.NudRemotePort.TabIndex = 13
Me.NudRemotePort.Value = New Decimal(New Integer() {3307, 0, 0, 0})
'
'Label8
'
Me.Label8.AutoSize = true
Me.Label8.Location = New System.Drawing.Point(23, 65)
Me.Label8.Name = "Label8"
Me.Label8.Size = New System.Drawing.Size(29, 12)
Me.Label8.TabIndex = 12
Me.Label8.Text = "端口"
'
'TxtRemotePublicDb
'
Me.TxtRemotePublicDb.Location = New System.Drawing.Point(63, 169)
Me.TxtRemotePublicDb.Name = "TxtRemotePublicDb"
Me.TxtRemotePublicDb.Size = New System.Drawing.Size(171, 21)
Me.TxtRemotePublicDb.TabIndex = 11
'
'Label7
'
Me.Label7.AutoSize = true
Me.Label7.Location = New System.Drawing.Point(11, 172)
Me.Label7.Name = "Label7"
Me.Label7.Size = New System.Drawing.Size(41, 12)
Me.Label7.TabIndex = 10
Me.Label7.Text = "公共库"
'
'TxtRemotePrivateDb
'
Me.TxtRemotePrivateDb.Location = New System.Drawing.Point(63, 142)
Me.TxtRemotePrivateDb.Name = "TxtRemotePrivateDb"
Me.TxtRemotePrivateDb.Size = New System.Drawing.Size(171, 21)
Me.TxtRemotePrivateDb.TabIndex = 9
'
'Label6
'
Me.Label6.AutoSize = true
Me.Label6.Location = New System.Drawing.Point(11, 145)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(41, 12)
Me.Label6.TabIndex = 8
Me.Label6.Text = "私有库"
'
'TxtRemotePwd
'
Me.TxtRemotePwd.Location = New System.Drawing.Point(63, 115)
Me.TxtRemotePwd.Name = "TxtRemotePwd"
Me.TxtRemotePwd.Size = New System.Drawing.Size(171, 21)
Me.TxtRemotePwd.TabIndex = 7
'
'Label5
'
Me.Label5.AutoSize = true
Me.Label5.Location = New System.Drawing.Point(23, 119)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(29, 12)
Me.Label5.TabIndex = 6
Me.Label5.Text = "密码"
'
'TxtRemoteUser
'
Me.TxtRemoteUser.Location = New System.Drawing.Point(63, 88)
Me.TxtRemoteUser.Name = "TxtRemoteUser"
Me.TxtRemoteUser.Size = New System.Drawing.Size(171, 21)
Me.TxtRemoteUser.TabIndex = 5
'
'Label4
'
Me.Label4.AutoSize = true
Me.Label4.Location = New System.Drawing.Point(23, 92)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(29, 12)
Me.Label4.TabIndex = 4
Me.Label4.Text = "账号"
'
'TxtRemoteServer
'
Me.TxtRemoteServer.Location = New System.Drawing.Point(63, 34)
Me.TxtRemoteServer.Name = "TxtRemoteServer"
Me.TxtRemoteServer.Size = New System.Drawing.Size(171, 21)
Me.TxtRemoteServer.TabIndex = 3
'
'Label3
'
Me.Label3.AutoSize = true
Me.Label3.Location = New System.Drawing.Point(23, 38)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(29, 12)
Me.Label3.TabIndex = 2
Me.Label3.Text = "地址"
'
'GroupBox2
'
Me.GroupBox2.Controls.Add(Me.BtnLoad)
Me.GroupBox2.Controls.Add(Me.BtnCommit)
Me.GroupBox2.Controls.Add(Me.TxtLocalPwd)
Me.GroupBox2.Controls.Add(Me.Label9)
Me.GroupBox2.Controls.Add(Me.TxtLocalFileName)
Me.GroupBox2.Controls.Add(Me.Label14)
Me.GroupBox2.Location = New System.Drawing.Point(276, 160)
Me.GroupBox2.Name = "GroupBox2"
Me.GroupBox2.Size = New System.Drawing.Size(240, 199)
Me.GroupBox2.TabIndex = 5
Me.GroupBox2.TabStop = false
Me.GroupBox2.Text = "本地数据库"
'
'BtnLoad
'
Me.BtnLoad.Font = New System.Drawing.Font("黑体", 20.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134,Byte))
Me.BtnLoad.ForeColor = System.Drawing.Color.ForestGreen
Me.BtnLoad.Location = New System.Drawing.Point(6, 144)
Me.BtnLoad.Name = "BtnLoad"
Me.BtnLoad.Size = New System.Drawing.Size(109, 49)
Me.BtnLoad.TabIndex = 15
Me.BtnLoad.Text = "提取"
Me.BtnLoad.UseVisualStyleBackColor = true
'
'BtnCommit
'
Me.BtnCommit.Font = New System.Drawing.Font("黑体", 20.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134,Byte))
Me.BtnCommit.ForeColor = System.Drawing.Color.ForestGreen
Me.BtnCommit.Location = New System.Drawing.Point(125, 144)
Me.BtnCommit.Name = "BtnCommit"
Me.BtnCommit.Size = New System.Drawing.Size(109, 49)
Me.BtnCommit.TabIndex = 14
Me.BtnCommit.Text = "提交"
Me.BtnCommit.UseVisualStyleBackColor = true
'
'TxtLocalPwd
'
Me.TxtLocalPwd.Location = New System.Drawing.Point(45, 56)
Me.TxtLocalPwd.Name = "TxtLocalPwd"
Me.TxtLocalPwd.Size = New System.Drawing.Size(189, 21)
Me.TxtLocalPwd.TabIndex = 13
'
'Label9
'
Me.Label9.AutoSize = true
Me.Label9.Location = New System.Drawing.Point(5, 60)
Me.Label9.Name = "Label9"
Me.Label9.Size = New System.Drawing.Size(29, 12)
Me.Label9.TabIndex = 12
Me.Label9.Text = "密码"
'
'TxtLocalFileName
'
Me.TxtLocalFileName.Location = New System.Drawing.Point(45, 29)
Me.TxtLocalFileName.Name = "TxtLocalFileName"
Me.TxtLocalFileName.Size = New System.Drawing.Size(189, 21)
Me.TxtLocalFileName.TabIndex = 3
'
'Label14
'
Me.Label14.AutoSize = true
Me.Label14.Location = New System.Drawing.Point(5, 32)
Me.Label14.Name = "Label14"
Me.Label14.Size = New System.Drawing.Size(29, 12)
Me.Label14.TabIndex = 2
Me.Label14.Text = "名称"
'
'GroupBox3
'
Me.GroupBox3.Controls.Add(Me.NudFtpPort)
Me.GroupBox3.Controls.Add(Me.Label10)
Me.GroupBox3.Controls.Add(Me.TxtFtpPwd)
Me.GroupBox3.Controls.Add(Me.Label13)
Me.GroupBox3.Controls.Add(Me.TxtFtpUser)
Me.GroupBox3.Controls.Add(Me.Label15)
Me.GroupBox3.Controls.Add(Me.TxtFtpHost)
Me.GroupBox3.Controls.Add(Me.Label16)
Me.GroupBox3.Location = New System.Drawing.Point(276, 8)
Me.GroupBox3.Name = "GroupBox3"
Me.GroupBox3.Size = New System.Drawing.Size(240, 143)
Me.GroupBox3.TabIndex = 6
Me.GroupBox3.TabStop = false
Me.GroupBox3.Text = "Ftp信息"
'
'NudFtpPort
'
Me.NudFtpPort.Location = New System.Drawing.Point(45, 56)
Me.NudFtpPort.Maximum = New Decimal(New Integer() {65535, 0, 0, 0})
Me.NudFtpPort.Minimum = New Decimal(New Integer() {1, 0, 0, 0})
Me.NudFtpPort.Name = "NudFtpPort"
Me.NudFtpPort.Size = New System.Drawing.Size(189, 21)
Me.NudFtpPort.TabIndex = 14
Me.NudFtpPort.Value = New Decimal(New Integer() {50, 0, 0, 0})
'
'Label10
'
Me.Label10.AutoSize = true
Me.Label10.Location = New System.Drawing.Point(5, 60)
Me.Label10.Name = "Label10"
Me.Label10.Size = New System.Drawing.Size(29, 12)
Me.Label10.TabIndex = 12
Me.Label10.Text = "端口"
'
'TxtFtpPwd
'
Me.TxtFtpPwd.Location = New System.Drawing.Point(45, 110)
Me.TxtFtpPwd.Name = "TxtFtpPwd"
Me.TxtFtpPwd.Size = New System.Drawing.Size(189, 21)
Me.TxtFtpPwd.TabIndex = 7
'
'Label13
'
Me.Label13.AutoSize = true
Me.Label13.Location = New System.Drawing.Point(5, 114)
Me.Label13.Name = "Label13"
Me.Label13.Size = New System.Drawing.Size(29, 12)
Me.Label13.TabIndex = 6
Me.Label13.Text = "密码"
'
'TxtFtpUser
'
Me.TxtFtpUser.Location = New System.Drawing.Point(45, 83)
Me.TxtFtpUser.Name = "TxtFtpUser"
Me.TxtFtpUser.Size = New System.Drawing.Size(189, 21)
Me.TxtFtpUser.TabIndex = 5
'
'Label15
'
Me.Label15.AutoSize = true
Me.Label15.Location = New System.Drawing.Point(5, 87)
Me.Label15.Name = "Label15"
Me.Label15.Size = New System.Drawing.Size(29, 12)
Me.Label15.TabIndex = 4
Me.Label15.Text = "账号"
'
'TxtFtpHost
'
Me.TxtFtpHost.Location = New System.Drawing.Point(45, 29)
Me.TxtFtpHost.Name = "TxtFtpHost"
Me.TxtFtpHost.Size = New System.Drawing.Size(189, 21)
Me.TxtFtpHost.TabIndex = 3
'
'Label16
'
Me.Label16.AutoSize = true
Me.Label16.Location = New System.Drawing.Point(5, 33)
Me.Label16.Name = "Label16"
Me.Label16.Size = New System.Drawing.Size(29, 12)
Me.Label16.TabIndex = 2
Me.Label16.Text = "地址"
'
'GroupBox4
'
Me.GroupBox4.Controls.Add(Me.TxtRemard)
Me.GroupBox4.Controls.Add(Me.Label11)
Me.GroupBox4.Controls.Add(Me.TxtMac)
Me.GroupBox4.Controls.Add(Me.Label12)
Me.GroupBox4.Controls.Add(Me.Label2)
Me.GroupBox4.Controls.Add(Me.DtpExpirationDate)
Me.GroupBox4.Controls.Add(Me.TxtVendorName)
Me.GroupBox4.Controls.Add(Me.Label1)
Me.GroupBox4.Location = New System.Drawing.Point(9, 8)
Me.GroupBox4.Name = "GroupBox4"
Me.GroupBox4.Size = New System.Drawing.Size(240, 143)
Me.GroupBox4.TabIndex = 7
Me.GroupBox4.TabStop = false
Me.GroupBox4.Text = "基本信息"
'
'TxtRemard
'
Me.TxtRemard.Location = New System.Drawing.Point(58, 108)
Me.TxtRemard.Name = "TxtRemard"
Me.TxtRemard.Size = New System.Drawing.Size(176, 21)
Me.TxtRemard.TabIndex = 17
'
'Label11
'
Me.Label11.AutoSize = true
Me.Label11.Location = New System.Drawing.Point(23, 113)
Me.Label11.Name = "Label11"
Me.Label11.Size = New System.Drawing.Size(29, 12)
Me.Label11.TabIndex = 16
Me.Label11.Text = "备注"
'
'TxtMac
'
Me.TxtMac.Location = New System.Drawing.Point(58, 81)
Me.TxtMac.Name = "TxtMac"
Me.TxtMac.Size = New System.Drawing.Size(176, 21)
Me.TxtMac.TabIndex = 15
'
'Label12
'
Me.Label12.AutoSize = true
Me.Label12.Location = New System.Drawing.Point(29, 84)
Me.Label12.Name = "Label12"
Me.Label12.Size = New System.Drawing.Size(23, 12)
Me.Label12.TabIndex = 14
Me.Label12.Text = "MAC"
'
'Label2
'
Me.Label2.AutoSize = true
Me.Label2.Location = New System.Drawing.Point(11, 56)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(41, 12)
Me.Label2.TabIndex = 7
Me.Label2.Text = "有效期"
Me.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'DtpExpirationDate
'
Me.DtpExpirationDate.Location = New System.Drawing.Point(58, 54)
Me.DtpExpirationDate.Name = "DtpExpirationDate"
Me.DtpExpirationDate.Size = New System.Drawing.Size(176, 21)
Me.DtpExpirationDate.TabIndex = 6
'
'TxtVendorName
'
Me.TxtVendorName.Location = New System.Drawing.Point(58, 27)
Me.TxtVendorName.Name = "TxtVendorName"
Me.TxtVendorName.Size = New System.Drawing.Size(176, 21)
Me.TxtVendorName.TabIndex = 5
'
'Label1
'
Me.Label1.AutoSize = true
Me.Label1.Location = New System.Drawing.Point(17, 32)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(35, 12)
Me.Label1.TabIndex = 4
Me.Label1.Text = " 厂商"
'
'GroupBox5
'
Me.GroupBox5.Controls.Add(Me.RtxTip)
Me.GroupBox5.Location = New System.Drawing.Point(9, 365)
Me.GroupBox5.Name = "GroupBox5"
Me.GroupBox5.Size = New System.Drawing.Size(507, 187)
Me.GroupBox5.TabIndex = 8
Me.GroupBox5.TabStop = false
Me.GroupBox5.Text = "日志"
'
'RtxTip
'
Me.RtxTip.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.RtxTip.Dock = System.Windows.Forms.DockStyle.Fill
Me.RtxTip.Location = New System.Drawing.Point(3, 17)
Me.RtxTip.Name = "RtxTip"
Me.RtxTip.Size = New System.Drawing.Size(501, 167)
Me.RtxTip.TabIndex = 0
Me.RtxTip.Text = ""
'
'StatusStrip1
'
Me.StatusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.TsPrgInstall})
Me.StatusStrip1.Location = New System.Drawing.Point(0, 560)
Me.StatusStrip1.Name = "StatusStrip1"
Me.StatusStrip1.Size = New System.Drawing.Size(531, 22)
Me.StatusStrip1.TabIndex = 9
Me.StatusStrip1.Text = "StatusStrip1"
'
'TsPrgInstall
'
Me.TsPrgInstall.AutoSize = false
Me.TsPrgInstall.Name = "TsPrgInstall"
Me.TsPrgInstall.Size = New System.Drawing.Size(200, 16)
'
'FrmMain
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(531, 582)
Me.Controls.Add(Me.StatusStrip1)
Me.Controls.Add(Me.GroupBox5)
Me.Controls.Add(Me.GroupBox4)
Me.Controls.Add(Me.GroupBox3)
Me.Controls.Add(Me.GroupBox2)
Me.Controls.Add(Me.GroupBox1)
Me.Name = "FrmMain"
Me.Text = "注册厂商"
Me.GroupBox1.ResumeLayout(false)
Me.GroupBox1.PerformLayout
CType(Me.NudRemotePort,System.ComponentModel.ISupportInitialize).EndInit
Me.GroupBox2.ResumeLayout(false)
Me.GroupBox2.PerformLayout
Me.GroupBox3.ResumeLayout(false)
Me.GroupBox3.PerformLayout
CType(Me.NudFtpPort,System.ComponentModel.ISupportInitialize).EndInit
Me.GroupBox4.ResumeLayout(false)
Me.GroupBox4.PerformLayout
Me.GroupBox5.ResumeLayout(false)
Me.StatusStrip1.ResumeLayout(false)
Me.StatusStrip1.PerformLayout
Me.ResumeLayout(false)
Me.PerformLayout
End Sub
Friend WithEvents GroupBox1 As GroupBox
Friend WithEvents Label8 As Label
Friend WithEvents TxtRemotePublicDb As TextBox
Friend WithEvents Label7 As Label
Friend WithEvents TxtRemotePrivateDb As TextBox
Friend WithEvents Label6 As Label
Friend WithEvents TxtRemotePwd As TextBox
Friend WithEvents Label5 As Label
Friend WithEvents TxtRemoteUser As TextBox
Friend WithEvents Label4 As Label
Friend WithEvents TxtRemoteServer As TextBox
Friend WithEvents Label3 As Label
Friend WithEvents GroupBox2 As GroupBox
Friend WithEvents TxtLocalPwd As TextBox
Friend WithEvents Label9 As Label
Friend WithEvents TxtLocalFileName As TextBox
Friend WithEvents Label14 As Label
Friend WithEvents GroupBox3 As GroupBox
Friend WithEvents Label10 As Label
Friend WithEvents TxtFtpPwd As TextBox
Friend WithEvents Label13 As Label
Friend WithEvents TxtFtpUser As TextBox
Friend WithEvents Label15 As Label
Friend WithEvents TxtFtpHost As TextBox
Friend WithEvents Label16 As Label
Friend WithEvents GroupBox4 As GroupBox
Friend WithEvents TxtRemard As TextBox
Friend WithEvents Label11 As Label
Friend WithEvents TxtMac As TextBox
Friend WithEvents Label12 As Label
Friend WithEvents Label2 As Label
Friend WithEvents DtpExpirationDate As DateTimePicker
Friend WithEvents TxtVendorName As TextBox
Friend WithEvents Label1 As Label
Friend WithEvents BtnCommit As Button
Friend WithEvents GroupBox5 As GroupBox
Friend WithEvents RtxTip As RichTextBox
Friend WithEvents NudRemotePort As NumericUpDown
Friend WithEvents NudFtpPort As NumericUpDown
Friend WithEvents BtnLoad As Button
Friend WithEvents StatusStrip1 As StatusStrip
Friend WithEvents TsPrgInstall As ToolStripProgressBar
End Class

249
AUTS_Vendor/FrmMain.resx Normal file
View File

@@ -0,0 +1,249 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="GroupBox1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="NudRemotePort.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label8.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TxtRemotePublicDb.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label7.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TxtRemotePrivateDb.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label6.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TxtRemotePwd.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label5.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TxtRemoteUser.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label4.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TxtRemoteServer.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="GroupBox2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="BtnLoad.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="BtnCommit.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TxtLocalPwd.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label9.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TxtLocalFileName.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label14.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="GroupBox3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="NudFtpPort.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label10.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TxtFtpPwd.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label13.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TxtFtpUser.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label15.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TxtFtpHost.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label16.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="GroupBox4.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TxtRemard.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label11.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TxtMac.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label12.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="DtpExpirationDate.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TxtVendorName.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Label1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="GroupBox5.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="RtxTip.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="StatusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="StatusStrip1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

622
AUTS_Vendor/FrmMain.vb Normal file
View File

@@ -0,0 +1,622 @@
Imports System.Text
Imports UTS_Core.Database
Imports UTS_Core.UTSModule
Imports UTS_Core.UTSModule.DbTableModel.Customer
Imports UTS_Core.UTSModule.License
Imports UTS_Core.UTSModule.DbTableModel
Public Class FrmMain
Private Sub BtnCommit_Click(sender As Object, e As EventArgs) Handles BtnCommit.Click
UpdateInstallTip(0, "注册客户准备中")
Try
'更新License信息
UpdateInstallTip(1, $"License信息更新中...")
Dim lic As License = FillLicense()
UpdateInstallTip(20, $"License信息更新完成")
'生成License文件
UpdateInstallTip(21, $"License文件生成中...")
CreateVendorLicense(lic)
UpdateInstallTip(40, $"License文件生成完成")
'创建FTP文件夹
UpdateInstallTip(41, $"Ftp文件夹生成中...")
CreateFtpDic(lic)
UpdateInstallTip(60, $"Ftp文件夹生成完成")
'创建数据库的数据表
UpdateInstallTip(61, $"创建数据库结构中...")
CreateVendorTables(lic)
UpdateInstallTip(99, $"创建数据库结构完成!")
UpdateInstallTip(100, $"注册客户完成")
Catch ex As Exception
Console.WriteLine($"Commit vendor error:{ex.Message}")
UpdateInstallTip(100, $"注册客户失败,{ex.Message}")
End Try
End Sub
Private Function FillLicense() As License
'更新License缓存
Dim lic As New License With {
.ID = $"1",
.VendorName = TxtVendorName.Text,
.AuthorizationDate = $"{Now:yyyy-MM-dd HH:mm:ss}",
.ExpirationDate = $"{DtpExpirationDate.Value:yyyy-MM-dd HH:mm:ss}",
.DefaultUser = $"Admin",
.DefaultPassword = $"Admin",
.MysqlServer = TxtRemoteServer.Text,
.MysqlPort = NudRemotePort.Value.ToString(),
.MysqlUserID = TxtRemoteUser.Text,
.MysqlPassword = TxtRemotePwd.Text,
.MysqlDatabase = TxtRemotePrivateDb.Text,
.PublicDb = TxtRemotePublicDb.Text,
.SqliteDir = "LocalDB",
.SqliteName = TxtLocalFileName.Text,
.SqlitePassword = TxtLocalPwd.Text,
.FtpHost = TxtFtpHost.Text,
.FtpPort = NudFtpPort.Value.ToString(),
.FtpUser = TxtFtpUser.Text,
.FtpPwd = TxtFtpPwd.Text,
.Mac = TxtMac.Text,
.Remark = TxtRemard.Text,
.UtsVersion = $"3",
.Signature = $"this is a valid license data"
}
Return lic
End Function
''' <summary>
''' 创建Ftp所需的文件夹
''' </summary>
''' <param name="lic"></param>
Private Sub CreateFtpDic(lic As License)
UtsFtp.InitConnectParams(CInt(lic.FtpPort), lic.FtpUser, lic.FtpPwd)
Dim ftp As UtsFtp = UtsFtp.CreateObject()
ftp.FtpHost = lic.FtpHost
Try
ftp.CreateDir($"/uts_Manager/AUTS/{lic.VendorName}/AOI", True) '拍摄站上传图像
ftp.CreateDir($"/uts_Manager/AUTS/{lic.VendorName}/Package", True) '装箱站上传图像
ftp.CreateDir($"/uts_Manager/AUTS/{lic.VendorName}/Product", True) '产品图像
ftp.CreateDir($"/uts_Manager/AUTS/{lic.VendorName}/Repair", True) '维修站位图像
ftp.CreateDir($"/uts_Manager/AUTS/{lic.VendorName}/Project", True) '测试站位流程
ftp.CreateDir($"/uts_Manager/AUTS/{lic.VendorName}/Upload", True) '服务上传内容
Catch ex As Exception
Throw New Exception($"创建客户Ftp文件夹失败,{ex.Message}")
End Try
End Sub
Private Sub CreateVendorLicense(lic As License)
'获取License文件名
Dim licensePath As String
Using saveDlg As New SaveFileDialog
saveDlg.Title = $"请选择鉴权License文件的保存路径"
saveDlg.Filter = $"License文件(*.dat)|*.dat"
saveDlg.AddExtension = True
If saveDlg.ShowDialog() <> DialogResult.OK Then Return
licensePath = saveDlg.FileName
End Using
UpdateInstallTip(30, $"License文件即将保存至{licensePath}.")
'保存License文件
lic.SaveLicenseFile(licensePath)
End Sub
Private Sub UpdateCompanyTable(db As DbExecutor, dbName As String, company As String)
'更新公共库公司总表
Dim tableName As String = $"{Manage.CustomerListTable.TableName}"
Dim condition As String = $"`{Manage.CustomerListTable.ColNamesEnum.CustomerName}` = '{company}'"
Dim cmdText As String = db.CmdHelper.DbSearch(dbName, "count(*)", tableName, condition)
If CInt(db.ExecuteScalar(cmdText)) > 0 Then
Return
End If
Dim field As New Dictionary(Of String, String) From
{
{$"{Manage.CustomerListTable.ColNamesEnum.CustomerName}", company}
}
cmdText = db.CmdHelper.DbInsert(dbName, tableName, field)
db.ExecuteNonQuery(cmdText)
End Sub
Private Sub UpdateDatabaseTable(db As DbExecutor, dbName As String, company As String, userDb As String, user As String, pwd As String)
''更新公共库公司总表
Dim tableName As String = $"{Manage.CustomerListTable.TableName}"
Dim condition As String = $"`{Manage.CustomerListTable.ColNamesEnum.CustomerName}` = '{company}'"
Dim colName As String = $"{Manage.CustomerListTable.ColNamesEnum.ID}"
Dim cmdText As String = db.CmdHelper.DbSearch(dbName, colName, tableName, condition)
Dim companyID As String = db.ExecuteScalar(cmdText).ToString()
'更新公共库数据库总表
tableName = Manage.DbListTable.TableName
condition = $"`{Manage.DbListTable.ColNamesEnum.DatabaseName}` = '{userDb}'"
cmdText = db.CmdHelper.DbSearch(dbName, "count(*)", tableName, condition)
If CInt(db.ExecuteScalar(cmdText)) > 0 Then
Return
End If
Dim field2 As New Dictionary(Of String, String) From
{
{$"{Manage.DbListTable.ColNamesEnum.CompanyID}", companyID},
{$"{Manage.DbListTable.ColNamesEnum.DatabaseName}", userDb},
{$"{Manage.DbListTable.ColNamesEnum.DatabaseUser}", user},
{$"{Manage.DbListTable.ColNamesEnum.DatabasePassword}", pwd},
{$"{Manage.DbListTable.ColNamesEnum.DatabaseDesc}", ""}
}
cmdText = db.CmdHelper.DbInsert(dbName, tableName, field2)
db.ExecuteNonQuery(cmdText)
End Sub
Private Sub CreateProcedure(db As DbExecutor, dbName As String)
'修改测试记录表字段存储过程
Dim sqlCmd As New StringBuilder
sqlCmd.Append($"Drop Procedure If Exists `{dbName}`.`AlterTestLogFiled`;" & vbCrLf)
sqlCmd.Append($"Create Procedure `{dbName}`.`AlterTestLogFiled`(in dbName varchar(32),in tbName varchar(32),in filed varchar(32),in len int)" & vbCrLf)
sqlCmd.Append("begin" & vbCrLf)
sqlCmd.Append("DECLARE l_int int default 0;" & vbCrLf)
sqlCmd.Append("DECLARE l_len int default 0;" & vbCrLf)
sqlCmd.Append("DECLARE l_type varchar(16) default '';" & vbCrLf)
sqlCmd.Append("select count(*),`DATA_TYPE`,`CHARACTER_MAXIMUM_LENGTH` into l_int,l_type,l_len from `information_schema`.`COLUMNS` WHERE TABLE_SCHEMA = dbName and TABLE_NAME = tbName and COLUMN_NAME = filed COLLATE utf8_general_ci;" & vbCrLf)
sqlCmd.Append("if l_int = 0 then" & vbCrLf)
sqlCmd.Append("set @cmd = CONCAT('alter table ',dbName,'.',tbName,' add column ',filed,' varchar(',len,')');" & vbCrLf)
sqlCmd.Append("PREPARE pre FROM @cmd;" & vbCrLf)
sqlCmd.Append("EXECUTE pre;" & vbCrLf)
sqlCmd.Append("deallocate prepare pre;" & vbCrLf)
sqlCmd.Append("else" & vbCrLf)
sqlCmd.Append("if l_type = 'varchar' and len > l_len then" & vbCrLf)
sqlCmd.Append("set @cmd = CONCAT('alter table ',dbName,'.',tbName,' modify column ',filed,' varchar(',len,')');" & vbCrLf)
sqlCmd.Append("PREPARE pre FROM @cmd;" & vbCrLf)
sqlCmd.Append("EXECUTE pre;" & vbCrLf)
sqlCmd.Append("deallocate prepare pre;" & vbCrLf)
sqlCmd.Append("end if;" & vbCrLf)
sqlCmd.Append("end if;" & vbCrLf)
sqlCmd.Append("end" & vbCrLf)
db.ExecuteNonQuery(sqlCmd.ToString)
'Sn总表新增条码存储过程
sqlCmd.Clear()
sqlCmd.Append($"Drop Procedure If Exists `{dbName}`.`AlterSnListBarcode`;" & vbCrLf)
sqlCmd.Append($"Create Procedure `{dbName}`.`AlterSnListBarcode`(in orderid int,in orderinternalid int,in pid int,in code varchar(32),in sntype int)" & vbCrLf)
sqlCmd.Append("begin " & vbCrLf)
sqlCmd.Append("DECLARE l_int int default 0; " & vbCrLf)
sqlCmd.Append("select count(*) into l_int from `TBL_SnList` WHERE `BarCode` = code COLLATE utf8_general_ci; " & vbCrLf)
sqlCmd.Append("if l_int = 0 then " & vbCrLf)
sqlCmd.Append("set @cmd = CONCAT('Insert into TBL_SnList(OrderID,OrderInternalID,ProductID,BarCode,SnType) values(',orderid,',',orderinternalid,',',pid,',''',code,''',',sntype,')'); " & vbCrLf)
sqlCmd.Append("PREPARE pre FROM @cmd; " & vbCrLf)
sqlCmd.Append("EXECUTE pre; " & vbCrLf)
sqlCmd.Append("deallocate prepare pre; " & vbCrLf)
sqlCmd.Append("end if; " & vbCrLf)
sqlCmd.Append("end " & vbCrLf)
db.ExecuteNonQuery(sqlCmd.ToString)
'Sn总表更新条码测试记录存储过程-有MO
sqlCmd.Clear()
sqlCmd.Append($"Drop Procedure If Exists `{dbName}`.`UpdateSnListBarcode_MO`;" & vbCrLf)
'2023-06-07 add MO'''''''''''
'sqlCmd.Append($"Create Procedure `{dbName}`.`UpdateSnListBarcode`(in code varchar(32),in snOrder int,in startTime datetime,in result int,in a1String varchar(254))," & vbCrLf)
sqlCmd.Append($"Create Procedure `{dbName}`.`UpdateSnListBarcode_MO`(in code varchar(32),in snOrder int,in startTime datetime,in result int,in a1String varchar(254),in MoId int)" & vbCrLf)
''''''''''''''''''''''''''''''
sqlCmd.Append("begin " & vbCrLf)
sqlCmd.Append("DECLARE msg int default -1; " & vbCrLf)
sqlCmd.Append("set @cmd = Concat('select S',snOrder,',count(1) into @l_tm,@l_ct from `TBL_SnList` where `BarCode` = ''',code,''''); " & vbCrLf)
sqlCmd.Append("PREPARE pre FROM @cmd;" & vbCrLf)
sqlCmd.Append("EXECUTE pre;" & vbCrLf)
sqlCmd.Append("deallocate prepare pre;" & vbCrLf)
sqlCmd.Append("if @l_ct = 0 then" & vbCrLf)
sqlCmd.Append("set msg = 0;" & vbCrLf)
sqlCmd.Append("else" & vbCrLf)
sqlCmd.Append("if @l_tm is null then" & vbCrLf)
sqlCmd.Append("if char_length(a1String) = 0 then " & vbCrLf)
'2023-06-07 add MO'''''''''''
'sqlCmd.Append("set @cmd = Concat('update `TBL_SnList` set S',snOrder,' = ''',startTime,''',Result',snOrder, ' = ',result,' where `BarCode` = ''',code,'''');" & vbCrLf)
sqlCmd.Append("set @cmd = Concat('update `TBL_SnList` set OrderInternalID=''',MoId,''',S',snOrder,' = ''',startTime,''',Result',snOrder, ' = ',result,' where `BarCode` = ''',code,'''');" & vbCrLf)
''''''''''''''''''''''''''''''
sqlCmd.Append("else" & vbCrLf)
'2023-06-07 add MO'''''''''''
'sqlCmd.Append("set @cmd = Concat('update `TBL_SnList` set S',snOrder,' = ''',startTime,''',Result',snOrder, ' = ',result,',AssemblySn = ''',a1String,''',AssemblyTime =''',startTime,''' where `BarCode` = ''',code,''''); " & vbCrLf)
sqlCmd.Append("set @cmd = Concat('update `TBL_SnList` set OrderInternalID=''',MoId,''',S',snOrder,' = ''',startTime,''',Result',snOrder, ' = ',result,',AssemblySn = ''',a1String,''',AssemblyTime =''',startTime,''' where `BarCode` = ''',code,''''); " & vbCrLf)
''''''''''''''''''''''''''''''
sqlCmd.Append("end if;" & vbCrLf)
sqlCmd.Append("PREPARE pre FROM @cmd;" & vbCrLf)
sqlCmd.Append("EXECUTE pre;" & vbCrLf)
sqlCmd.Append("deallocate prepare pre;" & vbCrLf)
sqlCmd.Append("set msg = 1;" & vbCrLf)
sqlCmd.Append("else" & vbCrLf)
sqlCmd.Append("if startTime >= @l_tm then" & vbCrLf)
sqlCmd.Append("if char_length(a1String) = 0 then " & vbCrLf)
'2023-06-07 add MO'''''''''''
'sqlCmd.Append("set @cmd = Concat('update `TBL_SnList` set S',snOrder,' = ''',startTime,''',Result',snOrder, ' = ',result,' where `BarCode` = ''',code,''''); " & vbCrLf)
sqlCmd.Append("set @cmd = Concat('update `TBL_SnList` set OrderInternalID=''',MoId,''',S',snOrder,' = ''',startTime,''',Result',snOrder, ' = ',result,' where `BarCode` = ''',code,''''); " & vbCrLf)
''''''''''''''''''''''''''''''
sqlCmd.Append("else" & vbCrLf)
'2023-06-07 add MO'''''''''''
'sqlCmd.Append("set @cmd = Concat('update `TBL_SnList` set S',snOrder,' = ''',startTime,''',Result',snOrder, ' = ',result,',AssemblySn = ''',a1String,''',AssemblyTime =''',startTime,''' where `BarCode` = ''',code,''''); " & vbCrLf)
sqlCmd.Append("set @cmd = Concat('update `TBL_SnList` set OrderInternalID=''',MoId,''',S',snOrder,' = ''',startTime,''',Result',snOrder, ' = ',result,',AssemblySn = ''',a1String,''',AssemblyTime =''',startTime,''' where `BarCode` = ''',code,''''); " & vbCrLf)
''''''''''''''''''''''''''''''
sqlCmd.Append("end if;" & vbCrLf)
sqlCmd.Append("PREPARE pre FROM @cmd;" & vbCrLf)
sqlCmd.Append("EXECUTE pre;" & vbCrLf)
sqlCmd.Append("deallocate prepare pre;" & vbCrLf)
sqlCmd.Append("set msg = 1;" & vbCrLf)
sqlCmd.Append("else" & vbCrLf)
sqlCmd.Append("set msg = 2;" & vbCrLf)
sqlCmd.Append("end if;" & vbCrLf)
sqlCmd.Append("end if;" & vbCrLf)
sqlCmd.Append("end if;" & vbCrLf)
sqlCmd.Append("select msg;" & vbCrLf)
sqlCmd.Append("end " & vbCrLf)
db.ExecuteNonQuery(sqlCmd.ToString)
'Sn总表更新条码测试记录存储过程:无MO
sqlCmd.Clear()
sqlCmd.Append($"Drop Procedure If Exists `{dbName}`.`UpdateSnListBarcode`;" & vbCrLf)
sqlCmd.Append($"Create Procedure `{dbName}`.`UpdateSnListBarcode`(in code varchar(32),in snOrder int,in startTime datetime,in result int,in a1String varchar(254))" & vbCrLf)
sqlCmd.Append("begin " & vbCrLf)
sqlCmd.Append("DECLARE msg int default -1; " & vbCrLf)
sqlCmd.Append("set @cmd = Concat('select S',snOrder,',count(1) into @l_tm,@l_ct from `TBL_SnList` where `BarCode` = ''',code,''''); " & vbCrLf)
sqlCmd.Append("PREPARE pre FROM @cmd;" & vbCrLf)
sqlCmd.Append("EXECUTE pre;" & vbCrLf)
sqlCmd.Append("deallocate prepare pre;" & vbCrLf)
sqlCmd.Append("if @l_ct = 0 then" & vbCrLf)
sqlCmd.Append("set msg = 0;" & vbCrLf)
sqlCmd.Append("else" & vbCrLf)
sqlCmd.Append("if @l_tm is null then" & vbCrLf)
sqlCmd.Append("if char_length(a1String) = 0 then " & vbCrLf)
sqlCmd.Append("set @cmd = Concat('update `TBL_SnList` set S',snOrder,' = ''',startTime,''',Result',snOrder, ' = ',result,' where `BarCode` = ''',code,'''');" & vbCrLf)
sqlCmd.Append("else" & vbCrLf)
sqlCmd.Append("set @cmd = Concat('update `TBL_SnList` set S',snOrder,' = ''',startTime,''',Result',snOrder, ' = ',result,',AssemblySn = ''',a1String,''',AssemblyTime =''',startTime,''' where `BarCode` = ''',code,''''); " & vbCrLf)
sqlCmd.Append("end if;" & vbCrLf)
sqlCmd.Append("PREPARE pre FROM @cmd;" & vbCrLf)
sqlCmd.Append("EXECUTE pre;" & vbCrLf)
sqlCmd.Append("deallocate prepare pre;" & vbCrLf)
sqlCmd.Append("set msg = 1;" & vbCrLf)
sqlCmd.Append("else" & vbCrLf)
sqlCmd.Append("if startTime >= @l_tm then" & vbCrLf)
sqlCmd.Append("if char_length(a1String) = 0 then " & vbCrLf)
sqlCmd.Append("set @cmd = Concat('update `TBL_SnList` set S',snOrder,' = ''',startTime,''',Result',snOrder, ' = ',result,' where `BarCode` = ''',code,''''); " & vbCrLf)
sqlCmd.Append("else" & vbCrLf)
sqlCmd.Append("set @cmd = Concat('update `TBL_SnList` set S',snOrder,' = ''',startTime,''',Result',snOrder, ' = ',result,',AssemblySn = ''',a1String,''',AssemblyTime =''',startTime,''' where `BarCode` = ''',code,''''); " & vbCrLf)
sqlCmd.Append("end if;" & vbCrLf)
sqlCmd.Append("PREPARE pre FROM @cmd;" & vbCrLf)
sqlCmd.Append("EXECUTE pre;" & vbCrLf)
sqlCmd.Append("deallocate prepare pre;" & vbCrLf)
sqlCmd.Append("set msg = 1;" & vbCrLf)
sqlCmd.Append("else" & vbCrLf)
sqlCmd.Append("set msg = 2;" & vbCrLf)
sqlCmd.Append("end if;" & vbCrLf)
sqlCmd.Append("end if;" & vbCrLf)
sqlCmd.Append("end if;" & vbCrLf)
sqlCmd.Append("select msg;" & vbCrLf)
sqlCmd.Append("end " & vbCrLf)
db.ExecuteNonQuery(sqlCmd.ToString)
End Sub
Private Sub CreateDatabase(db As DbExecutor, dbName As String)
Dim sqlCmd As New StringBuilder
Dim tableName As String
'创建数据库
UpdateInstallTip(55, $"创建数据库中...")
sqlCmd.Clear()
sqlCmd.Append($"CREATE DATABASE IF NOT EXISTS {dbName};")
db.ExecuteNonQuery(sqlCmd.ToString())
UpdateInstallTip(60, $"创建数据库完成!")
'创建数据库同步表
UpdateInstallTip(65, $"创建同步表...")
sqlCmd.Clear()
sqlCmd.Append(SyncListTable.CreateTableString(dbName, db.DatabaseType))
db.ExecuteNonQuery(sqlCmd.ToString())
UpdateInstallTip(65, $"创建同步表完成!")
'创建数据库日志表
UpdateInstallTip(65, $"创建日志表...")
sqlCmd.Clear()
sqlCmd.Append(LogTable.CreateTableString(dbName, db.DatabaseType))
db.ExecuteNonQuery(sqlCmd.ToString())
UpdateInstallTip(65, $"创建日志表完成!")
'创建项目类型表
UpdateInstallTip(65, $"创建项目类型表...")
sqlCmd.Clear()
tableName = ProductTypesTable.TableName
sqlCmd.Append(ProductTypesTable.CreateTableString(dbName, db.DatabaseType))
sqlCmd.Append(SyncListTable.SyncTrigger(dbName, tableName))
sqlCmd.Append(SyncListTable.AddSyncTableString(dbName, tableName))
db.ExecuteNonQuery(sqlCmd.ToString())
UpdateInstallTip(65, $"创建项目类型表完成!")
'创建项目表
UpdateInstallTip(70, $"创建项目表...")
sqlCmd.Clear()
tableName = ProjectTable.TableName
sqlCmd.Append(ProjectTable.CreateTableString(dbName, db.DatabaseType))
sqlCmd.Append(SyncListTable.SyncTrigger(dbName, tableName))
sqlCmd.Append(SyncListTable.AddSyncTableString(dbName, tableName))
db.ExecuteNonQuery(sqlCmd.ToString())
UpdateInstallTip(70, $"创建项目表完成!")
'创建站位表
UpdateInstallTip(70, $"创建站位表...")
sqlCmd.Clear()
tableName = StationListTable.TableName
sqlCmd.Append(StationListTable.CreateTableString(dbName, db.DatabaseType))
sqlCmd.Append(SyncListTable.SyncTrigger(dbName, tableName))
sqlCmd.Append(SyncListTable.AddSyncTableString(dbName, tableName))
db.ExecuteNonQuery(sqlCmd.ToString())
UpdateInstallTip(70, $"创建站位表完成!")
'创建站包发布历史表
UpdateInstallTip(70, $"创建站包发布历史表...")
sqlCmd.Clear()
tableName = StationPacketReleaseLogTable.TableName
sqlCmd.Append(StationPacketReleaseLogTable.CreateTableString(dbName, db.DatabaseType))
sqlCmd.Append(SyncListTable.SyncTrigger(dbName, tableName))
sqlCmd.Append(SyncListTable.AddSyncTableString(dbName, tableName))
db.ExecuteNonQuery(sqlCmd.ToString())
UpdateInstallTip(70, $"创建站包发布历史表完成!")
'创建内部单表
UpdateInstallTip(70, $"创建内部单表...")
sqlCmd.Clear()
tableName = OrderInternalTable.TableName
sqlCmd.Append(OrderInternalTable.CreateTableString(dbName, db.DatabaseType))
sqlCmd.Append(SyncListTable.SyncTrigger(dbName, tableName))
sqlCmd.Append(SyncListTable.AddSyncTableString(dbName, tableName))
db.ExecuteNonQuery(sqlCmd.ToString())
UpdateInstallTip(70, $"创建内部单表完成!")
'创建订单表
UpdateInstallTip(70, $"创建订单表...")
sqlCmd.Clear()
tableName = OrdersTable.TableName
sqlCmd.Append(OrdersTable.CreateTableString(dbName, db.DatabaseType))
sqlCmd.Append(SyncListTable.SyncTrigger(dbName, tableName))
sqlCmd.Append(SyncListTable.AddSyncTableString(dbName, tableName))
db.ExecuteNonQuery(sqlCmd.ToString())
UpdateInstallTip(70, $"创建订单表完成!")
'创建产线表
UpdateInstallTip(75, $"创建产线表...")
sqlCmd.Clear()
tableName = ProductionLineTable.TableName
sqlCmd.Append(ProductionLineTable.CreateTableString(dbName, db.DatabaseType))
sqlCmd.Append(SyncListTable.SyncTrigger(dbName, tableName))
sqlCmd.Append(SyncListTable.AddSyncTableString(dbName, tableName))
db.ExecuteNonQuery(sqlCmd.ToString())
UpdateInstallTip(75, $"创建产线表完成!")
'创建生产计划表
UpdateInstallTip(75, $"创建生产计划表...")
sqlCmd.Clear()
tableName = ProductionPlanTable.TableName
sqlCmd.Append(ProductionPlanTable.CreateTableString(dbName, db.DatabaseType))
sqlCmd.Append(SyncListTable.SyncTrigger(dbName, tableName))
sqlCmd.Append(SyncListTable.AddSyncTableString(dbName, tableName))
db.ExecuteNonQuery(sqlCmd.ToString())
UpdateInstallTip(75, $"创建生产计划表完成!")
'创建产商客户表
UpdateInstallTip(75, $"创建产商客户表...")
sqlCmd.Clear()
tableName = VendorCustomerTable.TableName
sqlCmd.Append(VendorCustomerTable.CreateTableString(dbName, db.DatabaseType))
sqlCmd.Append(SyncListTable.SyncTrigger(dbName, tableName))
sqlCmd.Append(SyncListTable.AddSyncTableString(dbName, tableName))
db.ExecuteNonQuery(sqlCmd.ToString())
UpdateInstallTip(75, $"创建产商客户表完成!")
'创建序号总表
UpdateInstallTip(75, $"创建序号总表...")
sqlCmd.Clear()
tableName = SnListTable.TableName
sqlCmd.Append(SnListTable.CreateTableString(dbName, db.DatabaseType))
sqlCmd.Append(SyncListTable.SyncTrigger(dbName, tableName))
sqlCmd.Append(SyncListTable.AddSyncTableString(dbName, tableName, "new"))
db.ExecuteNonQuery(sqlCmd.ToString())
UpdateInstallTip(75, $"创建序号总表完成!")
'创建序号关联信息总表
UpdateInstallTip(75, $"创建序号关联信息总表...")
sqlCmd.Clear()
tableName = ImportInfoTable.TableName
sqlCmd.Append(ImportInfoTable.CreateTableString(dbName, db.DatabaseType))
sqlCmd.Append(SyncListTable.SyncTrigger(dbName, tableName))
sqlCmd.Append(SyncListTable.AddSyncTableString(dbName, tableName, "new"))
db.ExecuteNonQuery(sqlCmd.ToString())
UpdateInstallTip(75, $"创建序号关联信息总表完成!")
'创建维修原因类型表
UpdateInstallTip(75, $"创建维修原因类型表...")
sqlCmd.Clear()
tableName = RepairTypesTable.TableName
sqlCmd.Append(RepairTypesTable.CreateTableString(dbName, db.DatabaseType))
sqlCmd.Append(SyncListTable.SyncTrigger(dbName, tableName))
sqlCmd.Append(SyncListTable.AddSyncTableString(dbName, tableName))
db.ExecuteNonQuery(sqlCmd.ToString())
UpdateInstallTip(75, $"创建维修原因类型表完成!")
'创建维修原因表
UpdateInstallTip(75, $"创建维修原因表...")
sqlCmd.Clear()
tableName = RepairReasonTable.TableName
sqlCmd.Append(RepairReasonTable.CreateTableString(dbName, db.DatabaseType))
sqlCmd.Append(SyncListTable.SyncTrigger(dbName, tableName))
sqlCmd.Append(SyncListTable.AddSyncTableString(dbName, tableName))
db.ExecuteNonQuery(sqlCmd.ToString())
UpdateInstallTip(75, $"创建维修原因表完成!")
'创建报修不良代码表
UpdateInstallTip(75, $"创建报修不良代码表...")
sqlCmd.Clear()
tableName = RejectsExplainTable.TableName
sqlCmd.Append(RejectsExplainTable.CreateTableString(dbName, db.DatabaseType))
sqlCmd.Append(SyncListTable.SyncTrigger(dbName, tableName))
sqlCmd.Append(SyncListTable.AddSyncTableString(dbName, tableName))
db.ExecuteNonQuery(sqlCmd.ToString())
UpdateInstallTip(75, $"创建报修不良代码完成!")
'创建报修记录表
UpdateInstallTip(75, $"创建报修记录表...")
sqlCmd.Clear()
tableName = RepairRequestTable.TableName
sqlCmd.Append(RepairRequestTable.CreateTableString(dbName, db.DatabaseType))
sqlCmd.Append(SyncListTable.SyncTrigger(dbName, tableName))
sqlCmd.Append(SyncListTable.AddSyncTableString(dbName, tableName))
db.ExecuteNonQuery(sqlCmd.ToString())
UpdateInstallTip(75, $"创建报修记录表完成!")
'创建维修结果表
UpdateInstallTip(75, $"创建维修结果表...")
sqlCmd.Clear()
tableName = RepairResultTable.TableName
sqlCmd.Append(RepairResultTable.CreateTableString(dbName, db.DatabaseType))
sqlCmd.Append(SyncListTable.SyncTrigger(dbName, tableName))
sqlCmd.Append(SyncListTable.AddSyncTableString(dbName, tableName))
db.ExecuteNonQuery(sqlCmd.ToString())
UpdateInstallTip(75, $"创建维修结果表完成!")
'创建维修记录表
UpdateInstallTip(75, $"创建维修记录表...")
sqlCmd.Clear()
tableName = RepairLogTable.TableName
sqlCmd.Append(RepairLogTable.CreateTableString(dbName, db.DatabaseType))
sqlCmd.Append(SyncListTable.SyncTrigger(dbName, tableName))
sqlCmd.Append(SyncListTable.AddSyncTableString(dbName, tableName))
db.ExecuteNonQuery(sqlCmd.ToString())
UpdateInstallTip(75, $"创建维修记录表完成!")
End Sub
Private Sub CreateVendorTables(lic As License)
'生成对应数据库的对应数据表
Dim connType As DbExecutor.DbTypeEnum = DbExecutor.DbTypeEnum.Mysql
Dim connString As String = $"Server = {lic.MysqlServer};Port = {lic.MysqlPort};User id = {lic.MysqlUserID};Password = {lic.MysqlPassword};SslMode = none;Allow User Variables = True;"
UpdateInstallTip(45, $"连接数据库中...")
Using db As New DbExecutor(connType, connString)
db.Open()
UpdateInstallTip(50, $"连接数据库完成!")
UpdateInstallTip(51, $"创建客户数据库中...")
Try
CreateDatabase(db, lic.MysqlDatabase)
UpdateInstallTip(80, $"创建客户数据库完成!")
Catch ex As Exception
Throw New Exception($"创建客户数据库失败,{ex.Message}")
End Try
Try
CreateProcedure(db, lic.MysqlDatabase)
Catch ex As Exception
Throw New Exception($"创建客户数据库存储过程失败,{ex.Message}")
End Try
UpdateInstallTip(81, $"注册客户中...")
Try
UpdateInstallTip(81, $"注册客户公司中...")
UpdateCompanyTable(db, lic.PublicDb, lic.VendorName)
UpdateInstallTip(85, $"注册客户公司中!")
UpdateInstallTip(86, $"注册客户数据库中...")
UpdateDatabaseTable(db, lic.PublicDb, lic.VendorName, lic.MysqlDatabase, lic.MysqlUserID, lic.MysqlPassword)
UpdateInstallTip(90, $"注册客户数据库完成!")
Catch ex As Exception
Throw New Exception($"注册客户失败,{ex.Message}")
End Try
db.Close()
End Using
End Sub
Private Sub UpdateFormByLicense(lic As License)
TxtVendorName.Text = lic.VendorName
DtpExpirationDate.Value = Date.Parse(lic.ExpirationDate)
TxtRemoteServer.Text = lic.MysqlServer
NudRemotePort.Value = CInt(lic.MysqlPort)
TxtRemoteUser.Text = lic.MysqlUserID
TxtRemotePwd.Text = lic.MysqlPassword
TxtRemotePrivateDb.Text = lic.MysqlDatabase
TxtRemotePublicDb.Text = lic.PublicDb
TxtLocalFileName.Text = lic.SqliteName
TxtLocalPwd.Text = lic.SqlitePassword
TxtFtpHost.Text = lic.FtpHost
NudFtpPort.Value = CInt(lic.FtpPort)
TxtFtpUser.Text = lic.FtpUser
TxtFtpPwd.Text = lic.FtpPwd
TxtMac.Text = lic.Mac
TxtRemard.Text = lic.Remark
End Sub
Private Sub BtnLoad_Click(sender As Object, e As EventArgs) Handles BtnLoad.Click
Dim licensePath As String
Using openDlg As New OpenFileDialog
openDlg.Title = $"请选择模板鉴权License文件的路径"
openDlg.Filter = $"License文件(*.dat)|*.dat"
If openDlg.ShowDialog() <> DialogResult.OK Then Return
licensePath = openDlg.FileName
End Using
Try
Dim lic As New License(licensePath)
UpdateFormByLicense(lic)
Catch ex As Exception
MsgBox($"Load license file error:{ex.Message}")
End Try
End Sub
Private Sub UpdateProgressBar(value As Integer)
TsPrgInstall.Value = value
End Sub
Private Sub UpdateInstallLog(value As Integer, log As String)
If value = 0 Then RtxTip.Clear()
RtxTip.AppendText($"[{value,3}%]-[{Now}]{log}{vbCrLf}")
RtxTip.ScrollToCaret()
End Sub
Private Sub UpdateInstallTip(value As Integer, str As String)
UpdateProgressBar(value)
UpdateInstallLog(value, str)
End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Text = $"{Application.ProductName} {Application.ProductVersion}"
DtpExpirationDate.Value = Now.AddMonths(6)
End Sub
Private Sub GroupBox2_Enter(sender As Object, e As EventArgs) Handles GroupBox2.Enter
End Sub
End Class

View File

@@ -0,0 +1,38 @@
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.30319.42000
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On
Namespace My
'NOTE: This file is auto-generated; do not modify it directly. To make changes,
' or if you encounter build errors in this file, go to the Project Designer
' (go to Project Properties or double-click the My Project node in
' Solution Explorer), and make changes on the Application tab.
'
Partial Friend Class MyApplication
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
Public Sub New()
MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
Me.IsSingleInstance = false
Me.EnableVisualStyles = true
Me.SaveMySettingsOnExit = true
Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
End Sub
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
Protected Overrides Sub OnCreateMainForm()
Me.MainForm = Global.AUTS_Vendor.FrmMain
End Sub
End Class
End Namespace

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<MySubMain>true</MySubMain>
<MainForm>Form1</MainForm>
<SingleInstance>false</SingleInstance>
<ShutdownMode>0</ShutdownMode>
<EnableVisualStyles>true</EnableVisualStyles>
<AuthenticationMode>0</AuthenticationMode>
<ApplicationType>0</ApplicationType>
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
</MyApplicationData>

View File

@@ -0,0 +1,35 @@
Imports System
Imports System.Reflection
Imports System.Runtime.InteropServices
' 有关程序集的一般信息由以下
' 控制。更改这些特性值可修改
' 与程序集关联的信息。
'查看程序集特性的值
<Assembly: AssemblyTitle("AUTS_Vendor")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("AUTS_Vendor")>
<Assembly: AssemblyCopyright("Copyright © 2021")>
<Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(False)>
'如果此项目向 COM 公开,则下列 GUID 用于 typelib 的 ID
<Assembly: Guid("c1bb3392-822f-4736-a4cf-f4a76d867bff")>
' 程序集的版本信息由下列四个值组成:
'
' 主版本
' 次版本
' 生成号
' 修订号
'
'可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
'通过使用 "*",如下所示:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.1.0.0")>
<Assembly: AssemblyFileVersion("1.1.0.0")>

View File

@@ -0,0 +1,62 @@
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.30319.42000
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On
Namespace My.Resources
'This class was auto-generated by the StronglyTypedResourceBuilder
'class via a tool like ResGen or Visual Studio.
'To add or remove a member, edit your .ResX file then rerun ResGen
'with the /str option, or rebuild your VS project.
'''<summary>
''' A strongly-typed resource class, for looking up localized strings, etc.
'''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
Friend Module Resources
Private resourceMan As Global.System.Resources.ResourceManager
Private resourceCulture As Global.System.Globalization.CultureInfo
'''<summary>
''' Returns the cached ResourceManager instance used by this class.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
Get
If Object.ReferenceEquals(resourceMan, Nothing) Then
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("AUTS_Vendor.Resources", GetType(Resources).Assembly)
resourceMan = temp
End If
Return resourceMan
End Get
End Property
'''<summary>
''' Overrides the current thread's CurrentUICulture property for all
''' resource lookups using this strongly typed resource class.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend Property Culture() As Global.System.Globalization.CultureInfo
Get
Return resourceCulture
End Get
Set(ByVal value As Global.System.Globalization.CultureInfo)
resourceCulture = value
End Set
End Property
End Module
End Namespace

View File

@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -0,0 +1,73 @@
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.30319.42000
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On
Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Friend NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings)
#Region "My.Settings Auto-Save Functionality"
#If _MyType = "WindowsForms" Then
Private Shared addedHandler As Boolean
Private Shared addedHandlerLockObject As New Object
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
If My.Application.SaveMySettingsOnExit Then
My.Settings.Save()
End If
End Sub
#End If
#End Region
Public Shared ReadOnly Property [Default]() As MySettings
Get
#If _MyType = "WindowsForms" Then
If Not addedHandler Then
SyncLock addedHandlerLockObject
If Not addedHandler Then
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
addedHandler = True
End If
End SyncLock
End If
#End If
Return defaultInstance
End Get
End Property
End Class
End Namespace
Namespace My
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
Friend Module MySettingsProperty
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
Friend ReadOnly Property Settings() As Global.AUTS_Vendor.My.MySettings
Get
Return Global.AUTS_Vendor.My.MySettings.Default
End Get
End Property
End Module
End Namespace

View File

@@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>