Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added TestWins/.vs/TestWins/v18/.futdcache.v2
Binary file not shown.
Binary file added TestWins/.vs/TestWins/v18/.suo
Binary file not shown.
70 changes: 70 additions & 0 deletions TestWins/.vs/TestWins/v18/DocumentLayout.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"Version": 1,
"WorkspaceRootPath": "C:\\Users\\Lynsy\\source\\repos\\winforms-sql-connection\\TestWins\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{BC1CB1E5-1993-9331-1E7F-FDD0EEE0CF3C}|TestWins.csproj|c:\\users\\lynsy\\source\\repos\\winforms-sql-connection\\testwins\\model\\connectionsql.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{BC1CB1E5-1993-9331-1E7F-FDD0EEE0CF3C}|TestWins.csproj|solutionrelative:model\\connectionsql.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{BC1CB1E5-1993-9331-1E7F-FDD0EEE0CF3C}|TestWins.csproj|c:\\users\\lynsy\\source\\repos\\winforms-sql-connection\\testwins\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{BC1CB1E5-1993-9331-1E7F-FDD0EEE0CF3C}|TestWins.csproj|solutionrelative:form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{BC1CB1E5-1993-9331-1E7F-FDD0EEE0CF3C}|TestWins.csproj|c:\\users\\lynsy\\source\\repos\\winforms-sql-connection\\testwins\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form",
"RelativeMoniker": "D:0:0:{BC1CB1E5-1993-9331-1E7F-FDD0EEE0CF3C}|TestWins.csproj|solutionrelative:form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form"
}
],
"DocumentGroupContainers": [
{
"Orientation": 0,
"VerticalTabListWidth": 256,
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": 0,
"Children": [
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "ConnectionSql.cs",
"DocumentMoniker": "C:\\Users\\Lynsy\\source\\repos\\winforms-sql-connection\\TestWins\\model\\ConnectionSql.cs",
"RelativeDocumentMoniker": "model\\ConnectionSql.cs",
"ToolTip": "C:\\Users\\Lynsy\\source\\repos\\winforms-sql-connection\\TestWins\\model\\ConnectionSql.cs",
"RelativeToolTip": "model\\ConnectionSql.cs",
"ViewState": "AgIAAAoAAAAAAAAAAAAzwAgAAAAmAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2026-03-29T02:14:55.393Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 2,
"Title": "Form1.cs [Design]",
"DocumentMoniker": "C:\\Users\\Lynsy\\source\\repos\\winforms-sql-connection\\TestWins\\Form1.cs",
"RelativeDocumentMoniker": "Form1.cs",
"ToolTip": "C:\\Users\\Lynsy\\source\\repos\\winforms-sql-connection\\TestWins\\Form1.cs [Design]",
"RelativeToolTip": "Form1.cs [Design]",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2026-03-29T02:10:30.853Z",
"EditorCaption": " [Design]"
},
{
"$type": "Document",
"DocumentIndex": 1,
"Title": "Form1.cs",
"DocumentMoniker": "C:\\Users\\Lynsy\\source\\repos\\winforms-sql-connection\\TestWins\\Form1.cs",
"RelativeDocumentMoniker": "Form1.cs",
"ToolTip": "C:\\Users\\Lynsy\\source\\repos\\winforms-sql-connection\\TestWins\\Form1.cs",
"RelativeToolTip": "Form1.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAgAAABMAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2026-03-29T02:08:31.126Z",
"EditorCaption": ""
}
]
}
]
}
]
}
37 changes: 29 additions & 8 deletions TestWins/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ namespace TestWins;
public partial class Form1 : Form
{
//business

private readonly StudentController controller = new StudentController();
public Form1()
{
Expand All @@ -21,23 +20,45 @@ private void loadData()

private void btnAdd_Click(object sender, EventArgs e)
{

var student = new TestWins.Model.Student
{
studentId = txtStudentId.Text,
Name = txtName.Text,
age = int.Parse(txtAge.Text),
course = txtCourse.Text
};
controller.createStudent(student);
loadData();
}

private void btnUpdate_Click(object sender, EventArgs e)
{

var student = new TestWins.Model.Student
{
studentId = txtStudentId.Text,
Name = txtName.Text,
age = int.Parse(txtAge.Text),
course = txtCourse.Text
};
controller.update(student);
loadData();
}

private void btnDelete_Click(object sender, EventArgs e)
{



controller.delete(txtStudentId.Text);
loadData();
}

private void dataGridView1_CellClick(object sender, EventArgs e)
{

if (dataGridView1.CurrentRow != null)
{
DataGridViewRow row = dataGridView1.CurrentRow;
txtStudentId.Text = row.Cells[0].Value.ToString();
txtName.Text = row.Cells[1].Value.ToString();
txtAge.Text = row.Cells[2].Value.ToString();
txtCourse.Text = row.Cells[3].Value.ToString();
}
}
}
}
120 changes: 120 additions & 0 deletions TestWins/Form1.resx
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
<?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>
</root>
12 changes: 6 additions & 6 deletions TestWins/TestWins.csproj.user
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Compile Update="Form1.cs">
<SubType>Form</SubType>
</Compile>
</ItemGroup>
</Project>
<ItemGroup>
<Compile Update="Form1.cs">
<SubType>Form</SubType>
</Compile>
</ItemGroup>
</Project>
25 changes: 25 additions & 0 deletions TestWins/TestWins.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 18
VisualStudioVersion = 18.4.11620.152 stable
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestWins", "TestWins.csproj", "{BC1CB1E5-1993-9331-1E7F-FDD0EEE0CF3C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BC1CB1E5-1993-9331-1E7F-FDD0EEE0CF3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BC1CB1E5-1993-9331-1E7F-FDD0EEE0CF3C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BC1CB1E5-1993-9331-1E7F-FDD0EEE0CF3C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BC1CB1E5-1993-9331-1E7F-FDD0EEE0CF3C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {42874CFB-6584-44BB-9FF4-63C7EB8A53E5}
EndGlobalSection
EndGlobal
Binary file modified TestWins/bin/Debug/net10.0-windows/TestWins.dll
Binary file not shown.
Binary file modified TestWins/bin/Debug/net10.0-windows/TestWins.exe
Binary file not shown.
Binary file modified TestWins/bin/Debug/net10.0-windows/TestWins.pdb
Binary file not shown.
3 changes: 2 additions & 1 deletion TestWins/obj/Debug/net10.0-windows/TestWins.AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//------------------------------------------------------------------------------
// <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.
Expand All @@ -13,7 +14,7 @@
[assembly: System.Reflection.AssemblyCompanyAttribute("TestWins")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+c96994ba0a1020367c306f29e28a76ed38cb5931")]
[assembly: System.Reflection.AssemblyProductAttribute("TestWins")]
[assembly: System.Reflection.AssemblyTitleAttribute("TestWins")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
307b151dc3731d875c703fd6d93b2b0364150598c75e98642e29670c540bf17b
5da3b5b84f173e012b2a22f201ea71159118ac283887817c1fd9652c5a09121a
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = TestWins
build_property.ProjectDir = C:\Users\jerem\Desktop\satwins\TestWins\
build_property.ProjectDir = C:\Users\Lynsy\source\repos\winforms-sql-connection\TestWins\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.CsWinRTUseWindowsUIXamlProjections = false
Expand Down
Binary file modified TestWins/obj/Debug/net10.0-windows/TestWins.assets.cache
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8470e09a9127a50da3cb6b88e90f892357536e876f3eb69530322f58d6cdd3ee
79a13782bd3db15fcfcbfeefbf5a125353d75c293e29f1adf688d5c8ba117978
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,34 @@ C:\Users\jerem\Desktop\satwins\TestWins\bin\Debug\net10.0-windows\runtimes\win-x
C:\Users\jerem\Desktop\satwins\TestWins\bin\Debug\net10.0-windows\runtimes\win-x64\native\krb5_64.dll
C:\Users\jerem\Desktop\satwins\TestWins\bin\Debug\net10.0-windows\runtimes\win-x64\native\krbcc64.dll
C:\Users\jerem\Desktop\satwins\TestWins\obj\Debug\net10.0-windows\TestWins.csproj.Up2Date
C:\Users\Lynsy\source\repos\winforms-sql-connection\TestWins\bin\Debug\net10.0-windows\TestWins.exe
C:\Users\Lynsy\source\repos\winforms-sql-connection\TestWins\bin\Debug\net10.0-windows\TestWins.deps.json
C:\Users\Lynsy\source\repos\winforms-sql-connection\TestWins\bin\Debug\net10.0-windows\TestWins.runtimeconfig.json
C:\Users\Lynsy\source\repos\winforms-sql-connection\TestWins\bin\Debug\net10.0-windows\TestWins.dll
C:\Users\Lynsy\source\repos\winforms-sql-connection\TestWins\bin\Debug\net10.0-windows\TestWins.pdb
C:\Users\Lynsy\source\repos\winforms-sql-connection\TestWins\bin\Debug\net10.0-windows\BouncyCastle.Cryptography.dll
C:\Users\Lynsy\source\repos\winforms-sql-connection\TestWins\bin\Debug\net10.0-windows\Google.Protobuf.dll
C:\Users\Lynsy\source\repos\winforms-sql-connection\TestWins\bin\Debug\net10.0-windows\K4os.Compression.LZ4.dll
C:\Users\Lynsy\source\repos\winforms-sql-connection\TestWins\bin\Debug\net10.0-windows\K4os.Compression.LZ4.Streams.dll
C:\Users\Lynsy\source\repos\winforms-sql-connection\TestWins\bin\Debug\net10.0-windows\K4os.Hash.xxHash.dll
C:\Users\Lynsy\source\repos\winforms-sql-connection\TestWins\bin\Debug\net10.0-windows\MySql.Data.dll
C:\Users\Lynsy\source\repos\winforms-sql-connection\TestWins\bin\Debug\net10.0-windows\ZstdSharp.dll
C:\Users\Lynsy\source\repos\winforms-sql-connection\TestWins\bin\Debug\net10.0-windows\runtimes\win-x64\native\comerr64.dll
C:\Users\Lynsy\source\repos\winforms-sql-connection\TestWins\bin\Debug\net10.0-windows\runtimes\win-x64\native\gssapi64.dll
C:\Users\Lynsy\source\repos\winforms-sql-connection\TestWins\bin\Debug\net10.0-windows\runtimes\win-x64\native\k5sprt64.dll
C:\Users\Lynsy\source\repos\winforms-sql-connection\TestWins\bin\Debug\net10.0-windows\runtimes\win-x64\native\krb5_64.dll
C:\Users\Lynsy\source\repos\winforms-sql-connection\TestWins\bin\Debug\net10.0-windows\runtimes\win-x64\native\krbcc64.dll
C:\Users\Lynsy\source\repos\winforms-sql-connection\TestWins\obj\Debug\net10.0-windows\TestWins.csproj.AssemblyReference.cache
C:\Users\Lynsy\source\repos\winforms-sql-connection\TestWins\obj\Debug\net10.0-windows\TestWins.Form1.resources
C:\Users\Lynsy\source\repos\winforms-sql-connection\TestWins\obj\Debug\net10.0-windows\TestWins.csproj.GenerateResource.cache
C:\Users\Lynsy\source\repos\winforms-sql-connection\TestWins\obj\Debug\net10.0-windows\TestWins.GeneratedMSBuildEditorConfig.editorconfig
C:\Users\Lynsy\source\repos\winforms-sql-connection\TestWins\obj\Debug\net10.0-windows\TestWins.AssemblyInfoInputs.cache
C:\Users\Lynsy\source\repos\winforms-sql-connection\TestWins\obj\Debug\net10.0-windows\TestWins.AssemblyInfo.cs
C:\Users\Lynsy\source\repos\winforms-sql-connection\TestWins\obj\Debug\net10.0-windows\TestWins.csproj.CoreCompileInputs.cache
C:\Users\Lynsy\source\repos\winforms-sql-connection\TestWins\obj\Debug\net10.0-windows\TestWins.sourcelink.json
C:\Users\Lynsy\source\repos\winforms-sql-connection\TestWins\obj\Debug\net10.0-windows\TestWins.csproj.Up2Date
C:\Users\Lynsy\source\repos\winforms-sql-connection\TestWins\obj\Debug\net10.0-windows\TestWins.dll
C:\Users\Lynsy\source\repos\winforms-sql-connection\TestWins\obj\Debug\net10.0-windows\refint\TestWins.dll
C:\Users\Lynsy\source\repos\winforms-sql-connection\TestWins\obj\Debug\net10.0-windows\TestWins.pdb
C:\Users\Lynsy\source\repos\winforms-sql-connection\TestWins\obj\Debug\net10.0-windows\TestWins.genruntimeconfig.cache
C:\Users\Lynsy\source\repos\winforms-sql-connection\TestWins\obj\Debug\net10.0-windows\ref\TestWins.dll
Binary file not shown.
Loading