Skip to content

Commit 7733946

Browse files
author
SmartLinli
committed
update
1 parent 8073c41 commit 7733946

17 files changed

+116
-46
lines changed

QuickDemo/5.Table/InitDb.sql

+1-35
Original file line numberDiff line numberDiff line change
@@ -48,38 +48,4 @@ INSERT tb_Student
4848
('3190707001','贾雨晗','女','2001-05-08','19信管','睡觉')
4949
,('3190707002','温晓雯','女','2001-05-20','19信管','吃货')
5050
,('3190707003','张浩奇','男','2001-04-27','19信管',NULL)
51-
,('3190707004','李玉林','男','2000-07-08','19信管',NULL);
52-
/*
53-
网格视图
54-
*/
55-
----课程表;
56-
CREATE TABLE tb_Course
57-
(Number
58-
CHAR(4)
59-
NOT NULL
60-
PRIMARY KEY
61-
,Name
62-
VARCHAR(50)
63-
NOT NULL);
64-
INSERT tb_Course
65-
(Number,Name)
66-
VALUES
67-
('A001','面向对象程序设计')
68-
,('A002','数据库原理')
69-
,('A003','数据库技术及应用');
70-
----学生成绩表;
71-
CREATE TABLE tb_StudentScore
72-
(StudentNumber
73-
CHAR(10)
74-
NOT NULL
75-
,CourseNumber
76-
CHAR(4)
77-
NOT NULL
78-
,Score
79-
DECIMAL(4,1)
80-
NULL
81-
,PRIMARY KEY(StudentNumber,CourseNumber));
82-
INSERT tb_StudentScore
83-
(StudentNumber,CourseNumber,Score)
84-
VALUES
85-
('3190707001','A001',82);
51+
,('3190707004','李玉林','男','2000-07-08','19信管',NULL);

QuickDemo/5.Table/Table.sln

-6
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ VisualStudioVersion = 15.0.28307.779
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Table", "Table\Table.csproj", "{933AD0BF-78F6-49B8-943A-5A4007CFCFA2}"
77
EndProject
8-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GridView", "GridView\GridView.csproj", "{C1BC64FE-70A5-4633-AA14-B2A05A227977}"
9-
EndProject
108
Global
119
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1210
Debug|Any CPU = Debug|Any CPU
@@ -17,10 +15,6 @@ Global
1715
{933AD0BF-78F6-49B8-943A-5A4007CFCFA2}.Debug|Any CPU.Build.0 = Debug|Any CPU
1816
{933AD0BF-78F6-49B8-943A-5A4007CFCFA2}.Release|Any CPU.ActiveCfg = Release|Any CPU
1917
{933AD0BF-78F6-49B8-943A-5A4007CFCFA2}.Release|Any CPU.Build.0 = Release|Any CPU
20-
{C1BC64FE-70A5-4633-AA14-B2A05A227977}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21-
{C1BC64FE-70A5-4633-AA14-B2A05A227977}.Debug|Any CPU.Build.0 = Debug|Any CPU
22-
{C1BC64FE-70A5-4633-AA14-B2A05A227977}.Release|Any CPU.ActiveCfg = Release|Any CPU
23-
{C1BC64FE-70A5-4633-AA14-B2A05A227977}.Release|Any CPU.Build.0 = Release|Any CPU
2418
EndGlobalSection
2519
GlobalSection(SolutionProperties) = preSolution
2620
HideSolutionNode = FALSE

QuickDemo/5.Table/GridView/Properties/Resources.Designer.cs renamed to QuickDemo/6.Table_GridView/6.Table_GridView/Properties/Resources.Designer.cs

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

QuickDemo/5.Table/GridView/Properties/Settings.Designer.cs renamed to QuickDemo/6.Table_GridView/6.Table_GridView/Properties/Settings.Designer.cs

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

QuickDemo/5.Table/GridView/GridView.csproj renamed to QuickDemo/6.Table_GridView/6.Table_GridView/Table_GridView.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
77
<ProjectGuid>{C1BC64FE-70A5-4633-AA14-B2A05A227977}</ProjectGuid>
88
<OutputType>WinExe</OutputType>
9-
<RootNamespace>GridView</RootNamespace>
10-
<AssemblyName>GridView</AssemblyName>
9+
<RootNamespace>Table_GridView</RootNamespace>
10+
<AssemblyName>Table_GridView</AssemblyName>
1111
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
1212
<FileAlignment>512</FileAlignment>
1313
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>

QuickDemo/6.Table_GridView/InitDb.sql

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
/*
2+
表_网格视图
3+
*/
4+
--创建数据库;
5+
USE master;
6+
IF DB_ID('EduBaseDemo') IS NOT NULL
7+
BEGIN
8+
ALTER DATABASE EduBaseDemo
9+
SET SINGLE_USER
10+
WITH ROLLBACK IMMEDIATE;
11+
DROP DATABASE EduBaseDemo;
12+
END
13+
GO
14+
CREATE DATABASE EduBaseDemo
15+
ON
16+
(NAME='Datafile'
17+
,FILENAME='C:\DataFile.mdf')
18+
LOG ON
19+
(NAME='Logfile'
20+
,FILENAME='C:\Logfile.ldf');
21+
GO
22+
USE EduBaseDemo;
23+
--创建表;
24+
----学生表;
25+
CREATE TABLE tb_Student
26+
(No
27+
CHAR(10)
28+
NOT NULL
29+
PRIMARY KEY
30+
,Name
31+
VARCHAR(20)
32+
NOT NULL
33+
,Gender
34+
CHAR(2)
35+
NOT NULL
36+
,BirthDate
37+
DATE
38+
NOT NULL
39+
,Class
40+
VARCHAR(50)
41+
NOT NULL
42+
,Speciality
43+
VARCHAR(100)
44+
NULL);
45+
INSERT tb_Student
46+
(No,Name,Gender,BirthDate,Class,Speciality)
47+
VALUES
48+
('3190707001','贾雨晗','女','2001-05-08','19信管','睡觉')
49+
,('3190707002','温晓雯','女','2001-05-20','19信管','吃货')
50+
,('3190707003','张浩奇','男','2001-04-27','19信管',NULL)
51+
,('3190707004','李玉林','男','2000-07-08','19信管',NULL);
52+
----课程表;
53+
CREATE TABLE tb_Course
54+
(Number
55+
CHAR(4)
56+
NOT NULL
57+
PRIMARY KEY
58+
,Name
59+
VARCHAR(50)
60+
NOT NULL);
61+
INSERT tb_Course
62+
(Number,Name)
63+
VALUES
64+
('A001','面向对象程序设计')
65+
,('A002','数据库原理')
66+
,('A003','数据库技术及应用');
67+
----学生成绩表;
68+
CREATE TABLE tb_StudentScore
69+
(StudentNumber
70+
CHAR(10)
71+
NOT NULL
72+
,CourseNumber
73+
CHAR(4)
74+
NOT NULL
75+
,Score
76+
DECIMAL(4,1)
77+
NULL
78+
,PRIMARY KEY(StudentNumber,CourseNumber));
79+
INSERT tb_StudentScore
80+
(StudentNumber,CourseNumber,Score)
81+
VALUES
82+
('3190707001','A001',82);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
& sqlcmd -S "(local)" -i "InitDb.sql"
2+
Write-Host 'Çë°´ÈÎÒâ¼ü¼ÌÐø' -NoNewline
3+
$null = [Console]::ReadKey('?')
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.28307.779
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Table_GridView", "6.Table_GridView\Table_GridView.csproj", "{C1BC64FE-70A5-4633-AA14-B2A05A227977}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{C1BC64FE-70A5-4633-AA14-B2A05A227977}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{C1BC64FE-70A5-4633-AA14-B2A05A227977}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{C1BC64FE-70A5-4633-AA14-B2A05A227977}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{C1BC64FE-70A5-4633-AA14-B2A05A227977}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {465C55D9-1BF7-440B-B378-D546088816AB}
24+
EndGlobalSection
25+
EndGlobal

0 commit comments

Comments
 (0)