초기 커밋.
This commit is contained in:
parent
9089376616
commit
181d6ca3a0
14
App.config
Normal file
14
App.config
Normal file
@ -0,0 +1,14 @@
|
||||
<?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>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
25
DualSonicFreqSearch.sln
Normal file
25
DualSonicFreqSearch.sln
Normal file
@ -0,0 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.14.36623.8 d17.14
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "DualSonicFreqSearch", "DualSonicFreqSearch.vbproj", "{92B33A97-9AC7-48FD-98DF-E8DC3C9A6C2D}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{92B33A97-9AC7-48FD-98DF-E8DC3C9A6C2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{92B33A97-9AC7-48FD-98DF-E8DC3C9A6C2D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{92B33A97-9AC7-48FD-98DF-E8DC3C9A6C2D}.Release|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{92B33A97-9AC7-48FD-98DF-E8DC3C9A6C2D}.Release|Any CPU.Build.0 = Debug|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {598D118B-F2E2-4852-8BA9-7B754CA38949}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
223
DualSonicFreqSearch.vbproj
Normal file
223
DualSonicFreqSearch.vbproj
Normal file
@ -0,0 +1,223 @@
|
||||
<?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>{92B33A97-9AC7-48FD-98DF-E8DC3C9A6C2D}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<StartupObject>DualSonicFreqSearch.My.MyApplication</StartupObject>
|
||||
<RootNamespace>DualSonicFreqSearch</RootNamespace>
|
||||
<AssemblyName>DualSonicFreqSearch</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>WindowsForms</MyType>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</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>DualSonicFreqSearch.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</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>DualSonicFreqSearch.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionCompare>Binary</OptionCompare>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionStrict>Off</OptionStrict>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionInfer>On</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>JOMT 아이콘.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=8.0.0.2, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.Extensions.DependencyInjection.Abstractions.8.0.2\lib\net462\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=8.0.0.2, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.Extensions.Logging.Abstractions.8.0.2\lib\net462\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MySql.Data, Version=8.0.20.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>C:\Program Files (x86)\MySQL\MySQL Connector Net 8.0.20\Assemblies\v4.5.2\MySql.Data.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MySqlConnector, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d33d3e53aa5f8c92, processorArchitecture=MSIL">
|
||||
<HintPath>packages\MySqlConnector.2.5.0\lib\net48\MySqlConnector.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Diagnostics.DiagnosticSource, Version=8.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>packages\System.Diagnostics.DiagnosticSource.8.0.1\lib\net462\System.Diagnostics.DiagnosticSource.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Transactions" />
|
||||
<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="ExcelModule.vb" />
|
||||
<Compile Include="frmDBInput.Designer.vb">
|
||||
<DependentUpon>frmDBInput.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="frmDBInput.vb" />
|
||||
<Compile Include="frmMySqlTest.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="frmMySqlTest.Designer.vb">
|
||||
<DependentUpon>frmMySqlTest.vb</DependentUpon>
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MySqlModule.vb" />
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Application.myapp</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</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="frmDBInput.resx">
|
||||
<DependentUpon>frmDBInput.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="frmMySqlTest.resx">
|
||||
<DependentUpon>frmMySqlTest.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" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<COMReference Include="Microsoft.Office.Core">
|
||||
<Guid>{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}</Guid>
|
||||
<VersionMajor>2</VersionMajor>
|
||||
<VersionMinor>5</VersionMinor>
|
||||
<Lcid>0</Lcid>
|
||||
<WrapperTool>primary</WrapperTool>
|
||||
<Isolated>False</Isolated>
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</COMReference>
|
||||
<COMReference Include="Microsoft.Office.Interop.Excel">
|
||||
<Guid>{00020813-0000-0000-C000-000000000046}</Guid>
|
||||
<VersionMajor>1</VersionMajor>
|
||||
<VersionMinor>7</VersionMinor>
|
||||
<Lcid>0</Lcid>
|
||||
<WrapperTool>primary</WrapperTool>
|
||||
<Isolated>False</Isolated>
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</COMReference>
|
||||
<COMReference Include="MSGrid">
|
||||
<Guid>{A8B3B723-0B5A-101B-B22E-00AA0037B2FC}</Guid>
|
||||
<VersionMajor>1</VersionMajor>
|
||||
<VersionMinor>0</VersionMinor>
|
||||
<Lcid>0</Lcid>
|
||||
<WrapperTool>tlbimp</WrapperTool>
|
||||
<Isolated>False</Isolated>
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</COMReference>
|
||||
<COMReference Include="StdType">
|
||||
<Guid>{BEF6E001-A874-101A-8BBA-00AA00300CAB}</Guid>
|
||||
<VersionMajor>2</VersionMajor>
|
||||
<VersionMinor>0</VersionMinor>
|
||||
<Lcid>0</Lcid>
|
||||
<WrapperTool>tlbimp</WrapperTool>
|
||||
<Isolated>False</Isolated>
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</COMReference>
|
||||
<COMReference Include="VBIDE">
|
||||
<Guid>{0002E157-0000-0000-C000-000000000046}</Guid>
|
||||
<VersionMajor>5</VersionMajor>
|
||||
<VersionMinor>3</VersionMinor>
|
||||
<Lcid>0</Lcid>
|
||||
<WrapperTool>primary</WrapperTool>
|
||||
<Isolated>False</Isolated>
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</COMReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="JOMT 아이콘.ico" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
</Project>
|
||||
292
ExcelModule.vb
Normal file
292
ExcelModule.vb
Normal file
@ -0,0 +1,292 @@
|
||||
Imports Excel = Microsoft.Office.Interop.Excel
|
||||
|
||||
Module ExcelModule
|
||||
Private xlApp As New Excel.Application '엑셀 응용프로그램의 변수.
|
||||
Private xlworkbook As Excel.Workbook
|
||||
Private xlworksheet As Excel.Worksheet
|
||||
Private xlRange As Excel.Range
|
||||
Public xlReadData(,) As Object
|
||||
|
||||
Private Enum data_set
|
||||
fre
|
||||
imp
|
||||
cap
|
||||
res
|
||||
cur
|
||||
cva
|
||||
gra
|
||||
r1
|
||||
r2
|
||||
r3
|
||||
r4
|
||||
r5
|
||||
r6
|
||||
r7
|
||||
r8
|
||||
r9
|
||||
r10
|
||||
|
||||
max
|
||||
End Enum
|
||||
|
||||
Private data_select(data_set.max) As String
|
||||
|
||||
Private Function OpenDBFile() As String
|
||||
Dim filePath As String
|
||||
|
||||
With frmMySqlTest.OpenFileDB
|
||||
.Title = "[JION MEDITECH] Select T/D DB File!"
|
||||
.InitialDirectory = "d:\"
|
||||
.Filter = "T/D DB Files | *.xlsx;*.xls;*.csv;"
|
||||
.Multiselect = False
|
||||
If .ShowDialog() = 0 Then
|
||||
.ShowDialog()
|
||||
End If
|
||||
End With
|
||||
|
||||
filePath = frmMySqlTest.OpenFileDB.FileName
|
||||
Return filePath
|
||||
|
||||
End Function
|
||||
|
||||
Public Function loadExcelDB() As Boolean
|
||||
Dim xlRowCnt, xlCollumnCnt As Integer
|
||||
Dim xlEndPosition As String
|
||||
Dim currRowCnt As Integer
|
||||
Dim filePath As String
|
||||
Dim dbcmd As String
|
||||
|
||||
Try
|
||||
filePath = OpenDBFile()
|
||||
If filePath = Nothing Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
'엑셀 창을 띄울것인지 여부 체크
|
||||
xlApp = DirectCast(CreateObject("Excel.Application"), Excel.Application)
|
||||
xlApp.Visible = False
|
||||
xlworkbook = xlApp.Workbooks.Open(filePath)
|
||||
xlworksheet = xlworkbook.Sheets(1)
|
||||
|
||||
'xlRange = xlworksheet.Range("A1", Type.Missing)
|
||||
xlRowCnt = xlworksheet.Range("A1").CurrentRegion.Rows.Count
|
||||
xlCollumnCnt = xlworksheet.Range("A1").CurrentRegion.Columns.Count
|
||||
xlEndPosition = xlworksheet.Range("A1").CurrentRegion.Address
|
||||
|
||||
xlRange = xlworksheet.Range(xlEndPosition)
|
||||
|
||||
'Retrieve the data from the range.
|
||||
ReDim xlReadData(xlRowCnt, xlCollumnCnt)
|
||||
xlReadData = xlRange.Value
|
||||
|
||||
xlworkbook.Close()
|
||||
xlApp.Quit()
|
||||
|
||||
currRowCnt = frmMySqlTest.DataGridView.Rows.Count
|
||||
|
||||
If currRowCnt > 1 Then
|
||||
For cnt = 1 To currRowCnt - 1
|
||||
frmMySqlTest.DataGridView.Rows.RemoveAt(0)
|
||||
Next
|
||||
End If
|
||||
|
||||
For cnt = 2 To xlRowCnt
|
||||
|
||||
dbcmd = "SELECT PV_Frequency,PV_Impedance,PV_Capacitance,PV_Resistance,QC_Current,QC_Capacitor,QC_Grade,QC_R1Value,QC_R2Value,QC_R3Value,QC_R4Value,QC_R5Value,QC_R6Value,QC_R7Value,QC_R8Value,QC_R9Value,QC_R10Value FROM jomtTesterDB.jomtCartridgeTbl WHERE PV_SN = '" & xlReadData(cnt, 1) & "'"
|
||||
|
||||
If DBQueryReader(dbcmd) Then
|
||||
data_select(data_set.fre) = sqlDataQuery(0)
|
||||
data_select(data_set.imp) = sqlDataQuery(1)
|
||||
data_select(data_set.cap) = sqlDataQuery(2)
|
||||
data_select(data_set.res) = sqlDataQuery(3)
|
||||
data_select(data_set.cur) = sqlDataQuery(4)
|
||||
data_select(data_set.cva) = sqlDataQuery(5)
|
||||
data_select(data_set.gra) = sqlDataQuery(6)
|
||||
data_select(data_set.r1) = sqlDataQuery(7)
|
||||
data_select(data_set.r2) = sqlDataQuery(8)
|
||||
data_select(data_set.r3) = sqlDataQuery(9)
|
||||
data_select(data_set.r4) = sqlDataQuery(10)
|
||||
data_select(data_set.r5) = sqlDataQuery(11)
|
||||
data_select(data_set.r6) = sqlDataQuery(12)
|
||||
data_select(data_set.r7) = sqlDataQuery(13)
|
||||
data_select(data_set.r8) = sqlDataQuery(14)
|
||||
data_select(data_set.r9) = sqlDataQuery(15)
|
||||
data_select(data_set.r10) = sqlDataQuery(16)
|
||||
|
||||
Else
|
||||
data_select(data_set.fre) = "0"
|
||||
data_select(data_set.imp) = "0"
|
||||
data_select(data_set.cap) = "0"
|
||||
data_select(data_set.res) = "0"
|
||||
data_select(data_set.cur) = "0"
|
||||
data_select(data_set.cva) = "0"
|
||||
data_select(data_set.gra) = "0"
|
||||
data_select(data_set.r1) = "0"
|
||||
data_select(data_set.r2) = "0"
|
||||
data_select(data_set.r3) = "0"
|
||||
data_select(data_set.r4) = "0"
|
||||
data_select(data_set.r5) = "0"
|
||||
data_select(data_set.r6) = "0"
|
||||
data_select(data_set.r7) = "0"
|
||||
data_select(data_set.r8) = "0"
|
||||
data_select(data_set.r9) = "0"
|
||||
data_select(data_set.r10) = "0"
|
||||
End If
|
||||
|
||||
frmMySqlTest.DataGridView.Rows.Add(xlReadData(cnt, 1), data_select(data_set.fre), data_select(data_set.imp), data_select(data_set.cap), data_select(data_set.res), data_select(data_set.cur), data_select(data_set.cva), data_select(data_set.gra), data_select(data_set.r1), data_select(data_set.r2), data_select(data_set.r3), data_select(data_set.r4), data_select(data_set.r5), data_select(data_set.r6), data_select(data_set.r7), data_select(data_set.r8), data_select(data_set.r9), data_select(data_set.r10))
|
||||
|
||||
Next
|
||||
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
MsgBox("MySqlCommand Error:" + vbCrLf + Err.Description)
|
||||
xlworkbook.Close()
|
||||
xlApp.Quit()
|
||||
Return False
|
||||
End Try
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
Public Sub showDataGridViewContent(ByVal data_grid As DataGridView)
|
||||
Dim columnIndex As Integer = 1
|
||||
Dim rowIndex As Integer = 1
|
||||
Dim colIndex As Integer = 1
|
||||
Try
|
||||
|
||||
xlworkbook = xlApp.Workbooks.Add
|
||||
xlworksheet = xlworkbook.Worksheets(1)
|
||||
|
||||
xlApp.Visible = False
|
||||
xlApp.Visible = True
|
||||
|
||||
xlworksheet.Cells.Clear()
|
||||
|
||||
For Each col As DataGridViewColumn In data_grid.Columns
|
||||
xlworksheet.Cells(1, columnIndex) = col.HeaderText
|
||||
columnIndex += 1
|
||||
Next
|
||||
|
||||
For Each row As DataGridViewRow In data_grid.Rows
|
||||
rowIndex += 1
|
||||
colIndex = 1
|
||||
|
||||
For Each cell As DataGridViewCell In row.Cells
|
||||
|
||||
xlworksheet.Cells(rowIndex, colIndex) = cell.Value
|
||||
colIndex += 1
|
||||
|
||||
Next
|
||||
|
||||
Next
|
||||
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message & ex.ToString, MsgBoxStyle.Critical, "오류")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Function loadIQCExcelDB() As Boolean
|
||||
Dim xlRowCnt, xlCollumnCnt As Integer
|
||||
Dim xlEndPosition As String
|
||||
Dim currRowCnt As Integer
|
||||
Dim filePath As String
|
||||
|
||||
Try
|
||||
filePath = OpenDBFile()
|
||||
'filePath = "d:\Excel_Spl.xlsx"
|
||||
|
||||
'엑셀 창을 띄울것인지 여부 체크
|
||||
xlApp = DirectCast(CreateObject("Excel.Application"), Excel.Application)
|
||||
xlApp.Visible = False
|
||||
xlworkbook = xlApp.Workbooks.Open(filePath)
|
||||
xlworksheet = xlworkbook.Sheets(1)
|
||||
|
||||
'xlRange = xlworksheet.Range("A1", Type.Missing)
|
||||
xlRowCnt = xlworksheet.Range("A1").CurrentRegion.Rows.Count
|
||||
xlCollumnCnt = xlworksheet.Range("A1").CurrentRegion.Columns.Count
|
||||
xlEndPosition = xlworksheet.Range("A1").CurrentRegion.Address
|
||||
|
||||
xlRange = xlworksheet.Range(xlEndPosition)
|
||||
|
||||
'Retrieve the data from the range.
|
||||
ReDim xlReadData(xlRowCnt, xlCollumnCnt)
|
||||
xlReadData = xlRange.Value
|
||||
|
||||
xlworkbook.Close()
|
||||
xlApp.Quit()
|
||||
|
||||
currRowCnt = frmMySqlTest.DataGridView.Rows.Count
|
||||
|
||||
If currRowCnt > 1 Then
|
||||
For cnt = 1 To currRowCnt - 1
|
||||
frmMySqlTest.DataGridView.Rows.RemoveAt(0)
|
||||
Next
|
||||
End If
|
||||
|
||||
For cnt = 2 To xlRowCnt
|
||||
frmMySqlTest.DataGridView.Rows.Add(xlReadData(cnt, 1), xlReadData(cnt, 2), xlReadData(cnt, 3), xlReadData(cnt, 4), xlReadData(cnt, 5), xlReadData(cnt, 6), Format(xlReadData(cnt, 7), "0.000"), Format(xlReadData(cnt, 8), "0.000"), Format(xlReadData(cnt, 9), "0.000"), Format(xlReadData(cnt, 10), "0.000"), Format(xlReadData(cnt, 11), "0.000"), Format(xlReadData(cnt, 12), "0.000"))
|
||||
Next
|
||||
|
||||
''frmMySqlTest.txbPVdate.Text = xlReadData(2, 2)
|
||||
|
||||
''For cnt = 4 To xlRowCnt
|
||||
'' frmMySqlTest.DataGridView.Rows.Add(xlReadData(cnt, 1), xlReadData(cnt, 2), Val(xlReadData(cnt, 3)) * 1000, xlReadData(cnt, 4), xlReadData(cnt, 5), xlReadData(cnt, 6), xlReadData(cnt, 7))
|
||||
''Next
|
||||
|
||||
|
||||
|
||||
|
||||
''frmMySqlTest.DataGridView.SelectionMode = DataGridViewSelectionMode.FullRowSelect
|
||||
''frmMySqlTest.DataGridView.Columns(0).Width = 200
|
||||
|
||||
''frmMySqlTest.DataGridView.Columns(0).Frozen = True ' 틀 고정
|
||||
''frmMySqlTest.DataGridView.Columns(0).DividerWidth = 2 ' 틀고정 나누기 bar
|
||||
''frmMySqlTest.DataGridView.MultiSelect = False ' multiselect 불가
|
||||
''frmMySqlTest.DataGridView.EnableHeadersVisualStyles = False ' 컬럼 header 세팅
|
||||
|
||||
''Dim colHeader As New DataGridViewCellStyle
|
||||
|
||||
''colHeader.BackColor = Color.FromArgb(176, 251, 164)
|
||||
''colHeader.Font = New Font("Gulim", 9, FontStyle.Bold)
|
||||
''frmMySqlTest.DataGridView.ColumnHeadersDefaultCellStyle = colHeader ' 컬럼헤더는 다르게 세팅
|
||||
|
||||
'' '' 컬럼 클릭해서 소팅안되게 설정
|
||||
'' For Int() i = 0; i < this.PLA.Columns.Count; i++) 'DBGrid --> DataGridView
|
||||
''{
|
||||
'' this.PLA.Columns[i].SortMode = DataGridViewColumnSortMode.NotSortable;
|
||||
''}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
''frmMySqlTest.DataGridView
|
||||
''frmMySqlTest.DataGridView.Rows.Insert("1", "1", "1", "1", "1", "1")
|
||||
|
||||
|
||||
''frmMySqlTest.DataGridView.Columns.Add("1", "1")
|
||||
''frmMySqlTest.DataGridView.Columns.Add("2", "2")
|
||||
''frmMySqlTest.DataGridView.Columns.Add("3", "3")
|
||||
''frmMySqlTest.DataGridView.Columns.Add("4", "4")
|
||||
''frmMySqlTest.DataGridView.Columns.Add("5", "5")
|
||||
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
MsgBox("MySqlCommand Error:" + vbCrLf + Err.Description)
|
||||
xlworkbook.Close()
|
||||
xlApp.Quit()
|
||||
Return False
|
||||
End Try
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
End Module
|
||||
BIN
JOMT 아이콘.ico
Normal file
BIN
JOMT 아이콘.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 116 KiB |
44
My Project/Application.Designer.vb
generated
Normal file
44
My Project/Application.Designer.vb
generated
Normal file
@ -0,0 +1,44 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' 이 코드는 도구를 사용하여 생성되었습니다.
|
||||
' 런타임 버전:4.0.30319.42000
|
||||
'
|
||||
' 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면
|
||||
' 이러한 변경 내용이 손실됩니다.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My
|
||||
|
||||
'참고: 자동으로 생성되므로 직접 이 파일을 수정하지 마세요. 변경할 사항이 있거나
|
||||
' 파일에서 빌드 오류가 발생하는 경우 프로젝트 디자이너로
|
||||
' 이동([프로젝트 속성]으로 이동하거나 솔루션 탐색기에서 My Project 노드를
|
||||
'두 번 클릭)한 다음 [애플리케이션] 탭에서 변경하세요.
|
||||
'
|
||||
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.DualSonicFreqSearch.frmMySqlTest
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
||||
Protected Overrides Function OnInitialize(ByVal commandLineArgs As System.Collections.ObjectModel.ReadOnlyCollection(Of String)) As Boolean
|
||||
Me.MinimumSplashScreenDisplayTime = 0
|
||||
Return MyBase.OnInitialize(commandLineArgs)
|
||||
End Function
|
||||
End Class
|
||||
End Namespace
|
||||
10
My Project/Application.myapp
Normal file
10
My Project/Application.myapp
Normal file
@ -0,0 +1,10 @@
|
||||
<?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>frmMySqlTest</MainForm>
|
||||
<SingleInstance>false</SingleInstance>
|
||||
<ShutdownMode>0</ShutdownMode>
|
||||
<EnableVisualStyles>true</EnableVisualStyles>
|
||||
<AuthenticationMode>0</AuthenticationMode>
|
||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||
</MyApplicationData>
|
||||
35
My Project/AssemblyInfo.vb
Normal file
35
My Project/AssemblyInfo.vb
Normal file
@ -0,0 +1,35 @@
|
||||
Imports System
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
' 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해
|
||||
' 제어됩니다. 어셈블리와 관련된 정보를 수정하려면
|
||||
' 이러한 특성 값을 변경하세요.
|
||||
|
||||
' 어셈블리 특성 값을 검토합니다.
|
||||
|
||||
<Assembly: AssemblyTitle("db_test1")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("")>
|
||||
<Assembly: AssemblyProduct("db_test1")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2020")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
'이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다.
|
||||
<Assembly: Guid("27af41f8-0dd5-4702-ba20-5a5a083a327f")>
|
||||
|
||||
' 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다.
|
||||
'
|
||||
' 주 버전
|
||||
' 부 버전
|
||||
' 빌드 번호
|
||||
' 수정 버전
|
||||
'
|
||||
' 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
|
||||
' 기본값으로 할 수 있습니다.
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.0.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||
63
My Project/Resources.Designer.vb
generated
Normal file
63
My Project/Resources.Designer.vb
generated
Normal file
@ -0,0 +1,63 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' 이 코드는 도구를 사용하여 생성되었습니다.
|
||||
' 런타임 버전:4.0.30319.42000
|
||||
'
|
||||
' 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면
|
||||
' 이러한 변경 내용이 손실됩니다.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
Imports System
|
||||
|
||||
Namespace My.Resources
|
||||
|
||||
'이 클래스는 ResGen 또는 Visual Studio와 같은 도구를 통해 StronglyTypedResourceBuilder
|
||||
'클래스에서 자동으로 생성되었습니다.
|
||||
'멤버를 추가하거나 제거하려면 .ResX 파일을 편집한 다음 /str 옵션을 사용하여 ResGen을
|
||||
'다시 실행하거나 VS 프로젝트를 다시 빌드하십시오.
|
||||
'''<summary>
|
||||
''' 지역화된 문자열 등을 찾기 위한 강력한 형식의 리소스 클래스입니다.
|
||||
'''</summary>
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.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>
|
||||
''' 이 클래스에서 사용하는 캐시된 ResourceManager 인스턴스를 반환합니다.
|
||||
'''</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("DualSonicFreqSearch.Resources", GetType(Resources).Assembly)
|
||||
resourceMan = temp
|
||||
End If
|
||||
Return resourceMan
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' 이 강력한 형식의 리소스 클래스를 사용하여 모든 리소스 조회에 대해 현재 스레드의 CurrentUICulture 속성을
|
||||
''' 재정의합니다.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||
Get
|
||||
Return resourceCulture
|
||||
End Get
|
||||
Set
|
||||
resourceCulture = value
|
||||
End Set
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
117
My Project/Resources.resx
Normal file
117
My Project/Resources.resx
Normal 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>
|
||||
73
My Project/Settings.Designer.vb
generated
Normal file
73
My Project/Settings.Designer.vb
generated
Normal file
@ -0,0 +1,73 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' 이 코드는 도구를 사용하여 생성되었습니다.
|
||||
' 런타임 버전:4.0.30319.42000
|
||||
'
|
||||
' 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면
|
||||
' 이러한 변경 내용이 손실됩니다.
|
||||
' </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", "17.14.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 자동 저장 기능"
|
||||
#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(sender As Global.System.Object, 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.DualSonicFreqSearch.My.MySettings
|
||||
Get
|
||||
Return Global.DualSonicFreqSearch.My.MySettings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
7
My Project/Settings.settings
Normal file
7
My Project/Settings.settings
Normal 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>
|
||||
127
MySqlModule.vb
Normal file
127
MySqlModule.vb
Normal file
@ -0,0 +1,127 @@
|
||||
Imports MySql.Data ' 데이터베이스 연동을 위한 네임스페이스 추가
|
||||
Imports MySql.Data.MySqlClient
|
||||
Imports MySqlConnector ' MYSQL Server용 네임스페이스 추가
|
||||
Module MySqlModule
|
||||
Private Const ServerIP As String = "192.168.0.250"
|
||||
Private Const DataBaseName As String = "jomtTesterDB"
|
||||
Private Const UserName As String = "root"
|
||||
Private Const Password As String = "JOMT1646db!!"
|
||||
Private Const Conn As String = "Server=" + ServerIP + ";DataBase=" + DataBaseName + ";user=" + UserName + ";password=" + Password + ";"
|
||||
|
||||
Private sqlCon As New MySqlConnection(Conn)
|
||||
Private sqlCmd As New MySqlCommand()
|
||||
Private sqlData As MySqlDataReader
|
||||
Public sqlDataQueryScalar As Object
|
||||
Public sqlDataQuery() As Object
|
||||
|
||||
Private Function DBOpen() As Boolean
|
||||
Try
|
||||
If sqlCon.State <> ConnectionState.Open Then
|
||||
sqlCon.Open()
|
||||
End If
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
MsgBox("MySqlCommand Error:" + vbCrLf + Err.Description)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Function DBClose() As Boolean
|
||||
Try
|
||||
If sqlCon.State = ConnectionState.Open Then
|
||||
sqlCon.Close()
|
||||
End If
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
MsgBox("MySqlCommand Error:" + vbCrLf + Err.Description)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
Public Function DBCommand(cmdStr As String) As Boolean
|
||||
Try
|
||||
sqlCon.Open()
|
||||
sqlCmd.CommandText = "USE jomtTesterDB;"
|
||||
sqlCmd.Connection = sqlCon
|
||||
sqlCmd.ExecuteNonQuery()
|
||||
|
||||
sqlCmd.CommandText = cmdStr
|
||||
sqlCmd.Connection = sqlCon
|
||||
sqlCmd.ExecuteNonQuery()
|
||||
|
||||
sqlCon.Close()
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
MsgBox("MySqlCommand Error:" + vbCrLf + Err.Description)
|
||||
sqlCon.Close()
|
||||
Return False
|
||||
End Try
|
||||
End
|
||||
End Function
|
||||
|
||||
Public Function DBQueryScalar(cmdStr As String) As String
|
||||
Try
|
||||
sqlCon.Open()
|
||||
sqlCmd.CommandText = "USE jomtTesterDB;"
|
||||
sqlCmd.Connection = sqlCon
|
||||
sqlCmd.ExecuteNonQuery()
|
||||
|
||||
sqlCmd.CommandText = cmdStr
|
||||
sqlCmd.Connection = sqlCon
|
||||
sqlDataQueryScalar = sqlCmd.ExecuteScalar()
|
||||
|
||||
sqlCon.Close()
|
||||
|
||||
Return sqlDataQueryScalar
|
||||
Catch ex As Exception
|
||||
MsgBox("MySqlCommand Error:" + vbCrLf + Err.Description)
|
||||
sqlCon.Close()
|
||||
Return False
|
||||
End Try
|
||||
End
|
||||
End Function
|
||||
|
||||
Public Function DBQueryReader(cmdStr As String) As Integer
|
||||
Dim FieldCount As Integer
|
||||
Dim QueryCount As ULong
|
||||
Dim initRun As Boolean = True
|
||||
|
||||
Try
|
||||
DBOpen()
|
||||
|
||||
sqlCmd.CommandText = "USE jomtTesterDB;"
|
||||
sqlCmd.Connection = sqlCon
|
||||
sqlCmd.ExecuteNonQuery()
|
||||
|
||||
sqlCmd.CommandText = cmdStr
|
||||
sqlCmd.Connection = sqlCon
|
||||
sqlData = sqlCmd.ExecuteReader
|
||||
|
||||
FieldCount = sqlData.FieldCount
|
||||
|
||||
While (sqlData.Read())
|
||||
If initRun Then
|
||||
ReDim sqlDataQuery(FieldCount - 1)
|
||||
initRun = False
|
||||
Else
|
||||
ReDim Preserve sqlDataQuery(UBound(sqlDataQuery) + FieldCount)
|
||||
End If
|
||||
|
||||
For cnt = 0 To FieldCount - 1
|
||||
sqlDataQuery(QueryCount) = sqlData.GetValue(cnt).ToString
|
||||
QueryCount += 1
|
||||
Next
|
||||
End While
|
||||
|
||||
DBClose()
|
||||
Return QueryCount
|
||||
|
||||
Catch ex As Exception
|
||||
'MsgBox("MySqlCommand Error:" + vbCrLf + Err.Description)
|
||||
If sqlCon.State = ConnectionState.Open Then sqlCon.Close()
|
||||
Return 0
|
||||
End Try
|
||||
End
|
||||
End Function
|
||||
|
||||
End Module
|
||||
154
frmDBInput.Designer.vb
generated
Normal file
154
frmDBInput.Designer.vb
generated
Normal file
@ -0,0 +1,154 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class frmDBInput
|
||||
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 Form 디자이너에 필요합니다.
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'참고: 다음 프로시저는 Windows Form 디자이너에 필요합니다.
|
||||
'수정하려면 Windows Form 디자이너를 사용하십시오.
|
||||
'코드 편집기에서는 수정하지 마세요.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmDBInput))
|
||||
Me.Label6 = New System.Windows.Forms.Label()
|
||||
Me.txbCurrent = New System.Windows.Forms.TextBox()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.txbDateTime = New System.Windows.Forms.TextBox()
|
||||
Me.Label2 = New System.Windows.Forms.Label()
|
||||
Me.txbSN = New System.Windows.Forms.TextBox()
|
||||
Me.Button1 = New System.Windows.Forms.Button()
|
||||
Me.Label3 = New System.Windows.Forms.Label()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'Label6
|
||||
'
|
||||
Me.Label6.AutoSize = True
|
||||
Me.Label6.Font = New System.Drawing.Font("굴림", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(129, Byte))
|
||||
Me.Label6.Location = New System.Drawing.Point(52, 198)
|
||||
Me.Label6.Name = "Label6"
|
||||
Me.Label6.Size = New System.Drawing.Size(70, 21)
|
||||
Me.Label6.TabIndex = 19
|
||||
Me.Label6.Text = "Current"
|
||||
'
|
||||
'txbCurrent
|
||||
'
|
||||
Me.txbCurrent.Font = New System.Drawing.Font("함초롬바탕", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(129, Byte))
|
||||
Me.txbCurrent.Location = New System.Drawing.Point(194, 195)
|
||||
Me.txbCurrent.Name = "txbCurrent"
|
||||
Me.txbCurrent.Size = New System.Drawing.Size(262, 35)
|
||||
Me.txbCurrent.TabIndex = 18
|
||||
Me.txbCurrent.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
|
||||
'
|
||||
'Label1
|
||||
'
|
||||
Me.Label1.AutoSize = True
|
||||
Me.Label1.Font = New System.Drawing.Font("굴림", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(129, Byte))
|
||||
Me.Label1.Location = New System.Drawing.Point(52, 119)
|
||||
Me.Label1.Name = "Label1"
|
||||
Me.Label1.Size = New System.Drawing.Size(94, 21)
|
||||
Me.Label1.TabIndex = 17
|
||||
Me.Label1.Text = "측정일자"
|
||||
'
|
||||
'txbDateTime
|
||||
'
|
||||
Me.txbDateTime.Font = New System.Drawing.Font("함초롬바탕", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(129, Byte))
|
||||
Me.txbDateTime.Location = New System.Drawing.Point(194, 116)
|
||||
Me.txbDateTime.Name = "txbDateTime"
|
||||
Me.txbDateTime.Size = New System.Drawing.Size(262, 35)
|
||||
Me.txbDateTime.TabIndex = 16
|
||||
Me.txbDateTime.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
|
||||
'
|
||||
'Label2
|
||||
'
|
||||
Me.Label2.AutoSize = True
|
||||
Me.Label2.Font = New System.Drawing.Font("굴림", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(129, Byte))
|
||||
Me.Label2.Location = New System.Drawing.Point(52, 45)
|
||||
Me.Label2.Name = "Label2"
|
||||
Me.Label2.Size = New System.Drawing.Size(105, 21)
|
||||
Me.Label2.TabIndex = 21
|
||||
Me.Label2.Text = "TD 시리얼"
|
||||
'
|
||||
'txbSN
|
||||
'
|
||||
Me.txbSN.Font = New System.Drawing.Font("함초롬바탕", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(129, Byte))
|
||||
Me.txbSN.Location = New System.Drawing.Point(194, 42)
|
||||
Me.txbSN.Name = "txbSN"
|
||||
Me.txbSN.Size = New System.Drawing.Size(262, 35)
|
||||
Me.txbSN.TabIndex = 20
|
||||
Me.txbSN.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
|
||||
'
|
||||
'Button1
|
||||
'
|
||||
Me.Button1.Font = New System.Drawing.Font("굴림", 24.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(129, Byte))
|
||||
Me.Button1.Location = New System.Drawing.Point(56, 277)
|
||||
Me.Button1.Name = "Button1"
|
||||
Me.Button1.Size = New System.Drawing.Size(400, 94)
|
||||
Me.Button1.TabIndex = 22
|
||||
Me.Button1.Text = "입력"
|
||||
Me.Button1.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Label3
|
||||
'
|
||||
Me.Label3.AutoSize = True
|
||||
Me.Label3.Font = New System.Drawing.Font("굴림", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(129, Byte))
|
||||
Me.Label3.Location = New System.Drawing.Point(191, 154)
|
||||
Me.Label3.Name = "Label3"
|
||||
Me.Label3.Size = New System.Drawing.Size(210, 16)
|
||||
Me.Label3.TabIndex = 24
|
||||
Me.Label3.Text = "(예시 : 2020-05-26 15:11:11)"
|
||||
'
|
||||
'frmDBInput
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 12.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(517, 392)
|
||||
Me.Controls.Add(Me.Label3)
|
||||
Me.Controls.Add(Me.Button1)
|
||||
Me.Controls.Add(Me.Label2)
|
||||
Me.Controls.Add(Me.txbSN)
|
||||
Me.Controls.Add(Me.Label6)
|
||||
Me.Controls.Add(Me.txbCurrent)
|
||||
Me.Controls.Add(Me.Label1)
|
||||
Me.Controls.Add(Me.txbDateTime)
|
||||
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
|
||||
Me.Name = "frmDBInput"
|
||||
Me.Text = "DB INPUT"
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents Label6 As Label
|
||||
Friend WithEvents txbCurrent As TextBox
|
||||
Friend WithEvents Label1 As Label
|
||||
Friend WithEvents txbDateTime As TextBox
|
||||
Friend WithEvents Label2 As Label
|
||||
Friend WithEvents txbSN As TextBox
|
||||
Friend WithEvents Button1 As Button
|
||||
|
||||
|
||||
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
||||
Dim cmd As String
|
||||
|
||||
cmd = "update jomtCartridgeTbl set QC_DateTime = '" + txbDateTime.Text + "',QC_Current = '" + txbCurrent.Text + "' where PV_SN = '" + txbSN.Text + "';"
|
||||
DBCommand(cmd)
|
||||
|
||||
txbDateTime.Clear()
|
||||
txbCurrent.Clear()
|
||||
txbSN.Clear()
|
||||
End Sub
|
||||
Friend WithEvents Label3 As Label
|
||||
End Class
|
||||
2110
frmDBInput.resx
Normal file
2110
frmDBInput.resx
Normal file
File diff suppressed because it is too large
Load Diff
1
frmDBInput.vb
Normal file
1
frmDBInput.vb
Normal file
@ -0,0 +1 @@
|
||||
|
||||
260
frmMySqlTest.Designer.vb
generated
Normal file
260
frmMySqlTest.Designer.vb
generated
Normal file
@ -0,0 +1,260 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||
Partial Class frmMySqlTest
|
||||
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 Form 디자이너에 필요합니다.
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'참고: 다음 프로시저는 Windows Form 디자이너에 필요합니다.
|
||||
'수정하려면 Windows Form 디자이너를 사용하십시오.
|
||||
'코드 편집기에서는 수정하지 마세요.
|
||||
<System.Diagnostics.DebuggerStepThrough()>
|
||||
Private Sub InitializeComponent()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmMySqlTest))
|
||||
Me.btnReadDB = New System.Windows.Forms.Button()
|
||||
Me.txbPV_SN = New System.Windows.Forms.TextBox()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.OpenFileDB = New System.Windows.Forms.OpenFileDialog()
|
||||
Me.Button3 = New System.Windows.Forms.Button()
|
||||
Me.DataGridView = New System.Windows.Forms.DataGridView()
|
||||
Me.Button5 = New System.Windows.Forms.Button()
|
||||
Me.gb_tdfront = New System.Windows.Forms.GroupBox()
|
||||
Me.rdb_no = New System.Windows.Forms.RadioButton()
|
||||
Me.rdb_dith = New System.Windows.Forms.RadioButton()
|
||||
Me.rdb_diti = New System.Windows.Forms.RadioButton()
|
||||
Me.rdb_dit = New System.Windows.Forms.RadioButton()
|
||||
Me.ckb_clear = New System.Windows.Forms.CheckBox()
|
||||
Me.ckb_upper = New System.Windows.Forms.CheckBox()
|
||||
Me.Button1 = New System.Windows.Forms.Button()
|
||||
Me.ckb_fail_delete = New System.Windows.Forms.CheckBox()
|
||||
CType(Me.DataGridView, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.gb_tdfront.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'btnReadDB
|
||||
'
|
||||
Me.btnReadDB.Font = New System.Drawing.Font("함초롬바탕", 21.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(129, Byte))
|
||||
Me.btnReadDB.Location = New System.Drawing.Point(502, 679)
|
||||
Me.btnReadDB.Name = "btnReadDB"
|
||||
Me.btnReadDB.Size = New System.Drawing.Size(216, 53)
|
||||
Me.btnReadDB.TabIndex = 0
|
||||
Me.btnReadDB.Text = "읽기"
|
||||
Me.btnReadDB.UseVisualStyleBackColor = True
|
||||
'
|
||||
'txbPV_SN
|
||||
'
|
||||
Me.txbPV_SN.Font = New System.Drawing.Font("함초롬바탕", 26.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(129, Byte))
|
||||
Me.txbPV_SN.Location = New System.Drawing.Point(192, 679)
|
||||
Me.txbPV_SN.Name = "txbPV_SN"
|
||||
Me.txbPV_SN.Size = New System.Drawing.Size(304, 53)
|
||||
Me.txbPV_SN.TabIndex = 1
|
||||
Me.txbPV_SN.Text = "DIT205001"
|
||||
Me.txbPV_SN.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
|
||||
'
|
||||
'Label1
|
||||
'
|
||||
Me.Label1.AutoSize = True
|
||||
Me.Label1.Font = New System.Drawing.Font("함초롬바탕", 21.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(129, Byte))
|
||||
Me.Label1.Location = New System.Drawing.Point(5, 686)
|
||||
Me.Label1.Name = "Label1"
|
||||
Me.Label1.Size = New System.Drawing.Size(186, 38)
|
||||
Me.Label1.TabIndex = 2
|
||||
Me.Label1.Text = "TD S/N 검색"
|
||||
'
|
||||
'OpenFileDB
|
||||
'
|
||||
Me.OpenFileDB.Filter = """Excel Files(xlsx,xls,xlw)|*.xlsx;*.xls;*.xlw"""
|
||||
'
|
||||
'Button3
|
||||
'
|
||||
Me.Button3.Font = New System.Drawing.Font("함초롬바탕", 21.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(129, Byte))
|
||||
Me.Button3.Location = New System.Drawing.Point(14, 738)
|
||||
Me.Button3.Name = "Button3"
|
||||
Me.Button3.Size = New System.Drawing.Size(482, 75)
|
||||
Me.Button3.TabIndex = 20
|
||||
Me.Button3.Text = "DB 열기"
|
||||
Me.Button3.UseVisualStyleBackColor = True
|
||||
'
|
||||
'DataGridView
|
||||
'
|
||||
Me.DataGridView.AllowUserToAddRows = False
|
||||
Me.DataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
|
||||
Me.DataGridView.Location = New System.Drawing.Point(12, 12)
|
||||
Me.DataGridView.Name = "DataGridView"
|
||||
Me.DataGridView.RowTemplate.Height = 23
|
||||
Me.DataGridView.Size = New System.Drawing.Size(1496, 647)
|
||||
Me.DataGridView.TabIndex = 21
|
||||
'
|
||||
'Button5
|
||||
'
|
||||
Me.Button5.Font = New System.Drawing.Font("함초롬바탕", 21.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(129, Byte))
|
||||
Me.Button5.Location = New System.Drawing.Point(502, 738)
|
||||
Me.Button5.Name = "Button5"
|
||||
Me.Button5.Size = New System.Drawing.Size(494, 75)
|
||||
Me.Button5.TabIndex = 23
|
||||
Me.Button5.Text = "현 데이터 엑셀화"
|
||||
Me.Button5.UseVisualStyleBackColor = True
|
||||
'
|
||||
'gb_tdfront
|
||||
'
|
||||
Me.gb_tdfront.Controls.Add(Me.rdb_no)
|
||||
Me.gb_tdfront.Controls.Add(Me.rdb_dith)
|
||||
Me.gb_tdfront.Controls.Add(Me.rdb_diti)
|
||||
Me.gb_tdfront.Controls.Add(Me.rdb_dit)
|
||||
Me.gb_tdfront.Font = New System.Drawing.Font("함초롬바탕", 20.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(129, Byte))
|
||||
Me.gb_tdfront.Location = New System.Drawing.Point(1002, 665)
|
||||
Me.gb_tdfront.Name = "gb_tdfront"
|
||||
Me.gb_tdfront.Size = New System.Drawing.Size(270, 148)
|
||||
Me.gb_tdfront.TabIndex = 24
|
||||
Me.gb_tdfront.TabStop = False
|
||||
Me.gb_tdfront.Text = "T/D 앞자리"
|
||||
'
|
||||
'rdb_no
|
||||
'
|
||||
Me.rdb_no.AutoSize = True
|
||||
Me.rdb_no.Font = New System.Drawing.Font("함초롬바탕", 21.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(129, Byte))
|
||||
Me.rdb_no.Location = New System.Drawing.Point(145, 83)
|
||||
Me.rdb_no.Name = "rdb_no"
|
||||
Me.rdb_no.Size = New System.Drawing.Size(91, 42)
|
||||
Me.rdb_no.TabIndex = 3
|
||||
Me.rdb_no.Text = "없음"
|
||||
Me.rdb_no.UseVisualStyleBackColor = True
|
||||
'
|
||||
'rdb_dith
|
||||
'
|
||||
Me.rdb_dith.AutoSize = True
|
||||
Me.rdb_dith.Font = New System.Drawing.Font("함초롬바탕", 21.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(129, Byte))
|
||||
Me.rdb_dith.Location = New System.Drawing.Point(16, 85)
|
||||
Me.rdb_dith.Name = "rdb_dith"
|
||||
Me.rdb_dith.Size = New System.Drawing.Size(105, 42)
|
||||
Me.rdb_dith.TabIndex = 2
|
||||
Me.rdb_dith.Text = "DITH"
|
||||
Me.rdb_dith.UseVisualStyleBackColor = True
|
||||
'
|
||||
'rdb_diti
|
||||
'
|
||||
Me.rdb_diti.AutoSize = True
|
||||
Me.rdb_diti.Checked = True
|
||||
Me.rdb_diti.Font = New System.Drawing.Font("함초롬바탕", 21.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(129, Byte))
|
||||
Me.rdb_diti.Location = New System.Drawing.Point(145, 42)
|
||||
Me.rdb_diti.Name = "rdb_diti"
|
||||
Me.rdb_diti.Size = New System.Drawing.Size(93, 42)
|
||||
Me.rdb_diti.TabIndex = 1
|
||||
Me.rdb_diti.TabStop = True
|
||||
Me.rdb_diti.Text = "DITI"
|
||||
Me.rdb_diti.UseVisualStyleBackColor = True
|
||||
'
|
||||
'rdb_dit
|
||||
'
|
||||
Me.rdb_dit.AutoSize = True
|
||||
Me.rdb_dit.Font = New System.Drawing.Font("함초롬바탕", 21.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(129, Byte))
|
||||
Me.rdb_dit.Location = New System.Drawing.Point(16, 42)
|
||||
Me.rdb_dit.Name = "rdb_dit"
|
||||
Me.rdb_dit.Size = New System.Drawing.Size(84, 42)
|
||||
Me.rdb_dit.TabIndex = 0
|
||||
Me.rdb_dit.Text = "DIT"
|
||||
Me.rdb_dit.UseVisualStyleBackColor = True
|
||||
'
|
||||
'ckb_clear
|
||||
'
|
||||
Me.ckb_clear.AutoSize = True
|
||||
Me.ckb_clear.Font = New System.Drawing.Font("함초롬바탕", 20.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(129, Byte))
|
||||
Me.ckb_clear.Location = New System.Drawing.Point(1278, 670)
|
||||
Me.ckb_clear.Name = "ckb_clear"
|
||||
Me.ckb_clear.Size = New System.Drawing.Size(179, 39)
|
||||
Me.ckb_clear.TabIndex = 25
|
||||
Me.ckb_clear.Text = "초기화유/무"
|
||||
Me.ckb_clear.UseVisualStyleBackColor = True
|
||||
'
|
||||
'ckb_upper
|
||||
'
|
||||
Me.ckb_upper.AutoSize = True
|
||||
Me.ckb_upper.Checked = True
|
||||
Me.ckb_upper.CheckState = System.Windows.Forms.CheckState.Checked
|
||||
Me.ckb_upper.Font = New System.Drawing.Font("함초롬바탕", 20.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(129, Byte))
|
||||
Me.ckb_upper.Location = New System.Drawing.Point(1278, 723)
|
||||
Me.ckb_upper.Name = "ckb_upper"
|
||||
Me.ckb_upper.Size = New System.Drawing.Size(172, 39)
|
||||
Me.ckb_upper.TabIndex = 26
|
||||
Me.ckb_upper.Text = "대문자 유지"
|
||||
Me.ckb_upper.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Button1
|
||||
'
|
||||
Me.Button1.Font = New System.Drawing.Font("함초롬바탕", 21.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(129, Byte))
|
||||
Me.Button1.Location = New System.Drawing.Point(724, 679)
|
||||
Me.Button1.Name = "Button1"
|
||||
Me.Button1.Size = New System.Drawing.Size(272, 53)
|
||||
Me.Button1.TabIndex = 27
|
||||
Me.Button1.Text = "데이터 초기화"
|
||||
Me.Button1.UseVisualStyleBackColor = True
|
||||
'
|
||||
'ckb_fail_delete
|
||||
'
|
||||
Me.ckb_fail_delete.AutoSize = True
|
||||
Me.ckb_fail_delete.Checked = True
|
||||
Me.ckb_fail_delete.CheckState = System.Windows.Forms.CheckState.Checked
|
||||
Me.ckb_fail_delete.Font = New System.Drawing.Font("함초롬바탕", 20.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(129, Byte))
|
||||
Me.ckb_fail_delete.Location = New System.Drawing.Point(1278, 774)
|
||||
Me.ckb_fail_delete.Name = "ckb_fail_delete"
|
||||
Me.ckb_fail_delete.Size = New System.Drawing.Size(240, 39)
|
||||
Me.ckb_fail_delete.TabIndex = 28
|
||||
Me.ckb_fail_delete.Text = "실패 데이터 삭제"
|
||||
Me.ckb_fail_delete.UseVisualStyleBackColor = True
|
||||
'
|
||||
'frmMySqlTest
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 12.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(1526, 825)
|
||||
Me.Controls.Add(Me.ckb_fail_delete)
|
||||
Me.Controls.Add(Me.Button1)
|
||||
Me.Controls.Add(Me.ckb_upper)
|
||||
Me.Controls.Add(Me.ckb_clear)
|
||||
Me.Controls.Add(Me.gb_tdfront)
|
||||
Me.Controls.Add(Me.Button5)
|
||||
Me.Controls.Add(Me.DataGridView)
|
||||
Me.Controls.Add(Me.Button3)
|
||||
Me.Controls.Add(Me.Label1)
|
||||
Me.Controls.Add(Me.txbPV_SN)
|
||||
Me.Controls.Add(Me.btnReadDB)
|
||||
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
|
||||
Me.Name = "frmMySqlTest"
|
||||
Me.Text = "수입검사 TD Database 입력 유틸리티 Ver 1.0.0"
|
||||
CType(Me.DataGridView, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.gb_tdfront.ResumeLayout(False)
|
||||
Me.gb_tdfront.PerformLayout()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents btnReadDB As Button
|
||||
Friend WithEvents txbPV_SN As TextBox
|
||||
Friend WithEvents Label1 As Label
|
||||
Friend WithEvents OpenFileDB As OpenFileDialog
|
||||
Friend WithEvents Button3 As Button
|
||||
Friend WithEvents DataGridView As DataGridView
|
||||
Friend WithEvents Button5 As Button
|
||||
Friend WithEvents gb_tdfront As GroupBox
|
||||
Friend WithEvents rdb_no As RadioButton
|
||||
Friend WithEvents rdb_dith As RadioButton
|
||||
Friend WithEvents rdb_diti As RadioButton
|
||||
Friend WithEvents rdb_dit As RadioButton
|
||||
Friend WithEvents ckb_clear As CheckBox
|
||||
Friend WithEvents ckb_upper As CheckBox
|
||||
Friend WithEvents Button1 As Button
|
||||
Friend WithEvents ckb_fail_delete As CheckBox
|
||||
End Class
|
||||
2113
frmMySqlTest.resx
Normal file
2113
frmMySqlTest.resx
Normal file
File diff suppressed because it is too large
Load Diff
333
frmMySqlTest.vb
Normal file
333
frmMySqlTest.vb
Normal file
@ -0,0 +1,333 @@
|
||||
'Imports System.Data.OleDb
|
||||
'Imports System.Reflection
|
||||
Imports System.ComponentModel
|
||||
Imports Excel = Microsoft.Office.Interop.Excel
|
||||
''Imports Microsoft.Office.Interop
|
||||
|
||||
|
||||
Public Class frmMySqlTest
|
||||
|
||||
Private Enum data_set
|
||||
fre
|
||||
imp
|
||||
cap
|
||||
res
|
||||
cur
|
||||
cva
|
||||
gra
|
||||
r1
|
||||
r2
|
||||
r3
|
||||
r4
|
||||
r5
|
||||
r6
|
||||
r7
|
||||
r8
|
||||
r9
|
||||
r10
|
||||
|
||||
max
|
||||
End Enum
|
||||
|
||||
Private data_select(data_set.max) As String
|
||||
|
||||
Private cmd As String
|
||||
Private dbcmd As String
|
||||
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
|
||||
'''DataGridView를 선택하면 전체 한줄이 선택되게 됩니다.
|
||||
DataGridView.SelectionMode = DataGridViewSelectionMode.FullRowSelect
|
||||
|
||||
'컬럼 2개를 생성하고 각각의 이름을 정해줍니다. DataGridView1의 상단에 위치하게 됩니다.
|
||||
DataGridView.ColumnCount = 18
|
||||
|
||||
DataGridView.Columns(0).Name = "시리얼번호"
|
||||
DataGridView.Columns(1).Name = "주파수"
|
||||
DataGridView.Columns(2).Name = "임피던스"
|
||||
DataGridView.Columns(3).Name = "캐패시턴스"
|
||||
DataGridView.Columns(4).Name = "레지스턴스"
|
||||
DataGridView.Columns(5).Name = "전류값"
|
||||
DataGridView.Columns(6).Name = "C값"
|
||||
DataGridView.Columns(7).Name = "등급"
|
||||
DataGridView.Columns(8).Name = "0P"
|
||||
DataGridView.Columns(9).Name = "22P"
|
||||
DataGridView.Columns(10).Name = "56P"
|
||||
DataGridView.Columns(11).Name = "82P"
|
||||
DataGridView.Columns(12).Name = "100P"
|
||||
DataGridView.Columns(13).Name = "120P"
|
||||
DataGridView.Columns(14).Name = "150P"
|
||||
DataGridView.Columns(15).Name = "180P"
|
||||
DataGridView.Columns(16).Name = "220P"
|
||||
DataGridView.Columns(17).Name = "270P"
|
||||
|
||||
size_est()
|
||||
End Sub
|
||||
|
||||
'Keep the application object and the workbook object global, so you can
|
||||
'retrieve the data in Button2_Click that was set in Button1_Click.
|
||||
Dim objApp As Excel.Application
|
||||
Dim objBook As Excel._Workbook
|
||||
|
||||
Private Sub size_est()
|
||||
Dim width, height As Integer
|
||||
|
||||
Me.Hide()
|
||||
Me.WindowState = FormWindowState.Maximized
|
||||
|
||||
width = Val(Me.Width)
|
||||
height = Val(Me.Height)
|
||||
|
||||
Me.MaximumSize = New Size(width, height)
|
||||
Me.Width = width
|
||||
Me.Height = height
|
||||
|
||||
Me.Show()
|
||||
Me.Refresh()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub DisplayQuarterlySales(oWS As Excel.Worksheet)
|
||||
Dim oResizeRange As Excel.Range
|
||||
Dim oChart As Excel.Chart
|
||||
Dim iNumQtrs As Integer
|
||||
Dim sMsg As String
|
||||
Dim iRet As Integer
|
||||
|
||||
' Determine how many quarters to display data for.
|
||||
For iNumQtrs = 4 To 2 Step -1
|
||||
sMsg = "Enter sales data for" & Str(iNumQtrs) & " quarter(s)?"
|
||||
iRet = MsgBox(sMsg, vbYesNo Or vbQuestion _
|
||||
Or vbMsgBoxSetForeground, "Quarterly Sales")
|
||||
If iRet = vbYes Then Exit For
|
||||
Next iNumQtrs
|
||||
|
||||
sMsg = "Displaying data for" & Str(iNumQtrs) & " quarter(s)."
|
||||
MsgBox(sMsg, vbMsgBoxSetForeground, "Quarterly Sales")
|
||||
|
||||
' Starting at E1, fill headers for the number of columns selected.
|
||||
oResizeRange = oWS.Range("E1", "E1").Resize(ColumnSize:=iNumQtrs)
|
||||
|
||||
oResizeRange.Formula = "=""Q"" & COLUMN()-4 & CHAR(10) & ""Sales"""
|
||||
|
||||
' Change the Orientation and WrapText properties for the headers.
|
||||
oResizeRange.Orientation = 38
|
||||
oResizeRange.WrapText = True
|
||||
|
||||
' Fill the interior color of the headers.
|
||||
oResizeRange.Interior.ColorIndex = 36
|
||||
|
||||
' Fill the columns with a formula and apply a number format.
|
||||
oResizeRange = oWS.Range("E2", "E6").Resize(ColumnSize:=iNumQtrs)
|
||||
oResizeRange.Formula = "=RAND()*100"
|
||||
oResizeRange.NumberFormat = "$0.00"
|
||||
|
||||
' Apply borders to the Sales data and headers.
|
||||
oResizeRange = oWS.Range("E1", "E6").Resize(ColumnSize:=iNumQtrs)
|
||||
oResizeRange.Borders.Weight = Excel.XlBorderWeight.xlThin
|
||||
|
||||
' Add a Totals formula for the sales data and apply a border.
|
||||
oResizeRange = oWS.Range("E8", "E8").Resize(ColumnSize:=iNumQtrs)
|
||||
oResizeRange.Formula = "=SUM(E2:E6)"
|
||||
With oResizeRange.Borders(Excel.XlBordersIndex.xlEdgeBottom)
|
||||
.LineStyle = Excel.XlLineStyle.xlDouble
|
||||
.Weight = Excel.XlBorderWeight.xlThick
|
||||
|
||||
End With
|
||||
|
||||
' Add a Chart for the selected data
|
||||
oResizeRange = oWS.Range("E2:E6").Resize(ColumnSize:=iNumQtrs)
|
||||
oChart = oWS.Parent.Charts.Add
|
||||
With oChart
|
||||
.ChartWizard(oResizeRange, Excel.XlChartType.xl3DColumn, , Excel.XlChartType.xl3DColumn)
|
||||
.SeriesCollection(1).XValues = oWS.Range("A2", "A6")
|
||||
For iRet = 1 To iNumQtrs
|
||||
.SeriesCollection(iRet).Name = "=""Q" & Str(iRet) & """"
|
||||
Next iRet
|
||||
.Location(Excel.XlLocationInTable.xlColumnHeader, oWS.Name)
|
||||
End With
|
||||
|
||||
' Move the chart so as not to cover your data.
|
||||
With oWS.Shapes("Chart 1")
|
||||
.Top = oWS.Rows(10).Top
|
||||
.Left = oWS.Columns(2).Left
|
||||
|
||||
End With
|
||||
|
||||
' Free any references.
|
||||
oChart = Nothing
|
||||
oResizeRange = Nothing
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
|
||||
loadExcelDB()
|
||||
End Sub
|
||||
|
||||
Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
|
||||
showDataGridViewContent(DataGridView)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Button1_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim te1, te2, te3, te4, te5, te6, te7, te8, te9, te10, te11, te12, te13, te14, te15, te16, te17, te18, te19, te20, te21, te22, te23, te24, te25, te26, te27, te28, te29, te30, te31, te32, te33, te34, te35, te36, te37, te38, te39, te40, te41, te42 As String
|
||||
|
||||
For cnt = DataGridView.Rows.Count - 2 To 0 Step -1
|
||||
te1 = DataGridView.Rows(cnt).Cells(0).Value.ToString
|
||||
te2 = DataGridView.Rows(cnt).Cells(1).Value.ToString
|
||||
te3 = DataGridView.Rows(cnt).Cells(2).Value.ToString
|
||||
te4 = DataGridView.Rows(cnt).Cells(3).Value.ToString
|
||||
te5 = DataGridView.Rows(cnt).Cells(4).Value.ToString
|
||||
te6 = DataGridView.Rows(cnt).Cells(5).Value.ToString
|
||||
te7 = DataGridView.Rows(cnt).Cells(6).Value.ToString
|
||||
te8 = DataGridView.Rows(cnt).Cells(7).Value.ToString
|
||||
te9 = DataGridView.Rows(cnt).Cells(8).Value.ToString
|
||||
te10 = DataGridView.Rows(cnt).Cells(9).Value.ToString
|
||||
te11 = DataGridView.Rows(cnt).Cells(10).Value.ToString
|
||||
te12 = DataGridView.Rows(cnt).Cells(11).Value.ToString
|
||||
te13 = DataGridView.Rows(cnt).Cells(12).Value.ToString
|
||||
te14 = DataGridView.Rows(cnt).Cells(13).Value.ToString
|
||||
te15 = DataGridView.Rows(cnt).Cells(14).Value.ToString
|
||||
te16 = DataGridView.Rows(cnt).Cells(15).Value.ToString
|
||||
te17 = DataGridView.Rows(cnt).Cells(16).Value.ToString
|
||||
te18 = DataGridView.Rows(cnt).Cells(17).Value.ToString
|
||||
te19 = DataGridView.Rows(cnt).Cells(18).Value.ToString
|
||||
te20 = DataGridView.Rows(cnt).Cells(19).Value.ToString
|
||||
te21 = DataGridView.Rows(cnt).Cells(20).Value.ToString
|
||||
te22 = DataGridView.Rows(cnt).Cells(21).Value.ToString
|
||||
te23 = DataGridView.Rows(cnt).Cells(22).Value.ToString
|
||||
te24 = DataGridView.Rows(cnt).Cells(23).Value.ToString
|
||||
te25 = DataGridView.Rows(cnt).Cells(24).Value.ToString
|
||||
te26 = DataGridView.Rows(cnt).Cells(25).Value.ToString
|
||||
te27 = DataGridView.Rows(cnt).Cells(26).Value.ToString
|
||||
te28 = DataGridView.Rows(cnt).Cells(27).Value.ToString
|
||||
te29 = DataGridView.Rows(cnt).Cells(28).Value.ToString
|
||||
te30 = DataGridView.Rows(cnt).Cells(29).Value.ToString
|
||||
te31 = DataGridView.Rows(cnt).Cells(30).Value.ToString
|
||||
te32 = DataGridView.Rows(cnt).Cells(31).Value.ToString
|
||||
te33 = DataGridView.Rows(cnt).Cells(32).Value.ToString
|
||||
te34 = DataGridView.Rows(cnt).Cells(33).Value.ToString
|
||||
te35 = DataGridView.Rows(cnt).Cells(34).Value.ToString
|
||||
te36 = DataGridView.Rows(cnt).Cells(35).Value.ToString
|
||||
te37 = DataGridView.Rows(cnt).Cells(36).Value.ToString
|
||||
te38 = DataGridView.Rows(cnt).Cells(37).Value.ToString
|
||||
te39 = DataGridView.Rows(cnt).Cells(38).Value.ToString
|
||||
te40 = DataGridView.Rows(cnt).Cells(39).Value.ToString
|
||||
te41 = DataGridView.Rows(cnt).Cells(40).Value.ToString
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub btnReadDB_Click(sender As Object, e As EventArgs) Handles btnReadDB.Click
|
||||
Dim td_sn As String
|
||||
Dim switch As Boolean
|
||||
|
||||
If ckb_clear.Checked = True Then
|
||||
DataGridView.Rows.Clear()
|
||||
End If
|
||||
|
||||
If ckb_fail_delete.Checked = True Then
|
||||
For i = DataGridView.Rows.Count - 1 To 0 Step -1
|
||||
If DataGridView.Rows(i).DefaultCellStyle.BackColor = Color.Red Then
|
||||
DataGridView.Rows.RemoveAt(i)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
td_sn = tdsn_parsing()
|
||||
|
||||
dbcmd = "SELECT PV_Frequency,PV_Impedance,PV_Capacitance,PV_Resistance,QC_Current,QC_Capacitor,QC_Grade,QC_R1Value,QC_R2Value,QC_R3Value,QC_R4Value,QC_R5Value,QC_R6Value,QC_R7Value,QC_R8Value,QC_R9Value,QC_R10Value FROM jomtTesterDB.jomtCartridgeTbl WHERE PV_SN = '" & td_sn & "'"
|
||||
|
||||
If DBQueryReader(dbcmd) Then
|
||||
data_select(data_set.fre) = sqlDataQuery(0)
|
||||
data_select(data_set.imp) = sqlDataQuery(1)
|
||||
data_select(data_set.cap) = sqlDataQuery(2)
|
||||
data_select(data_set.res) = sqlDataQuery(3)
|
||||
data_select(data_set.cur) = sqlDataQuery(4)
|
||||
data_select(data_set.cva) = sqlDataQuery(5)
|
||||
data_select(data_set.gra) = sqlDataQuery(6)
|
||||
data_select(data_set.r1) = sqlDataQuery(7)
|
||||
data_select(data_set.r2) = sqlDataQuery(8)
|
||||
data_select(data_set.r3) = sqlDataQuery(9)
|
||||
data_select(data_set.r4) = sqlDataQuery(10)
|
||||
data_select(data_set.r5) = sqlDataQuery(11)
|
||||
data_select(data_set.r6) = sqlDataQuery(12)
|
||||
data_select(data_set.r7) = sqlDataQuery(13)
|
||||
data_select(data_set.r8) = sqlDataQuery(14)
|
||||
data_select(data_set.r9) = sqlDataQuery(15)
|
||||
data_select(data_set.r10) = sqlDataQuery(16)
|
||||
|
||||
switch = True
|
||||
|
||||
Else
|
||||
data_select(data_set.fre) = "0"
|
||||
data_select(data_set.imp) = "0"
|
||||
data_select(data_set.cap) = "0"
|
||||
data_select(data_set.res) = "0"
|
||||
data_select(data_set.cur) = "0"
|
||||
data_select(data_set.cva) = "0"
|
||||
data_select(data_set.gra) = "0"
|
||||
data_select(data_set.r1) = "0"
|
||||
data_select(data_set.r2) = "0"
|
||||
data_select(data_set.r3) = "0"
|
||||
data_select(data_set.r4) = "0"
|
||||
data_select(data_set.r5) = "0"
|
||||
data_select(data_set.r6) = "0"
|
||||
data_select(data_set.r7) = "0"
|
||||
data_select(data_set.r8) = "0"
|
||||
data_select(data_set.r9) = "0"
|
||||
data_select(data_set.r10) = "0"
|
||||
|
||||
switch = False
|
||||
End If
|
||||
|
||||
DataGridView.Rows.Add(td_sn, data_select(data_set.fre), data_select(data_set.imp), data_select(data_set.cap), data_select(data_set.res), data_select(data_set.cur), data_select(data_set.cva), data_select(data_set.gra), data_select(data_set.r1), data_select(data_set.r2), data_select(data_set.r3), data_select(data_set.r4), data_select(data_set.r5), data_select(data_set.r6), data_select(data_set.r7), data_select(data_set.r8), data_select(data_set.r9), data_select(data_set.r10))
|
||||
|
||||
If switch = True Then
|
||||
DataGridView.Rows(DataGridView.Rows.Count - 1).DefaultCellStyle.BackColor = Color.White
|
||||
txbPV_SN.Text = Nothing
|
||||
Else
|
||||
DataGridView.Rows(DataGridView.Rows.Count - 1).DefaultCellStyle.BackColor = Color.Red
|
||||
txbPV_SN.Text = Nothing
|
||||
MsgBox("데이터가 존재하지 않습니다.", vbCritical)
|
||||
End If
|
||||
DataGridView.Refresh()
|
||||
End Sub
|
||||
|
||||
Private Function tdsn_parsing() As String
|
||||
Dim td_sn As String = Nothing
|
||||
|
||||
If rdb_dit.Checked Then
|
||||
td_sn = rdb_dit.Text
|
||||
ElseIf rdb_dith.Checked Then
|
||||
td_sn = rdb_dith.Text
|
||||
ElseIf rdb_diti.Checked Then
|
||||
td_sn = rdb_diti.Text
|
||||
End If
|
||||
|
||||
td_sn = td_sn & txbPV_SN.Text
|
||||
|
||||
If ckb_upper.Checked = True Then
|
||||
Return td_sn.ToUpper
|
||||
Else
|
||||
Return td_sn
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
Private Sub txbPV_SN_Click(sender As Object, e As EventArgs) Handles txbPV_SN.Click
|
||||
txbPV_SN.Text = ""
|
||||
End Sub
|
||||
|
||||
Private Sub txbPV_SN_KeyDown(ByVal sender As Object, ByVal e As KeyEventArgs) Handles txbPV_SN.KeyDown
|
||||
If e.KeyCode = Keys.Return Then
|
||||
btnReadDB_Click(sender, e)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Button1_Click_1(sender As Object, e As EventArgs) Handles Button1.Click
|
||||
DataGridView.Rows.Clear()
|
||||
End Sub
|
||||
End Class
|
||||
13
packages.config
Normal file
13
packages.config
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Microsoft.Bcl.AsyncInterfaces" version="8.0.0" targetFramework="net48" />
|
||||
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="8.0.2" targetFramework="net48" />
|
||||
<package id="Microsoft.Extensions.Logging.Abstractions" version="8.0.2" targetFramework="net48" />
|
||||
<package id="MySqlConnector" version="2.5.0" targetFramework="net48" />
|
||||
<package id="System.Buffers" version="4.5.1" targetFramework="net48" />
|
||||
<package id="System.Diagnostics.DiagnosticSource" version="8.0.1" targetFramework="net48" />
|
||||
<package id="System.Memory" version="4.5.5" targetFramework="net48" />
|
||||
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net48" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net48" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net48" />
|
||||
</packages>
|
||||
Loading…
x
Reference in New Issue
Block a user