摘要:
procedure TMainForm.edtListViewIndexKeyPress(Sender: TObject; var Key: Char); begin if not (Key in ['0'..'9', #8]) then Key := #0; end;在ONKEYPRESS里写下procedure Tform1.Edit1KeyPress(Sender: TObject; var... 阅读全文
摘要:
for i := 0 to self.ComponentCount - 1 do begin if Components[i] is TRzEdit then begin TRzEdit(Components[i]).Clear; TRzEdit(Components[i]).Modified := false; end; end; 阅读全文
摘要:
//打开指定的文件 OpenDialog1.InitialDir := ExtractFilePath(ParamStr(0)) + '.\data\'; OpenDialog1.Filter := '*.XLS'; OpenDialog1.Title := '打开Excel文件'; OpenDialog1.FileName := ''; if OpenDialog1.Execute then E... 阅读全文
摘要:
方法一: ADOQtemp.Close; ADOQtemp.Connection := DM.ADOConnection1; ADOQtemp.SQL.Clear; ADOQtemp.Parameters.Clear; ADOQtemp.SQL.Add('insert into LabelMainInfo() select * from tempLabelMainInfo where Operat... 阅读全文
摘要:
// 根据设置返回本机时间或服务器时间 tempServerDate := date; if gGetServerDate then begin ADOQtemp.Close; ADOQtemp.Connection := DM.ADOConnection1; ADOQtemp.SQL.Clear; ADOQtemp.SQL.Add('SELECT GETDATE() AS tempSQLSer... 阅读全文
摘要:
var maxbh: string;begin inherited; RzDateTimeEdit1.date := now; //计算序列号 ADOQuery1.Close; ADOQuery1.Connection := DM.ADOConnection1; ADOQuery1.SQL.Clear; ADOQuery1.Parameters.Clear; ADOQuery1.SQL.Add('... 阅读全文