Changeset 15 for trunk/Application/UDataTypes.pas
- Timestamp:
- Jun 13, 2011, 8:25:31 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 4 4 heaptrclog.trc 5 5 chronis.exe 6 DebugLog.txt
-
- Property svn:ignore
-
trunk/Application/UDataTypes.pas
r14 r15 16 16 function CreateControl(Owner: TComponent): TWinControl; virtual; 17 17 procedure SetupControl(Control: TWinControl); virtual; 18 function GetControlValue(Control: TWinControl): string; virtual; 18 19 procedure Load(CellValue: string); virtual; 19 20 procedure LoadDef(CustomType: Integer); virtual; … … 30 31 function CreateControl(Owner: TComponent): TWinControl; override; 31 32 procedure SetupControl(Control: TWinControl); override; 33 function GetControlValue(Control: TWinControl): string; override; 32 34 procedure Load(CellValue: string); override; 33 35 procedure LoadDef(CustomType: Integer); override; … … 42 44 function CreateControl(Owner: TComponent): TWinControl; override; 43 45 procedure SetupControl(Control: TWinControl); override; 46 function GetControlValue(Control: TWinControl): string; override; 44 47 procedure Load(CellValue: string); override; 45 48 end; … … 62 65 Default: Boolean; 63 66 function CreateControl(Owner: TComponent): TWinControl; override; 67 function GetControlValue(Control: TWinControl): string; override; 64 68 procedure SetupControl(Control: TWinControl); override; 65 69 procedure Load(CellValue: string); override; … … 83 87 Max: TDateTime; 84 88 function CreateControl(Owner: TComponent): TWinControl; override; 89 function GetControlValue(Control: TWinControl): string; override; 85 90 procedure SetupControl(Control: TWinControl); override; 86 91 procedure Load(CellValue: string); override; … … 95 100 Max: Double; 96 101 function CreateControl(Owner: TComponent): TWinControl; override; 102 function GetControlValue(Control: TWinControl): string; override; 97 103 procedure SetupControl(Control: TWinControl); override; 98 104 procedure Load(CellValue: string); override; … … 185 191 end; 186 192 193 function TDataTypeFloat.GetControlValue(Control: TWinControl): string; 194 begin 195 Result := MySQLFloatToStr(TFloatSpinEdit(Control).Value); 196 end; 197 187 198 procedure TDataTypeFloat.SetupControl(Control: TWinControl); 188 199 begin … … 202 213 end; 203 214 215 function TDataTypeDate.GetControlValue(Control: TWinControl): string; 216 begin 217 Result := DateTimeToSQL(TDateEdit(Control).Date); 218 end; 219 204 220 procedure TDataTypeDate.SetupControl(Control: TWinControl); 205 221 begin … … 217 233 begin 218 234 Result := TCheckBox.Create(Owner); 235 end; 236 237 function TDataTypeBoolean.GetControlValue(Control: TWinControl): string; 238 begin 239 Result := IntToStr(Integer(TCheckBox(Control).Checked)); 219 240 end; 220 241 … … 242 263 end; 243 264 265 function TDataTypeNumber.GetControlValue(Control: TWinControl): string; 266 begin 267 Result := IntToStr(TSpinEdit(Control).Value); 268 end; 269 244 270 procedure TDataTypeNumber.Load(CellValue: string); 245 271 begin … … 265 291 end; 266 292 293 function TDataTypeString.GetControlValue(Control: TWinControl): string; 294 begin 295 Result := TEdit(Control).Text; 296 end; 297 267 298 procedure TDataTypeString.Load(CellValue: string); 268 299 begin … … 282 313 end; 283 314 315 function TDataType.GetControlValue(Control: TWinControl): string; 316 begin 317 318 end; 319 284 320 procedure TDataType.Load(CellValue: string); 285 321 begin
Note:
See TracChangeset
for help on using the changeset viewer.