📄 untluru.~pas
字号:
unit untluru;
interface
uses
Classes, SysUtils, IWAppForm, IWApplication, IWTypes, IWHTMLControls,
IWCompLabel, IWVCLBaseControl, IWBaseControl, IWControl, IWGrids,
IWDBGrids, DB, ADODB, Controls, Forms, untframe, IWCompMemo, IWCompEdit,
IWCompButton,Graphics, IWCompListbox,windows, IWCompCalendar,
IWVCLBaseContainer, IWContainer, IWRegion, IWBaseHTMLControl;
type
Tfrmluru = class(TIWAppForm)
IWFrame11: TIWFrame1;
ADOQuery1: TADOQuery;
DataSource1: TDataSource;
IWLabel1: TIWLabel;
IWHRule1: TIWHRule;
ADOQuery2: TADOQuery;
IWLabel2: TIWLabel;
IWLabel3: TIWLabel;
IWLabel4: TIWLabel;
IWLabel5: TIWLabel;
IWLabel6: TIWLabel;
IWLabel7: TIWLabel;
IWLabel8: TIWLabel;
IWLabel9: TIWLabel;
IWLabel10: TIWLabel;
IWLabel11: TIWLabel;
IWLabel12: TIWLabel;
IWLabel14: TIWLabel;
IWButton1: TIWButton;
IWButton2: TIWButton;
IWButton3: TIWButton;
IWButton4: TIWButton;
IWButton5: TIWButton;
IWButton6: TIWButton;
btnlast: TIWButton;
IWComboBox1: TIWComboBox;
IWEdit1: TIWEdit;
IWEdit7: TIWEdit;
IWEdit10: TIWEdit;
IWComboBox2: TIWComboBox;
IWDBGrid1: TIWDBGrid;
IWLabel13: TIWLabel;
IWLabel15: TIWLabel;
IWMemo1: TIWMemo;
IWEdit2: TIWEdit;
IWEdit3: TIWEdit;
IWEdit4: TIWEdit;
IWEdit5: TIWEdit;
IWEdit8: TIWEdit;
IWEdit6: TIWEdit;
IWEdit11: TIWEdit;
IWEdit9: TIWEdit;
btnprior: TIWButton;
btnnext: TIWButton;
btnfirst: TIWButton;
procedure IWAppFormCreate(Sender: TObject);
procedure IWButton1Click(Sender: TObject);
procedure IWButton5Click(Sender: TObject);
procedure IWButton6Click(Sender: TObject);
procedure btnfirstClick(Sender: TObject);
procedure btnlastClick(Sender: TObject);
procedure IWButton2Click(Sender: TObject);
procedure IWButton4Click(Sender: TObject);
procedure IWButton3Click(Sender: TObject);
procedure GoFish(const bookid: string);
procedure IWDBGrid1RenderCell(ACell: TIWGridCell; const ARow,
AColumn: Integer);
procedure ADOQuery1AfterScroll(DataSet: TDataSet);
procedure IWDBGrid1Columns0Click(ASender: TObject;
const AValue: String);
procedure btnpriorClick(Sender: TObject);
procedure btnnextClick(Sender: TObject);
public
end;
implementation
uses ServerController;
{$R *.dfm}
var
tempcobstr:string;
tempcobstr2:string;
procedure Tfrmluru.IWAppFormCreate(Sender: TObject);
begin
adoquery1.ConnectionString := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source='+strglob+';Persist Security Info=False';
adoquery1.Open ;
adoquery2.ConnectionString := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source='+strglob+';Persist Security Info=False';
adoquery2.Open ;
adoquery2.First;
while not adoquery2.Eof do
begin
iwcombobox1.Items.Add(adoquery2.fieldbyname('Name').AsString);
adoquery2.Next;
end;
adoquery2.Close;
adoquery1.Open;
iwedit1.Text:=adoquery1.fieldbyname('BookID').AsString;
iwedit2.Text:=adoquery1.fieldbyname('Name').AsString;
iwedit3.Text:=adoquery1.fieldbyname('Author').AsString;
iwedit4.Text:=adoquery1.fieldbyname('co-Author').AsString;
iwedit5.Text:=adoquery1.fieldbyname('zhuti').AsString;
iwedit8.Text:=adoquery1.fieldbyname('fenleihao').AsString;
tempcobstr:=adoquery1.fieldbyname('PublishID').AsString;
iwcombobox1.ItemIndex:=iwcombobox1.Items.IndexOf(tempcobstr);
iwedit6.Text:=adoquery1.fieldbyname('Price').AsString;
iwedit7.Text:=adoquery1.fieldbyname('sery').AsString;
tempcobstr2:=adoquery1.fieldbyname('Type').AsString;
iwcombobox2.ItemIndex:=iwcombobox2.Items.IndexOf(tempcobstr2);
//iwedit8.Text:=adoquery1.fieldbyname('Type').AsString;
iwedit9.Text:=adoquery1.fieldbyname('PubDate').AsString;
iwedit10.Text:=adoquery1.fieldbyname('LogDate').AsString;
iwedit11.Text:=adoquery1.fieldbyname('ISBN').AsString;
//iwedit12.Text:=adoquery1.fieldbyname('inID').AsString;
iwmemo1.Lines.Text:=adoquery1.fieldbyname('Memo').AsString;
end;
procedure Tfrmluru.IWButton1Click(Sender: TObject);
begin
adoquery1.Close;
iwedit1.Text:='';
iwedit2.text:='';
iwedit3.Text:='';
iwedit4.Text:='';
iwedit5.Text:='';
iwedit8.Text:='';
iwedit6.Text:='';
iwedit7.Text:='';
iwcombobox2.ItemIndex:=-1;
iwcombobox1.ItemIndex:=-1;
iwedit9.Text:='';
iwedit10.Text:=DateToStr(Date);
iwedit11.Text:='';
//iwedit12.Text:='';
iwmemo1.Lines.Clear;
iwedit1.SetFocus;
end;
procedure Tfrmluru.IWButton5Click(Sender: TObject);
begin
adoquery1.Open;
adoquery1.Prior;
end;
procedure Tfrmluru.IWButton6Click(Sender: TObject);
begin
adoquery1.Open;
adoquery1.Next;
end;
procedure Tfrmluru.IWButton2Click(Sender: TObject);
var
adoquery:tadoquery;
tempstr1:string;
begin
if trim(iwedit1.Text)='00' then
begin
webapplication.ShowMessage('该记录为系统设定,请不要删除');
end
else
begin
adoquery1.Open;
tempstr1:=adoquery1.fieldbyname('BookID').AsString;
adoquery:=tadoquery.Create(nil);
adoquery.Close;
adoquery.SQL.Clear;;
adoquery.ConnectionString:=adoquery1.ConnectionString;
adoquery.SQL.Add('select * from borrowreturn');
adoquery.Open;
adoquery.Locate('BookID',tempstr1,[]);
adoquery.Delete;
adoquery.Edit;
adoquery.Post;
adoquery.Free;
adoquery1.delete;
adoquery1.Edit;
adoquery1.Post;
iwedit1.Text:=adoquery1.fieldbyname('BookID').AsString;
iwedit2.Text:=adoquery1.fieldbyname('Name').AsString;
iwedit3.Text:=adoquery1.fieldbyname('Author').AsString;
iwedit4.Text:=adoquery1.fieldbyname('co-Author').AsString;
iwedit5.Text:=adoquery1.fieldbyname('zhuti').AsString;
iwedit8.Text:=adoquery1.fieldbyname('fenleihao').AsString;
tempcobstr:=adoquery1.fieldbyname('PublishID').AsString;
iwcombobox1.ItemIndex:=iwcombobox1.Items.IndexOf(tempcobstr);
iwedit6.Text:=adoquery1.fieldbyname('Price').AsString;
iwedit7.Text:=adoquery1.fieldbyname('sery').AsString;
// iwedit8.Text:=adoquery1.fieldbyname('Type').AsString;
tempcobstr2:=adoquery1.fieldbyname('Type').AsString;
iwcombobox2.ItemIndex:=iwcombobox2.Items.IndexOf(tempcobstr2);
iwedit9.Text:=adoquery1.fieldbyname('PubDate').AsString;
iwedit10.Text:=adoquery1.fieldbyname('LogDate').AsString;
iwedit11.Text:=adoquery1.fieldbyname('ISBN').AsString;
//iwedit12.Text:=adoquery1.fieldbyname('inID').AsString;
iwmemo1.Lines.Text:=adoquery1.fieldbyname('Memo').AsString;
end; //end ifelse
end;
procedure Tfrmluru.IWButton4Click(Sender: TObject);
begin
adoquery1.Open;
adoquery1.Cancel;
iwedit1.Text:=adoquery1.fieldbyname('BookID').AsString;
iwedit2.Text:=adoquery1.fieldbyname('Name').AsString;
iwedit3.Text:=adoquery1.fieldbyname('Author').AsString;
iwedit4.Text:=adoquery1.fieldbyname('co-Author').AsString;
iwedit5.Text:=adoquery1.fieldbyname('zhuti').AsString;
iwedit8.Text:=adoquery1.fieldbyname('fenleihao').AsString;
tempcobstr:=adoquery1.fieldbyname('PublishID').AsString;
iwcombobox1.ItemIndex:=iwcombobox1.Items.IndexOf(tempcobstr);
iwedit6.Text:=adoquery1.fieldbyname('Price').AsString;
iwedit7.Text:=adoquery1.fieldbyname('sery').AsString;
//iwedit8.Text:=adoquery1.fieldbyname('Type').AsString;
tempcobstr2:=adoquery1.fieldbyname('Type').AsString;
iwcombobox2.ItemIndex:=iwcombobox2.Items.IndexOf(tempcobstr2);
iwedit9.Text:=adoquery1.fieldbyname('PubDate').AsString;
iwedit10.Text:=adoquery1.fieldbyname('LogDate').AsString;
iwedit11.Text:=adoquery1.fieldbyname('ISBN').AsString;
//iwedit12.Text:=adoquery1.fieldbyname('inID').AsString;
iwmemo1.Lines.Text:=adoquery1.fieldbyname('Memo').AsString;
end;
procedure Tfrmluru.IWButton3Click(Sender: TObject);
var
str1,str2,str3,str4,str5,str6,str7,str8,str9,str10,str11,str12,str13,str14,str15:string;
adoquery:tadoquery;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -