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