직원근무형태 UI 저장 로직은 없음
This commit is contained in:
+92
-22
@@ -63,13 +63,14 @@ object frmMain: TfrmMain
|
|||||||
end
|
end
|
||||||
object grdEmployee: TcxGrid
|
object grdEmployee: TcxGrid
|
||||||
Left = 12
|
Left = 12
|
||||||
Top = 175
|
Top = 249
|
||||||
Width = 792
|
Width = 792
|
||||||
Height = 478
|
Height = 404
|
||||||
TabOrder = 10
|
TabOrder = 11
|
||||||
object dbtvEmployee: TcxGridDBTableView
|
object dbtvEmployee: TcxGridDBTableView
|
||||||
Navigator.Buttons.CustomButtons = <>
|
Navigator.Buttons.CustomButtons = <>
|
||||||
ScrollbarAnnotations.CustomAnnotations = <>
|
ScrollbarAnnotations.CustomAnnotations = <>
|
||||||
|
OnCellClick = dbtvEmployeeCellClick
|
||||||
DataController.DataSource = dmData.dsEmployee
|
DataController.DataSource = dmData.dsEmployee
|
||||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
DataController.Summary.FooterSummaryItems = <>
|
DataController.Summary.FooterSummaryItems = <>
|
||||||
@@ -114,6 +115,11 @@ object frmMain: TfrmMain
|
|||||||
PropertiesClassName = 'TcxCurrencyEditProperties'
|
PropertiesClassName = 'TcxCurrencyEditProperties'
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
end
|
end
|
||||||
|
object dbtvEmployeeColumn1: TcxGridDBColumn
|
||||||
|
Caption = #44540#47924#54805#53468
|
||||||
|
DataBinding.FieldName = 'worktype'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
end
|
||||||
object dbtvEmployeeaddress: TcxGridDBColumn
|
object dbtvEmployeeaddress: TcxGridDBColumn
|
||||||
Caption = #51452#49548
|
Caption = #51452#49548
|
||||||
DataBinding.FieldName = 'address'
|
DataBinding.FieldName = 'address'
|
||||||
@@ -134,10 +140,10 @@ object frmMain: TfrmMain
|
|||||||
Style.TransparentBorder = False
|
Style.TransparentBorder = False
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
Height = 27
|
Height = 27
|
||||||
Width = 157
|
Width = 350
|
||||||
end
|
end
|
||||||
object dbseAge: TcxDBSpinEdit
|
object dbseAge: TcxDBSpinEdit
|
||||||
Left = 248
|
Left = 441
|
||||||
Top = 93
|
Top = 93
|
||||||
AutoSize = False
|
AutoSize = False
|
||||||
DataBinding.DataField = 'age'
|
DataBinding.DataField = 'age'
|
||||||
@@ -146,42 +152,82 @@ object frmMain: TfrmMain
|
|||||||
Style.TransparentBorder = False
|
Style.TransparentBorder = False
|
||||||
TabOrder = 6
|
TabOrder = 6
|
||||||
Height = 27
|
Height = 27
|
||||||
Width = 157
|
Width = 349
|
||||||
end
|
end
|
||||||
object dbtePosition: TcxDBTextEdit
|
object dbtePosition: TcxDBTextEdit
|
||||||
Left = 441
|
Left = 55
|
||||||
Top = 93
|
Top = 127
|
||||||
AutoSize = False
|
AutoSize = False
|
||||||
DataBinding.DataField = 'position'
|
DataBinding.DataField = 'position'
|
||||||
DataBinding.DataSource = dmData.dsEmployee
|
DataBinding.DataSource = dmData.dsEmployee
|
||||||
Style.HotTrack = False
|
Style.HotTrack = False
|
||||||
Style.TransparentBorder = False
|
Style.TransparentBorder = False
|
||||||
TabOrder = 7
|
TabOrder = 7
|
||||||
Height = 27
|
Height = 30
|
||||||
Width = 156
|
Width = 379
|
||||||
end
|
end
|
||||||
object dbseSalary: TcxDBSpinEdit
|
object dbseSalary: TcxDBSpinEdit
|
||||||
Left = 633
|
Left = 55
|
||||||
Top = 93
|
Top = 164
|
||||||
AutoSize = False
|
AutoSize = False
|
||||||
DataBinding.DataField = 'salary'
|
DataBinding.DataField = 'salary'
|
||||||
DataBinding.DataSource = dmData.dsEmployee
|
DataBinding.DataSource = dmData.dsEmployee
|
||||||
Style.HotTrack = False
|
Style.HotTrack = False
|
||||||
Style.TransparentBorder = False
|
Style.TransparentBorder = False
|
||||||
TabOrder = 8
|
TabOrder = 8
|
||||||
Height = 27
|
Height = 30
|
||||||
Width = 157
|
Width = 379
|
||||||
end
|
end
|
||||||
object dbteAddress: TcxDBTextEdit
|
object dbteAddress: TcxDBTextEdit
|
||||||
Left = 55
|
Left = 55
|
||||||
Top = 127
|
Top = 201
|
||||||
DataBinding.DataField = 'address'
|
DataBinding.DataField = 'address'
|
||||||
DataBinding.DataSource = dmData.dsEmployee
|
DataBinding.DataSource = dmData.dsEmployee
|
||||||
Style.HotTrack = False
|
Style.HotTrack = False
|
||||||
Style.TransparentBorder = False
|
Style.TransparentBorder = False
|
||||||
TabOrder = 9
|
TabOrder = 10
|
||||||
Width = 735
|
Width = 735
|
||||||
end
|
end
|
||||||
|
object cxRadioGroup1: TcxRadioGroup
|
||||||
|
Left = 441
|
||||||
|
Top = 127
|
||||||
|
Caption = #44540#47924#54805#53468
|
||||||
|
ParentBackground = False
|
||||||
|
ParentColor = False
|
||||||
|
Properties.Items = <>
|
||||||
|
Style.Color = 16053492
|
||||||
|
Style.TransparentBorder = False
|
||||||
|
TabOrder = 9
|
||||||
|
Height = 67
|
||||||
|
Width = 349
|
||||||
|
object rbWorkType1: TcxRadioButton
|
||||||
|
Left = 56
|
||||||
|
Top = 32
|
||||||
|
Width = 80
|
||||||
|
Height = 20
|
||||||
|
Caption = ' '#49888#51077
|
||||||
|
TabOrder = 0
|
||||||
|
Transparent = True
|
||||||
|
end
|
||||||
|
object rbWorkType2: TcxRadioButton
|
||||||
|
Left = 126
|
||||||
|
Top = 32
|
||||||
|
Width = 80
|
||||||
|
Height = 20
|
||||||
|
Caption = #44540#49549#51088
|
||||||
|
TabOrder = 1
|
||||||
|
Transparent = True
|
||||||
|
end
|
||||||
|
object rbWorkType3: TcxRadioButton
|
||||||
|
Left = 212
|
||||||
|
Top = 32
|
||||||
|
Width = 80
|
||||||
|
Height = 20
|
||||||
|
Caption = #53748#49324#51088
|
||||||
|
TabOrder = 2
|
||||||
|
Transparent = True
|
||||||
|
end
|
||||||
|
end
|
||||||
object lgRoot: TdxLayoutGroup
|
object lgRoot: TdxLayoutGroup
|
||||||
AlignHorz = ahClient
|
AlignHorz = ahClient
|
||||||
AlignVert = avClient
|
AlignVert = avClient
|
||||||
@@ -302,24 +348,26 @@ object frmMain: TfrmMain
|
|||||||
Index = 1
|
Index = 1
|
||||||
end
|
end
|
||||||
object dxLayoutItem4: TdxLayoutItem
|
object dxLayoutItem4: TdxLayoutItem
|
||||||
Parent = dxLayoutAutoCreatedGroup1
|
Parent = dxLayoutAutoCreatedGroup3
|
||||||
AlignHorz = ahClient
|
AlignHorz = ahClient
|
||||||
|
AlignVert = avClient
|
||||||
CaptionOptions.Text = #51649#50948
|
CaptionOptions.Text = #51649#50948
|
||||||
Control = dbtePosition
|
Control = dbtePosition
|
||||||
ControlOptions.OriginalHeight = 27
|
ControlOptions.OriginalHeight = 27
|
||||||
ControlOptions.OriginalWidth = 121
|
ControlOptions.OriginalWidth = 121
|
||||||
ControlOptions.ShowBorder = False
|
ControlOptions.ShowBorder = False
|
||||||
Index = 2
|
Index = 0
|
||||||
end
|
end
|
||||||
object dxLayoutItem5: TdxLayoutItem
|
object dxLayoutItem5: TdxLayoutItem
|
||||||
Parent = dxLayoutAutoCreatedGroup1
|
Parent = dxLayoutAutoCreatedGroup3
|
||||||
AlignHorz = ahClient
|
AlignHorz = ahClient
|
||||||
|
AlignVert = avClient
|
||||||
CaptionOptions.Text = #44553#50668
|
CaptionOptions.Text = #44553#50668
|
||||||
Control = dbseSalary
|
Control = dbseSalary
|
||||||
ControlOptions.OriginalHeight = 27
|
ControlOptions.OriginalHeight = 27
|
||||||
ControlOptions.OriginalWidth = 121
|
ControlOptions.OriginalWidth = 121
|
||||||
ControlOptions.ShowBorder = False
|
ControlOptions.ShowBorder = False
|
||||||
Index = 3
|
Index = 1
|
||||||
end
|
end
|
||||||
object dxLayoutItem6: TdxLayoutItem
|
object dxLayoutItem6: TdxLayoutItem
|
||||||
Parent = lgInput
|
Parent = lgInput
|
||||||
@@ -328,13 +376,35 @@ object frmMain: TfrmMain
|
|||||||
ControlOptions.OriginalHeight = 27
|
ControlOptions.OriginalHeight = 27
|
||||||
ControlOptions.OriginalWidth = 121
|
ControlOptions.OriginalWidth = 121
|
||||||
ControlOptions.ShowBorder = False
|
ControlOptions.ShowBorder = False
|
||||||
Index = 1
|
Index = 2
|
||||||
end
|
end
|
||||||
object dxLayoutAutoCreatedGroup1: TdxLayoutAutoCreatedGroup
|
object dxLayoutAutoCreatedGroup1: TdxLayoutAutoCreatedGroup
|
||||||
Parent = lgInput
|
Parent = lgInput
|
||||||
LayoutDirection = ldHorizontal
|
LayoutDirection = ldHorizontal
|
||||||
Index = 0
|
Index = 0
|
||||||
end
|
end
|
||||||
|
object dxLayoutItem1: TdxLayoutItem
|
||||||
|
Parent = dxLayoutAutoCreatedGroup2
|
||||||
|
AlignHorz = ahRight
|
||||||
|
CaptionOptions.Text = 'cxRadioGroup1'
|
||||||
|
CaptionOptions.Visible = False
|
||||||
|
Control = cxRadioGroup1
|
||||||
|
ControlOptions.AutoColor = True
|
||||||
|
ControlOptions.OriginalHeight = 67
|
||||||
|
ControlOptions.OriginalWidth = 349
|
||||||
|
ControlOptions.ShowBorder = False
|
||||||
|
Index = 1
|
||||||
|
end
|
||||||
|
object dxLayoutAutoCreatedGroup2: TdxLayoutAutoCreatedGroup
|
||||||
|
Parent = lgInput
|
||||||
|
LayoutDirection = ldHorizontal
|
||||||
|
Index = 1
|
||||||
|
end
|
||||||
|
object dxLayoutAutoCreatedGroup3: TdxLayoutAutoCreatedGroup
|
||||||
|
Parent = dxLayoutAutoCreatedGroup2
|
||||||
|
AlignHorz = ahClient
|
||||||
|
Index = 0
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object sbMain: TdxStatusBar
|
object sbMain: TdxStatusBar
|
||||||
Left = 0
|
Left = 0
|
||||||
@@ -352,7 +422,7 @@ object frmMain: TfrmMain
|
|||||||
Top = 8
|
Top = 8
|
||||||
object acAdd: TAction
|
object acAdd: TAction
|
||||||
Tag = 1
|
Tag = 1
|
||||||
Caption = #52628#44032#51077#45768#45796
|
Caption = #52628#44032
|
||||||
ImageIndex = 0
|
ImageIndex = 0
|
||||||
OnExecute = DataSetCRUD
|
OnExecute = DataSetCRUD
|
||||||
end
|
end
|
||||||
|
|||||||
+40
-1
@@ -17,7 +17,7 @@ uses
|
|||||||
{ DevExpress Skin }
|
{ DevExpress Skin }
|
||||||
cxLookAndFeels, cxLookAndFeelPainters, dxSkinsCore, dxSkinWXI, dxLayoutLookAndFeels, dxSkinsForm,
|
cxLookAndFeels, cxLookAndFeelPainters, dxSkinsCore, dxSkinWXI, dxLayoutLookAndFeels, dxSkinsForm,
|
||||||
{ Custom }
|
{ Custom }
|
||||||
DataUnit;
|
DataUnit, cxRadioGroup, cxGroupBox;
|
||||||
|
|
||||||
type
|
type
|
||||||
TfrmMain = class(TdxForm, IDataStateNotifier)
|
TfrmMain = class(TdxForm, IDataStateNotifier)
|
||||||
@@ -67,14 +67,27 @@ type
|
|||||||
dxLayoutLookAndFeelList: TdxLayoutLookAndFeelList;
|
dxLayoutLookAndFeelList: TdxLayoutLookAndFeelList;
|
||||||
dxLayoutSkinLookAndFeel1: TdxLayoutSkinLookAndFeel;
|
dxLayoutSkinLookAndFeel1: TdxLayoutSkinLookAndFeel;
|
||||||
sbMain: TdxStatusBar;
|
sbMain: TdxStatusBar;
|
||||||
|
dbtvEmployeeColumn1: TcxGridDBColumn;
|
||||||
|
cxRadioGroup1: TcxRadioGroup;
|
||||||
|
dxLayoutItem1: TdxLayoutItem;
|
||||||
|
rbWorkType1: TcxRadioButton;
|
||||||
|
rbWorkType2: TcxRadioButton;
|
||||||
|
rbWorkType3: TcxRadioButton;
|
||||||
|
dxLayoutAutoCreatedGroup2: TdxLayoutAutoCreatedGroup;
|
||||||
|
dxLayoutAutoCreatedGroup3: TdxLayoutAutoCreatedGroup;
|
||||||
procedure DataSetCRUD(Sender: TObject);
|
procedure DataSetCRUD(Sender: TObject);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure dbtvEmployeeCellClick(Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
private
|
private
|
||||||
procedure NotifyDataSetStateChange(const AState: TDataSetState);
|
procedure NotifyDataSetStateChange(const AState: TDataSetState);
|
||||||
public
|
public
|
||||||
{ Public declarations }
|
{ Public declarations }
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
TWorkType = (신입, 근속자, 퇴사자);
|
||||||
|
|
||||||
var
|
var
|
||||||
frmMain: TfrmMain;
|
frmMain: TfrmMain;
|
||||||
|
|
||||||
@@ -99,6 +112,32 @@ begin
|
|||||||
End;
|
End;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrmMain.dbtvEmployeeCellClick(Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
var
|
||||||
|
RecInx, ColInx: integer;
|
||||||
|
begin
|
||||||
|
var Controller:= TcxGridDBTableView(Sender).DataController;
|
||||||
|
RecInx:= ACellViewInfo.RecordViewInfo.Index;
|
||||||
|
ColInx:= Controller.GetItemByFieldName('worktype').Index;
|
||||||
|
var WorkType:= Controller.Values[RecInx, ColInx];
|
||||||
|
if WorkType = 신입 then
|
||||||
|
rbWorkType1.Checked:= True
|
||||||
|
else if WorkType = 근속자 then
|
||||||
|
rbWorkType2.Checked:= True
|
||||||
|
else if WorkType = 퇴사자 then
|
||||||
|
rbWorkType3.Checked:= True;
|
||||||
|
|
||||||
|
{ Case문을 활용한 아래 코드
|
||||||
|
case VarAsType(WorkType, varInteger) of
|
||||||
|
0: rbWorkType1.Checked:= True;
|
||||||
|
1: rbWorkType2.Checked:= True;
|
||||||
|
2: rbWorkType3.Checked:= True;
|
||||||
|
end;
|
||||||
|
}
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfrmMain.FormCreate(Sender: TObject);
|
procedure TfrmMain.FormCreate(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
// DataSet State를 DataUnit으로 분리(유닛간 결합도를 분리) 리펙토링
|
// DataSet State를 DataUnit으로 분리(유닛간 결합도를 분리) 리펙토링
|
||||||
|
|||||||
@@ -5,12 +5,13 @@ object dmData: TdmData
|
|||||||
object mdEmployee: TdxMemData
|
object mdEmployee: TdxMemData
|
||||||
Indexes = <>
|
Indexes = <>
|
||||||
Persistent.Data = {
|
Persistent.Data = {
|
||||||
5665728FC2F5285C8FFE3F050000000A000000010005006E616D650002000000
|
5665728FC2F5285C8FFE3F060000000A000000010005006E616D650002000000
|
||||||
02000400616765000500000001000900706F736974696F6E0004000000030007
|
02000400616765000500000001000900706F736974696F6E0004000000030007
|
||||||
0073616C61727900320000000100080061646472657373000106000000C8ABB1
|
0073616C61727900320000000100080061646472657373000200000002000900
|
||||||
E6B5BF011F000104000000B4EBB8AE0140E133000112000000BACEBBEA20B5BF
|
776F726B74797065000106000000C8ABB1E6B5BF011F000104000000B4EBB8AE
|
||||||
B7A1B1B820B8EDC0E5B5BF0106000000B1E8B8BBB5BF012A000104000000B0FA
|
0140E133000112000000BACEBBEA20B5BFB7A1B1B820B8EDC0E5B5BF01010001
|
||||||
C0E501401640000112000000BACEBBEA20C7D8BFEEB4EBB1B820BFECB5BF}
|
06000000B1E8B8BBB5BF012A000104000000B0FAC0E501401640000112000000
|
||||||
|
BACEBBEA20C7D8BFEEB4EBB1B820BFECB5BF010200}
|
||||||
SortOptions = []
|
SortOptions = []
|
||||||
Left = 208
|
Left = 208
|
||||||
Top = 80
|
Top = 80
|
||||||
@@ -32,6 +33,9 @@ object dmData: TdmData
|
|||||||
FieldName = 'address'
|
FieldName = 'address'
|
||||||
Size = 50
|
Size = 50
|
||||||
end
|
end
|
||||||
|
object mdEmployeeworktype: TSmallintField
|
||||||
|
FieldName = 'worktype'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object dsEmployee: TDataSource
|
object dsEmployee: TDataSource
|
||||||
AutoEdit = False
|
AutoEdit = False
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ type
|
|||||||
mdEmployeeaddress: TStringField;
|
mdEmployeeaddress: TStringField;
|
||||||
dsEmployee: TDataSource;
|
dsEmployee: TDataSource;
|
||||||
ilSmallIcons: TcxImageList;
|
ilSmallIcons: TcxImageList;
|
||||||
|
mdEmployeeworktype: TSmallintField;
|
||||||
procedure dsEmployeeStateChange(Sender: TObject);
|
procedure dsEmployeeStateChange(Sender: TObject);
|
||||||
procedure DataModuleCreate(Sender: TObject);
|
procedure DataModuleCreate(Sender: TObject);
|
||||||
private
|
private
|
||||||
|
|||||||
Reference in New Issue
Block a user