⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 untsread.~pas

📁 资料室图书借阅管理系统
💻 ~PAS
字号:
unit untsread;

interface

uses
  Classes, SysUtils, IWAppForm, IWApplication, IWTypes, IWGrids, IWDBGrids,
  IWHTMLControls, IWCompButton, IWVCLBaseControl, IWBaseControl, IWControl,
  IWCompLabel, Controls, Forms, untframe, IWCompEdit, IWCompListbox, DB,
  ADODB, IWBaseHTMLControl;

type
  Tfrmsread = class(TIWAppForm)
    IWFrame11: TIWFrame1;
    IWLabel1: TIWLabel;
    IWLabel2: TIWLabel;
    IWButton1: TIWButton;
    IWHRule1: TIWHRule;
    IWDBGrid1: TIWDBGrid;
    IWButton2: TIWButton;
    ADOQuery1: TADOQuery;
    DataSource1: TDataSource;
    DataSource2: TDataSource;
    IWLabel3: TIWLabel;
    IWComboBox1: TIWComboBox;
    IWLabel4: TIWLabel;
    IWEdit1: TIWEdit;
    IWDBGrid2: TIWDBGrid;
    ADOQuery2: TADOQuery;
    IWLabel5: TIWLabel;
    IWLabel6: TIWLabel;
    IWLabel7: TIWLabel;
    procedure IWButton1Click(Sender: TObject);
    procedure IWButton2Click(Sender: TObject);
    procedure IWAppFormCreate(Sender: TObject);
   
  public
  end;

implementation
uses untlog,untguest,servercontroller;
{$R *.dfm}

procedure Tfrmsread.IWButton1Click(Sender: TObject);
var
  tempstr:string;

begin
  tempstr:=trim(iwedit1.Text);
  if tempstr='' then
  begin
   webapplication.ShowMessage('文本框不能为空,请再次输入!');
  end
  else
  begin
  case iwcombobox1.ItemIndex of
    0: begin
         adoquery1.Close;
         adoquery1.SQL.Clear;
         adoquery1.SQL.Add('SELECT book.BookID as 书号, book.Name as 书名, book.Author as 作者, book.[co-Author] as 副主编, borrowreturn.Booktype as 书籍期刊状态, book.PublishID as 出版社,'+
         ' book.Price as 价格, book.sery as 所属丛书, book.Type as 类型, book.PubDate as 出版时间, book.LogDate as 录入时间,'+
                ' book.ISBN, book.zhuti as 主题词, book.fenleihao as 分类号, book.Memo as 附注  FROM book INNER JOIN borrowreturn ON book.BookID = borrowreturn.BookID '+
                ' where username='+quotedstr(tempstr));
         adoquery1.Open;

         end;//end 0
    1: begin
         adoquery1.Close;
         adoquery1.SQL.Clear;
         adoquery1.SQL.Add('SELECT book.BookID as 书号, book.Name as 书名, book.Author as 作者, book.[co-Author] as 副主编, borrowreturn.Booktype as 书籍期刊状态, book.PublishID as 出版社,'+
         ' book.Price as 价格, book.sery as 所属丛书, book.Type as 类型, book.PubDate as 出版时间, book.LogDate as 录入时间,'+
                ' book.ISBN, book.zhuti as 主题词, book.fenleihao as 分类号, book.Memo as 附注  FROM book INNER JOIN borrowreturn ON book.BookID = borrowreturn.BookID '+
                ' where userId='+quotedstr(tempstr));
         adoquery1.Open;


  end;  //end case
  end;  //end if
end;
end;


procedure Tfrmsread.IWButton2Click(Sender: TObject);
var
  tempstr2:string;

begin
  tempstr2:=trim(iwedit1.Text);
  if tempstr2='' then
  begin
    webapplication.ShowMessage('文本框不能为空,请再次输入!');
  end
  else
  begin
  case iwcombobox1.ItemIndex of
    0: begin
         adoquery2.Close;
         adoquery2.SQL.Clear;
        adoquery2.SQL.Add(' SELECT user11.UserId as 用户号, user11.username as 用户名 , user11.departID as 部门名称 , '+
        'user11.sex as 性别, user11.address as 地址, user11.telNum as 电话, user11.MobileNum as 手机, user11.zipcode as 邮政编码, user11.FaxNum as 传真, user11.Email, user11.memo as 附注 FROM user11   '+
              ' where user11.username='+quotedstr(tempstr2));
         adoquery2.Open;
          if adoquery1.RecordCount=0 then
         begin
         webapplication.ShowMessage('请确认姓名后再输入!');
         end;
         end;//end 0
    1:begin
         adoquery2.Close;
         adoquery2.SQL.Clear;
          adoquery2.SQL.Add(' SELECT user11.UserId as 用户号, user11.username as 用户名 , user11.departID as 部门名称 ,'+
          ' user11.sex as 性别, user11.address as 地址, user11.telNum as 电话, user11.MobileNum as 手机, user11.zipcode as 邮政编码, user11.FaxNum as 传真, user11.Email, user11.memo as 附注 FROM user11   '+
                ' where UserId='+quotedstr(tempstr2));
         adoquery2.Open;
          if adoquery2.RecordCount=0 then
         begin
         webapplication.ShowMessage('请确认编号后再输入!');
         end; //end 1
  end;  //end case
  end;  //end if
end;
end;

procedure Tfrmsread.IWAppFormCreate(Sender: TObject);
begin
adoquery1.ConnectionString := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source='+strglob+';Persist Security Info=False';
adoquery2.ConnectionString := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source='+strglob+';Persist Security Info=False';

end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -