Skip to content

Commit b3af808

Browse files
committed
UI almost done,
1 parent ce827e3 commit b3af808

File tree

9 files changed

+439
-556
lines changed

9 files changed

+439
-556
lines changed

SCM_Marshall.dpr

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ uses
1010
exeinfo in '..\SCM_SHARED\exeinfo.pas',
1111
XSuperJSON in '..\x-superobject\XSuperJSON.pas',
1212
XSuperObject in '..\x-superobject\XSuperObject.pas',
13-
ProgramSetting in 'ProgramSetting.pas',
14-
DCode in 'DCode.pas';
13+
ProgramSetting in 'ProgramSetting.pas';
1514

1615
{$R *.res}
1716

SCM_Marshall.dproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@
302302
<DCCReference Include="..\x-superobject\XSuperJSON.pas"/>
303303
<DCCReference Include="..\x-superobject\XSuperObject.pas"/>
304304
<DCCReference Include="ProgramSetting.pas"/>
305-
<DCCReference Include="DCode.pas"/>
306305
<BuildConfiguration Include="Base">
307306
<Key>Base</Key>
308307
</BuildConfiguration>

SCM_Marshall.dproj.local

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@
88
<Transaction>2023/03/26 10:56:06.000.815,=C:\Users\Ben\Documents\GitHub\SCM_SHARED\SCMSimpleConnect.pas</Transaction>
99
<Transaction>2023/03/26 10:56:06.000.767,=C:\Users\Ben\Documents\GitHub\SCM_SHARED\SCMUtility.pas</Transaction>
1010
<Transaction>2023/03/26 10:56:25.000.811,C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\SCMExeInfo.pas=</Transaction>
11-
<Transaction>2024/04/28 10:49:13.000.215,=C:\Users\Ben\Documents\GitHub\x-superobject\XSuperJSON.pas</Transaction>
1211
<Transaction>2024/04/28 10:49:13.000.275,=C:\Users\Ben\Documents\GitHub\x-superobject\XSuperObject.pas</Transaction>
12+
<Transaction>2024/04/28 10:49:13.000.215,=C:\Users\Ben\Documents\GitHub\x-superobject\XSuperJSON.pas</Transaction>
1313
<Transaction>2024/04/28 10:52:08.000.515,=C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\Unit1.pas</Transaction>
14-
<Transaction>2024/04/28 10:52:36.000.635,C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\ProgramSetting.pas=C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\Unit1.pas</Transaction>
15-
<Transaction>2024/04/28 14:20:46.000.185,C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\dlgSCMOptions_Depreciated.fmx=C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\dlgSCMOptions.fmx</Transaction>
16-
<Transaction>2024/04/28 14:20:46.000.185,C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\dlgSCMOptions_Depreciated.pas=C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\dlgSCMOptions.pas</Transaction>
14+
<Transaction>2024/04/28 10:52:36.000.635,C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\Unit1.pas=C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\ProgramSetting.pas</Transaction>
15+
<Transaction>2024/04/28 14:20:46.000.185,C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\dlgSCMOptions.fmx=C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\dlgSCMOptions_Depreciated.fmx</Transaction>
16+
<Transaction>2024/04/28 14:20:46.000.185,C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\dlgSCMOptions.pas=C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\dlgSCMOptions_Depreciated.pas</Transaction>
1717
<Transaction>2024/04/28 14:20:52.000.703,C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\dlgSCMOptions_Depreciated.pas=</Transaction>
18-
<Transaction>2024/05/03 14:09:49.351,=C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\Unit1.pas</Transaction>
19-
<Transaction>2024/05/03 14:10:22.836,C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\DCode.pas=C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\Unit1.pas</Transaction>
18+
<Transaction>2024/05/03 14:09:49.000.351,=C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\Unit1.pas</Transaction>
19+
<Transaction>2024/05/03 14:10:22.000.836,C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\Unit1.pas=C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\DCode.pas</Transaction>
20+
<Transaction>2024/05/04 13:17:40.737,C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\DCode.pas=</Transaction>
2021
</Transactions>
2122
</BorlandProject>

dmSCM.dfm

Lines changed: 57 additions & 136 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ object SCM: TSCM
136136
#9',CASE '
137137
#9#9'WHEN Entrant.IsDisqualified = 1 THEN '#39'DISQUALIFIED'#39
138138
#9#9'WHEN Entrant.IsScratched = 1 THEN '#39'SCRATCHED'#39' '
139-
#9#9'ELSE '#39'QUALIFIED'#39
139+
#9#9'ELSE '#39#39
140140
#9#9'END'
141141
#9#9#9'as QualifiedStatus'
142142
''
@@ -150,13 +150,18 @@ object SCM: TSCM
150150
' ) AS HeatNumLaneFNameStr'
151151
' '
152152
' , Upper(Member.LastName) AS LastNameStr'
153+
' , Entrant.DisqualifyCodeID'
154+
' , DisqualifyCode.ABREV'
153155
' '
154156
'FROM Entrant'
155157
'INNER JOIN HeatIndividual'
156158
' ON Entrant.HeatID = HeatIndividual.HeatID'
157159
'LEFT OUTER JOIN Member'
158160
' ON Entrant.MemberID = Member.MemberID'
159-
'ORDER BY Entrant.Lane')
161+
162+
'LEFT JOIN DisqualifyCode ON Entrant.DisqualifyCodeID = Disqualif' +
163+
'yCode.DisqualifyCodeID'
164+
'ORDER BY Entrant.Lane ')
160165
Left = 40
161166
Top = 506
162167
object qryEntrantEntrantID: TFDAutoIncField
@@ -243,6 +248,15 @@ object SCM: TSCM
243248
ReadOnly = True
244249
Size = 128
245250
end
251+
object qryEntrantDisqualifyCodeID: TIntegerField
252+
FieldName = 'DisqualifyCodeID'
253+
Origin = 'DisqualifyCodeID'
254+
end
255+
object qryEntrantABREV: TWideStringField
256+
FieldName = 'ABREV'
257+
Origin = 'ABREV'
258+
Size = 16
259+
end
246260
end
247261
object dsEntrant: TDataSource
248262
DataSet = qryEntrant
@@ -286,7 +300,9 @@ object SCM: TSCM
286300

287301
' , IIF(Session.SessionStatusID = 1, '#39' '#39', '#39' (LOCKED' +
288302
') '#39')'
289-
' , [Session].Caption'
303+
304+
' , IIF(Session.SessionStatusID = 1, [Session].Capt' +
305+
'ion, '#39#39')'
290306
' ) AS SessionDetailStr'
291307
'FROM Session'
292308
''
@@ -446,7 +462,7 @@ object SCM: TSCM
446462
UpdateOptions.UpdateTableName = 'SwimClubMeet..Event'
447463
UpdateOptions.KeyFields = 'EventID'
448464
SQL.Strings = (
449-
'USE SwimClubMeet'
465+
'USE SwimClubMeet;'
450466
''
451467
'SELECT Event.EventID'
452468
' , Event.EventNum'
@@ -479,14 +495,13 @@ object SCM: TSCM
479495
' , EntrantCount'
480496
' , '#39')'#39
481497
' ) AS ListDetailStr'
498+
',[Distance].EventTypeID'
482499
''
483500
'FROM Event'
484501
'LEFT OUTER JOIN Stroke'
485502
' ON Stroke.StrokeID = Event.StrokeID'
486503
'LEFT OUTER JOIN Distance'
487504
' ON Distance.DistanceID = Event.DistanceID'
488-
'LEFT OUTER JOIN EventStatus'
489-
' ON EventStatus.EventStatusID = Event.EventStatusID'
490505
'LEFT JOIN ('
491506
' SELECT Count(Nominee.EventID) AS NomineeCount'
492507
' , EventID'
@@ -556,6 +571,10 @@ object SCM: TSCM
556571
Required = True
557572
Size = 314
558573
end
574+
object qryEventEventTypeID: TIntegerField
575+
FieldName = 'EventTypeID'
576+
Origin = 'EventTypeID'
577+
end
559578
end
560579
object qryMember: TFDQuery
561580
ActiveStoredUsage = [auDesignTime]
@@ -731,7 +750,7 @@ object SCM: TSCM
731750
Name = 'HEATID'
732751
DataType = ftInteger
733752
ParamType = ptInput
734-
Value = 1946
753+
Value = Null
735754
end>
736755
object qryLaneLaneID: TIntegerField
737756
FieldName = 'LaneID'
@@ -781,84 +800,6 @@ object SCM: TSCM
781800
Left = 112
782801
Top = 442
783802
end
784-
object qryQualifyState: TFDQuery
785-
ActiveStoredUsage = [auDesignTime]
786-
IndexFieldNames = 'EntrantID'
787-
MasterSource = dsEntrant
788-
MasterFields = 'EntrantID'
789-
DetailFields = 'EntrantID'
790-
Connection = scmConnection
791-
UpdateOptions.AssignedValues = [uvEDelete, uvEInsert, uvEUpdate]
792-
UpdateOptions.EnableDelete = False
793-
UpdateOptions.EnableInsert = False
794-
UpdateOptions.EnableUpdate = False
795-
UpdateOptions.UpdateTableName = 'SwimClubMeet.dbo.DisqualifyCode'
796-
UpdateOptions.KeyFields = 'DisqualifyCodeID'
797-
SQL.Strings = (
798-
'USE [SwimClubMeet]'
799-
';'
800-
''
801-
'--DECLARE @EntrantID as Integer;'
802-
'--DECLARE @HeatID as Integer;'
803-
''
804-
'--SET @EntrantID = :ENTRANTID;'
805-
'--SET @HeatID = :HEATID;'
806-
''
807-
''
808-
'SELECT Entrant.[EntrantID]'
809-
' ,Entrant.[HeatID]'
810-
' ,Entrant.[IsDisqualified]'
811-
' ,Entrant.[IsScratched]'
812-
#9' , case '
813-
#9#9'when [IsDisqualified] = 1 and [IsScratched] = 0 then 2'
814-
#9#9'when [IsDisqualified] = 0 and [IsScratched] = 1 then 3'
815-
#9#9'else 1'
816-
#9#9'end as QualifyState'
817-
' ,Entrant.DisqualifyCodeID'
818-
' ,DisqualifyCode.ABREV'
819-
' FROM [dbo].[Entrant]'
820-
821-
' LEFT JOIN DisqualifyCode ON Entrant.DisqualifyCodeID = Disqual' +
822-
'ifyCode.DisqualifyCodeID '
823-
' -- WHERE [EntrantID] = @EntrantID AND [HeatID] = @HeatID;'
824-
''
825-
';')
826-
Left = 248
827-
Top = 504
828-
object qryQualifyStateEntrantID: TFDAutoIncField
829-
FieldName = 'EntrantID'
830-
Origin = 'EntrantID'
831-
end
832-
object qryQualifyStateHeatID: TIntegerField
833-
FieldName = 'HeatID'
834-
Origin = 'HeatID'
835-
end
836-
object qryQualifyStateIsDisqualified: TBooleanField
837-
FieldName = 'IsDisqualified'
838-
Origin = 'IsDisqualified'
839-
Required = True
840-
end
841-
object qryQualifyStateIsScratched: TBooleanField
842-
FieldName = 'IsScratched'
843-
Origin = 'IsScratched'
844-
Required = True
845-
end
846-
object qryQualifyStateQualifyState: TIntegerField
847-
FieldName = 'QualifyState'
848-
Origin = 'QualifyState'
849-
ReadOnly = True
850-
Required = True
851-
end
852-
object qryQualifyStateDisqualifyCodeID: TIntegerField
853-
FieldName = 'DisqualifyCodeID'
854-
Origin = 'DisqualifyCodeID'
855-
end
856-
object qryQualifyStateABREV: TWideStringField
857-
FieldName = 'ABREV'
858-
Origin = 'ABREV'
859-
Size = 16
860-
end
861-
end
862803
object qrySCMSystem: TFDQuery
863804
ActiveStoredUsage = [auDesignTime]
864805
Connection = scmConnection
@@ -894,41 +835,15 @@ object SCM: TSCM
894835
Left = 312
895836
Top = 264
896837
end
897-
object tblDisqualifyCode: TFDTable
838+
object qryDCode: TFDQuery
839+
ActiveStoredUsage = [auDesignTime]
898840
IndexFieldNames = 'DisqualifyCodeID'
899841
Connection = scmConnection
900-
ResourceOptions.AssignedValues = [rvEscapeExpand]
901842
UpdateOptions.AssignedValues = [uvEDelete, uvEInsert, uvEUpdate]
902843
UpdateOptions.EnableDelete = False
903844
UpdateOptions.EnableInsert = False
904845
UpdateOptions.EnableUpdate = False
905-
TableName = 'SwimClubMeet.dbo.DisqualifyCode'
906-
Left = 248
907-
Top = 344
908-
object tblDisqualifyCodeDisqualifyCodeID: TFDAutoIncField
909-
FieldName = 'DisqualifyCodeID'
910-
Origin = 'DisqualifyCodeID'
911-
end
912-
object tblDisqualifyCodeCaption: TWideStringField
913-
FieldName = 'Caption'
914-
Origin = 'Caption'
915-
Size = 128
916-
end
917-
object tblDisqualifyCodeABREV: TWideStringField
918-
FieldName = 'ABREV'
919-
Origin = 'ABREV'
920-
Size = 16
921-
end
922-
object tblDisqualifyCodeDisqualifyTypeID: TIntegerField
923-
FieldName = 'DisqualifyTypeID'
924-
Origin = 'DisqualifyTypeID'
925-
end
926-
end
927-
object FDQuery1: TFDQuery
928-
ActiveStoredUsage = [auDesignTime]
929-
Connection = scmConnection
930846
SQL.Strings = (
931-
'USE SwimClubMeet;'
932847
''
933848
'DECLARE @DisqualifyTypeID AS INTEGER;'
934849
''
@@ -953,31 +868,37 @@ object SCM: TSCM
953868
ParamData = <
954869
item
955870
Name = 'DISQUALIFYTYPEID'
871+
DataType = ftInteger
956872
ParamType = ptInput
873+
Value = Null
957874
end>
875+
object qryDCodeDisqualifyCodeID: TFDAutoIncField
876+
FieldName = 'DisqualifyCodeID'
877+
Origin = 'DisqualifyCodeID'
878+
end
879+
object qryDCodeDCodeStr: TWideStringField
880+
FieldName = 'DCodeStr'
881+
Origin = 'DCodeStr'
882+
Size = 128
883+
end
884+
object qryDCodeABREV: TWideStringField
885+
FieldName = 'ABREV'
886+
Origin = 'ABREV'
887+
Size = 16
888+
end
889+
object qryDCodeDisqualifyTypeID: TFDAutoIncField
890+
FieldName = 'DisqualifyTypeID'
891+
Origin = 'DisqualifyTypeID'
892+
end
893+
object qryDCodeTypeStr: TWideStringField
894+
FieldName = 'TypeStr'
895+
Origin = 'TypeStr'
896+
Size = 128
897+
end
958898
end
959-
object FDQuery2: TFDQuery
960-
ActiveStoredUsage = [auDesignTime]
961-
Connection = scmConnection
962-
SQL.Strings = (
963-
'USE SwimClubMeet ;'
964-
''
965-
'DECLARE @EntrantID AS INTEGER;'
966-
'SET @EntrantID = :ENTRANTID;'
967-
''
968-
'SELECT [Event].StrokeID, [Stroke].Caption FROM dbo.Entrant'
969-
970-
'INNER JOIN HeatIndividual ON Entrant.HeatID = HeatIndividual.He' +
971-
'atID'
972-
'INNER JOIN [Event] ON HeatIndividual.EventID = [Event].EventID'
973-
'INNER JOIN [Stroke] ON [Event].StrokeID = [Stroke].StrokeID'
974-
'WHERE Entrant.EntrantID = @EntrantID;')
975-
Left = 280
976-
Top = 120
977-
ParamData = <
978-
item
979-
Name = 'ENTRANTID'
980-
ParamType = ptInput
981-
end>
899+
object dsDCode: TDataSource
900+
DataSet = qryDCode
901+
Left = 352
902+
Top = 56
982903
end
983904
end

0 commit comments

Comments
 (0)