데이타셋 데모

1. Tag를 활용한 리펙토링
2. Interface를 활용한 DataSet State 분리
This commit is contained in:
pagewiz@naver.com
2024-11-19 10:52:51 +09:00
commit de67a00e75
11 changed files with 2287 additions and 0 deletions
+399
View File
@@ -0,0 +1,399 @@
object frmMain: TfrmMain
Left = 0
Top = 0
Caption = 'DataSet '#49892#49845
ClientHeight = 685
ClientWidth = 816
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = 'Segoe UI'
Font.Style = []
Position = poScreenCenter
OnCreate = FormCreate
TextHeight = 15
object lcMain: TdxLayoutControl
Left = 0
Top = 0
Width = 816
Height = 665
Align = alClient
TabOrder = 0
LayoutLookAndFeel = dxLayoutSkinLookAndFeel1
object btnAdd: TcxButton
Left = 401
Top = 12
Width = 75
Height = 35
Action = acAdd
TabOrder = 0
end
object btnEdit: TcxButton
Left = 483
Top = 12
Width = 75
Height = 35
Action = acEdit
TabOrder = 1
end
object btnDelete: TcxButton
Left = 565
Top = 12
Width = 75
Height = 35
Action = acDelete
TabOrder = 2
end
object btnPost: TcxButton
Left = 647
Top = 12
Width = 75
Height = 35
Action = acSave
TabOrder = 3
end
object btnCancel: TcxButton
Left = 729
Top = 12
Width = 75
Height = 35
Action = acCancel
TabOrder = 4
end
object grdEmployee: TcxGrid
Left = 12
Top = 175
Width = 792
Height = 478
TabOrder = 10
object dbtvEmployee: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
DataController.DataSource = dmData.dsEmployee
DataController.Summary.DefaultGroupSummaryItems = <>
DataController.Summary.FooterSummaryItems = <>
DataController.Summary.SummaryGroups = <>
OptionsData.CancelOnExit = False
OptionsData.Deleting = False
OptionsData.DeletingConfirmation = False
OptionsData.Editing = False
OptionsData.Inserting = False
OptionsSelection.CellSelect = False
OptionsView.ColumnAutoWidth = True
OptionsView.GroupByBox = False
object dbtvEmployeeRecId: TcxGridDBColumn
DataBinding.FieldName = 'RecId'
Visible = False
end
object dbtvEmployeename: TcxGridDBColumn
Caption = #51060#47492
DataBinding.FieldName = 'name'
PropertiesClassName = 'TcxTextEditProperties'
Properties.Alignment.Horz = taCenter
HeaderAlignmentHorz = taCenter
end
object dbtvEmployeeage: TcxGridDBColumn
Caption = #45208#51060
DataBinding.FieldName = 'age'
PropertiesClassName = 'TcxTextEditProperties'
Properties.Alignment.Horz = taCenter
HeaderAlignmentHorz = taCenter
end
object dbtvEmployeeposition: TcxGridDBColumn
Caption = #51649#50948
DataBinding.FieldName = 'position'
PropertiesClassName = 'TcxTextEditProperties'
Properties.Alignment.Horz = taCenter
HeaderAlignmentHorz = taCenter
Width = 41
end
object dbtvEmployeesalary: TcxGridDBColumn
Caption = #44553#50668
DataBinding.FieldName = 'salary'
PropertiesClassName = 'TcxCurrencyEditProperties'
HeaderAlignmentHorz = taCenter
end
object dbtvEmployeeaddress: TcxGridDBColumn
Caption = #51452#49548
DataBinding.FieldName = 'address'
HeaderAlignmentHorz = taCenter
end
end
object grdEmployeeLevel1: TcxGridLevel
GridView = dbtvEmployee
end
end
object dbteName: TcxDBTextEdit
Left = 55
Top = 93
AutoSize = False
DataBinding.DataField = 'name'
DataBinding.DataSource = dmData.dsEmployee
Style.HotTrack = False
Style.TransparentBorder = False
TabOrder = 5
Height = 27
Width = 157
end
object dbseAge: TcxDBSpinEdit
Left = 248
Top = 93
AutoSize = False
DataBinding.DataField = 'age'
DataBinding.DataSource = dmData.dsEmployee
Style.HotTrack = False
Style.TransparentBorder = False
TabOrder = 6
Height = 27
Width = 157
end
object dbtePosition: TcxDBTextEdit
Left = 441
Top = 93
AutoSize = False
DataBinding.DataField = 'position'
DataBinding.DataSource = dmData.dsEmployee
Style.HotTrack = False
Style.TransparentBorder = False
TabOrder = 7
Height = 27
Width = 156
end
object dbseSalary: TcxDBSpinEdit
Left = 633
Top = 93
AutoSize = False
DataBinding.DataField = 'salary'
DataBinding.DataSource = dmData.dsEmployee
Style.HotTrack = False
Style.TransparentBorder = False
TabOrder = 8
Height = 27
Width = 157
end
object dbteAddress: TcxDBTextEdit
Left = 55
Top = 127
DataBinding.DataField = 'address'
DataBinding.DataSource = dmData.dsEmployee
Style.HotTrack = False
Style.TransparentBorder = False
TabOrder = 9
Width = 735
end
object lgRoot: TdxLayoutGroup
AlignHorz = ahClient
AlignVert = avClient
Hidden = True
ItemIndex = 1
ShowBorder = False
Index = -1
end
object lgToolbar: TdxLayoutGroup
Parent = lgRoot
CaptionOptions.Text = 'New Group'
CaptionOptions.Visible = False
ItemIndex = 4
LayoutDirection = ldHorizontal
ShowBorder = False
Index = 0
end
object lgInput: TdxLayoutGroup
Parent = lgRoot
CaptionOptions.Text = #52628#44032' / '#54200#51665
ItemIndex = 1
Index = 1
end
object lgGrid: TdxLayoutGroup
Parent = lgRoot
AlignVert = avClient
CaptionOptions.Text = 'New Group'
CaptionOptions.Visible = False
ShowBorder = False
Index = 2
end
object liAdd: TdxLayoutItem
Parent = lgToolbar
AlignHorz = ahRight
CaptionOptions.Text = 'cxButton1'
CaptionOptions.Visible = False
Control = btnAdd
ControlOptions.OriginalHeight = 35
ControlOptions.OriginalWidth = 75
ControlOptions.ShowBorder = False
Index = 0
end
object liEdit: TdxLayoutItem
Parent = lgToolbar
AlignHorz = ahRight
CaptionOptions.Text = 'cxButton2'
CaptionOptions.Visible = False
Control = btnEdit
ControlOptions.OriginalHeight = 35
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 = 35
ControlOptions.OriginalWidth = 75
ControlOptions.ShowBorder = False
Index = 2
end
object liSave: TdxLayoutItem
Parent = lgToolbar
AlignHorz = ahRight
CaptionOptions.Text = 'cxButton4'
CaptionOptions.Visible = False
Control = btnPost
ControlOptions.OriginalHeight = 35
ControlOptions.OriginalWidth = 75
ControlOptions.ShowBorder = False
Enabled = False
Index = 3
end
object liCancel: TdxLayoutItem
Parent = lgToolbar
AlignHorz = ahRight
CaptionOptions.Text = 'cxButton5'
CaptionOptions.Visible = False
Control = btnCancel
ControlOptions.OriginalHeight = 35
ControlOptions.OriginalWidth = 75
ControlOptions.ShowBorder = False
Index = 4
end
object liGird: TdxLayoutItem
Parent = lgGrid
AlignHorz = ahClient
AlignVert = avClient
CaptionOptions.Text = 'cxGrid1'
CaptionOptions.Visible = False
Control = grdEmployee
ControlOptions.OriginalHeight = 200
ControlOptions.OriginalWidth = 250
ControlOptions.ShowBorder = False
Index = 0
end
object dxLayoutItem2: TdxLayoutItem
Parent = dxLayoutAutoCreatedGroup1
AlignHorz = ahClient
CaptionOptions.Text = #51060#47492
Control = dbteName
ControlOptions.OriginalHeight = 27
ControlOptions.OriginalWidth = 121
ControlOptions.ShowBorder = False
Index = 0
end
object dxLayoutItem3: TdxLayoutItem
Parent = dxLayoutAutoCreatedGroup1
AlignHorz = ahClient
CaptionOptions.Text = #45208#51060
Control = dbseAge
ControlOptions.OriginalHeight = 27
ControlOptions.OriginalWidth = 121
ControlOptions.ShowBorder = False
Index = 1
end
object dxLayoutItem4: TdxLayoutItem
Parent = dxLayoutAutoCreatedGroup1
AlignHorz = ahClient
CaptionOptions.Text = #51649#50948
Control = dbtePosition
ControlOptions.OriginalHeight = 27
ControlOptions.OriginalWidth = 121
ControlOptions.ShowBorder = False
Index = 2
end
object dxLayoutItem5: TdxLayoutItem
Parent = dxLayoutAutoCreatedGroup1
AlignHorz = ahClient
CaptionOptions.Text = #44553#50668
Control = dbseSalary
ControlOptions.OriginalHeight = 27
ControlOptions.OriginalWidth = 121
ControlOptions.ShowBorder = False
Index = 3
end
object dxLayoutItem6: TdxLayoutItem
Parent = lgInput
CaptionOptions.Text = #51452#49548
Control = dbteAddress
ControlOptions.OriginalHeight = 27
ControlOptions.OriginalWidth = 121
ControlOptions.ShowBorder = False
Index = 1
end
object dxLayoutAutoCreatedGroup1: TdxLayoutAutoCreatedGroup
Parent = lgInput
LayoutDirection = ldHorizontal
Index = 0
end
end
object sbMain: TdxStatusBar
Left = 0
Top = 665
Width = 816
Height = 20
Panels = <
item
PanelStyleClassName = 'TdxStatusBarTextPanelStyle'
end>
end
object acToolbar: TActionList
Images = dmData.ilSmallIcons
Left = 288
Top = 8
object acAdd: TAction
Tag = 1
Caption = #52628#44032
ImageIndex = 0
OnExecute = DataSetCRUD
end
object acEdit: TAction
Tag = 2
Caption = #49688#51221
ImageIndex = 1
OnExecute = DataSetCRUD
end
object acDelete: TAction
Tag = 3
Caption = #49325#51228
ImageIndex = 2
OnExecute = DataSetCRUD
end
object acSave: TAction
Tag = 4
Caption = #51200#51109
Enabled = False
ImageIndex = 3
OnExecute = DataSetCRUD
end
object acCancel: TAction
Tag = 5
Caption = #52712#49548
ImageIndex = 4
OnExecute = DataSetCRUD
end
end
object scTheme: TdxSkinController
NativeStyle = False
SkinName = 'WXI'
SkinPaletteName = 'Clearness'
Left = 72
Top = 8
end
object dxLayoutLookAndFeelList: TdxLayoutLookAndFeelList
Left = 176
Top = 8
object dxLayoutSkinLookAndFeel1: TdxLayoutSkinLookAndFeel
PixelsPerInch = 96
end
end
end