UI 및 데이타셋 추가

This commit is contained in:
LKJ
2024-12-01 11:28:11 +09:00
parent 8815050795
commit 0bec8b45e7
7 changed files with 1421 additions and 6 deletions
+43
View File
@@ -0,0 +1,43 @@
object dmData: TdmData
Height = 869
Width = 1136
PixelsPerInch = 120
object mdEmployee: TdxMemData
Indexes = <>
Persistent.Data = {
5665728FC2F5285C8FFE3F060000000A000000010005006E616D650002000000
0200040061676500020000000200070073616C61727900020000000500040073
6578000A00000001000900706F736974696F6E001E0000000100080061646472
657373000106000000C0CCB0FCC0E70134000110270101000104000000B4EBC7
A5010A000000BACEBBEAB1A4BFAABDC3}
SortOptions = []
Left = 512
Top = 80
object mdEmployeename: TStringField
FieldName = 'name'
Size = 10
end
object mdEmployeeage: TSmallintField
FieldName = 'age'
end
object mdEmployeesalary: TSmallintField
FieldName = 'salary'
end
object mdEmployeesex: TBooleanField
FieldName = 'sex'
end
object mdEmployeeposition: TStringField
FieldName = 'position'
Size = 10
end
object mdEmployeeaddress: TStringField
FieldName = 'address'
Size = 30
end
end
object dsEmployee: TDataSource
DataSet = mdEmployee
Left = 384
Top = 80
end
end
+33
View File
@@ -0,0 +1,33 @@
unit EmployeeUnit;
interface
uses
System.SysUtils, System.Classes, Data.DB, dxmdaset;
type
TdmData = class(TDataModule)
mdEmployee: TdxMemData;
mdEmployeename: TStringField;
mdEmployeeage: TSmallintField;
mdEmployeesalary: TSmallintField;
mdEmployeesex: TBooleanField;
mdEmployeeaddress: TStringField;
mdEmployeeposition: TStringField;
dsEmployee: TDataSource;
private
{ Private declarations }
public
{ Public declarations }
end;
var
dmData: TdmData;
implementation
{%CLASSGROUP 'Vcl.Controls.TControl'}
{$R *.dfm}
end.
+161 -3
View File
@@ -1,9 +1,9 @@
object Form1: TForm1
object frmMain: TfrmMain
Left = 0
Top = 0
Caption = #47700#51064#54268
ClientHeight = 932
ClientWidth = 1048
ClientHeight = 985
ClientWidth = 1194
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
@@ -11,4 +11,162 @@ object Form1: TForm1
Font.Name = 'Segoe UI'
Font.Style = []
TextHeight = 15
object lcMain: TdxLayoutControl
Left = 0
Top = 0
Width = 1194
Height = 985
Align = alClient
TabOrder = 0
ExplicitLeft = 360
ExplicitTop = 256
ExplicitWidth = 300
ExplicitHeight = 250
object btnAdd: TcxButton
Left = 765
Top = 33
Width = 75
Height = 40
Caption = 'btnAdd'
TabOrder = 0
end
object btnSave: TcxButton
Left = 847
Top = 33
Width = 75
Height = 40
TabOrder = 1
end
object btnDelete: TcxButton
Left = 929
Top = 33
Width = 75
Height = 40
Caption = 'btnDelete'
TabOrder = 2
end
object btnCancel: TcxButton
Left = 1011
Top = 33
Width = 75
Height = 40
Caption = 'btnCancel'
TabOrder = 3
end
object cxButton5: TcxButton
Left = 1093
Top = 33
Width = 75
Height = 40
Caption = 'cxButton5'
TabOrder = 4
end
object grdEmployee: TcxGrid
Left = 26
Top = 157
Width = 1142
Height = 200
TabOrder = 5
object dbtvEmployee: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
DataController.Summary.DefaultGroupSummaryItems = <>
DataController.Summary.FooterSummaryItems = <>
DataController.Summary.SummaryGroups = <>
OptionsView.GroupByBox = False
end
object grdEmployeeLevel1: TcxGridLevel
GridView = dbtvEmployee
end
end
object lgRoot: TdxLayoutGroup
AlignHorz = ahParentManaged
AlignVert = avParentManaged
Hidden = True
ItemIndex = 2
ShowBorder = False
Index = -1
end
object lgToolbar: TdxLayoutGroup
Parent = lgRoot
CaptionOptions.Text = 'New Group'
LayoutDirection = ldHorizontal
Index = 0
end
object dxLayoutGroup2: TdxLayoutGroup
Parent = lgRoot
CaptionOptions.Text = 'New Group'
Index = 1
end
object lgGrid: TdxLayoutGroup
Parent = lgRoot
CaptionOptions.Text = 'New Group'
Index = 2
end
object liAdd: TdxLayoutItem
Parent = lgToolbar
AlignHorz = ahRight
CaptionOptions.Text = 'cxButton1'
CaptionOptions.Visible = False
Control = btnAdd
ControlOptions.OriginalHeight = 40
ControlOptions.OriginalWidth = 75
ControlOptions.ShowBorder = False
Index = 0
end
object liCancel: TdxLayoutItem
Parent = lgToolbar
AlignHorz = ahRight
CaptionOptions.Text = 'cxButton2'
CaptionOptions.Visible = False
Control = btnSave
ControlOptions.OriginalHeight = 40
ControlOptions.OriginalWidth = 75
ControlOptions.ShowBorder = False
Index = 1
end
object liDelete: TdxLayoutItem
Parent = lgToolbar
AlignHorz = ahRight
CaptionOptions.Text = 'cxButton3'
CaptionOptions.Visible = False
Control = btnDelete
ControlOptions.OriginalHeight = 40
ControlOptions.OriginalWidth = 75
ControlOptions.ShowBorder = False
Index = 2
end
object liSave: TdxLayoutItem
Parent = lgToolbar
AlignHorz = ahRight
CaptionOptions.Text = 'cxButton4'
CaptionOptions.Visible = False
Control = btnCancel
ControlOptions.OriginalHeight = 40
ControlOptions.OriginalWidth = 75
ControlOptions.ShowBorder = False
Index = 3
end
object dxLayoutItem5: TdxLayoutItem
Parent = lgToolbar
AlignHorz = ahRight
CaptionOptions.Text = 'cxButton5'
CaptionOptions.Visible = False
Control = cxButton5
ControlOptions.OriginalHeight = 40
ControlOptions.OriginalWidth = 75
ControlOptions.ShowBorder = False
Index = 4
end
object liGrid: TdxLayoutItem
Parent = lgGrid
CaptionOptions.Text = 'cxGrid1'
CaptionOptions.Visible = False
Control = grdEmployee
ControlOptions.OriginalHeight = 200
ControlOptions.OriginalWidth = 250
ControlOptions.ShowBorder = False
Index = 0
end
end
end
+30 -3
View File
@@ -4,10 +4,37 @@ interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs;
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, cxGraphics, dxUIAClasses, cxControls,
cxLookAndFeels, cxLookAndFeelPainters, dxSkinsCore, dxSkinBasic,
dxSkinDarkroom, dxSkinOffice2016Dark, dxSkinOffice2019Black,
dxSkinOffice2019DarkGray, dxSkinOffice2019White, dxSkinVisualStudio2013Dark,
cxClasses, dxLayoutContainer, dxLayoutControl, dxLayoutControlAdapters,
Vcl.Menus, cxStyles, cxCustomData, cxFilter, cxData, cxDataStorage, cxEdit,
cxNavigator, dxDateRanges, dxScrollbarAnnotations, Data.DB, cxDBData,
cxGridLevel, cxGridCustomView, cxGridCustomTableView, cxGridTableView,
cxGridDBTableView, cxGrid, Vcl.StdCtrls, cxButtons;
type
TForm1 = class(TForm)
TfrmMain = class(TForm)
lgRoot: TdxLayoutGroup;
lcMain: TdxLayoutControl;
lgToolbar: TdxLayoutGroup;
dxLayoutGroup2: TdxLayoutGroup;
lgGrid: TdxLayoutGroup;
btnAdd: TcxButton;
liAdd: TdxLayoutItem;
btnSave: TcxButton;
liCancel: TdxLayoutItem;
btnDelete: TcxButton;
liDelete: TdxLayoutItem;
btnCancel: TcxButton;
liSave: TdxLayoutItem;
cxButton5: TcxButton;
dxLayoutItem5: TdxLayoutItem;
dbtvEmployee: TcxGridDBTableView;
grdEmployeeLevel1: TcxGridLevel;
grdEmployee: TcxGrid;
liGrid: TdxLayoutItem;
private
{ Private declarations }
public
@@ -15,7 +42,7 @@ type
end;
var
Form1: TForm1;
frmMain: TfrmMain;
implementation
+16
View File
@@ -0,0 +1,16 @@
program 데이타셋데모;
uses
Vcl.Forms,
MainUnit in 'form\MainUnit.pas' {frmMain},
EmployeeUnit in 'data\EmployeeUnit.pas' {dmData: TDataModule};
{$R *.res}
begin
Application.Initialize;
Application.MainFormOnTaskbar := True;
Application.CreateForm(TfrmMain, frmMain);
Application.CreateForm(TdmData, dmData);
Application.Run;
end.
File diff suppressed because it is too large Load Diff
+16
View File
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<BorlandProject>
<Transactions>
<Transaction>2024-12-01 10:40:31.665,=C:\Delphi\Libraries\Unit1.pas</Transaction>
<Transaction>2024-12-01 10:41:57.933,D:\Delphi\Project\델파이스터디\dataset_demo-241201\source\form\MainUnit.dfm=C:\Delphi\Libraries\Unit1.dfm</Transaction>
<Transaction>2024-12-01 10:41:57.933,D:\Delphi\Project\델파이스터디\dataset_demo-241201\source\form\MainUnit.pas=C:\Delphi\Libraries\Unit1.pas</Transaction>
<Transaction>2024-12-01 10:42:41.276,D:\Delphi\Project\델파이스터디\dataset_demo-241201\source\데이타셋데모\데이타셋데모.dproj=C:\Delphi\Libraries\Project1.dproj</Transaction>
<Transaction>2024-12-01 10:49:17.534,D:\Delphi\Project\델파이스터디\dataset_demo-241201\source\데이타셋데모.dproj=D:\Delphi\Project\델파이스터디\dataset_demo-241201\source\데이타셋데모\데이타셋데모.dproj</Transaction>
<Transaction>2024-12-01 11:14:24.207,=D:\Delphi\Project\델파이스터디\dataset_demo-241201\source\Unit1.pas</Transaction>
<Transaction>2024-12-01 11:15:48.192,D:\Delphi\Project\델파이스터디\dataset_demo-241201\source\data\DateUnit.pas=D:\Delphi\Project\델파이스터디\dataset_demo-241201\source\Unit1.pas</Transaction>
<Transaction>2024-12-01 11:15:48.192,D:\Delphi\Project\델파이스터디\dataset_demo-241201\source\data\DateUnit.dfm=D:\Delphi\Project\델파이스터디\dataset_demo-241201\source\Unit1.dfm</Transaction>
<Transaction>2024-12-01 11:17:07.086,=D:\Delphi\Project\델파이스터디\dataset_demo-241201\source\Unit2.pas</Transaction>
<Transaction>2024-12-01 11:17:44.580,D:\Delphi\Project\델파이스터디\dataset_demo-241201\source\data\EmployeeUnit.dfm=D:\Delphi\Project\델파이스터디\dataset_demo-241201\source\data\DateUnit.dfm</Transaction>
<Transaction>2024-12-01 11:17:44.580,D:\Delphi\Project\델파이스터디\dataset_demo-241201\source\data\EmployeeUnit.pas=D:\Delphi\Project\델파이스터디\dataset_demo-241201\source\data\DateUnit.pas</Transaction>
</Transactions>
</BorlandProject>