欧美色欧美亚洲高清在线观看,国产特黄特色a级在线视频,国产一区视频一区欧美,亚洲成a 人在线观看中文

  1. <ul id="fwlom"></ul>

    <object id="fwlom"></object>

    <span id="fwlom"></span><dfn id="fwlom"></dfn>

      <object id="fwlom"></object>

      圖書管理系統(tǒng)數(shù)據(jù)庫(kù)源代碼

      時(shí)間:2019-05-14 04:30:03下載本文作者:會(huì)員上傳
      簡(jiǎn)介:寫寫幫文庫(kù)小編為你整理了多篇相關(guān)的《圖書管理系統(tǒng)數(shù)據(jù)庫(kù)源代碼》,但愿對(duì)你工作學(xué)習(xí)有幫助,當(dāng)然你在寫寫幫文庫(kù)還可以找到更多《圖書管理系統(tǒng)數(shù)據(jù)庫(kù)源代碼》。

      第一篇:圖書管理系統(tǒng)數(shù)據(jù)庫(kù)源代碼

      圖書管理系統(tǒng)數(shù)據(jù)庫(kù)源代碼

      //創(chuàng)建工程及設(shè)計(jì)主界面

      public class Main extends JFrame { private static final JDesktopPane {

      DESKTOP_PANE=new JDesktopPane();

      //桌面窗體

      } public static void main(String[] args)

      //入口方法

      {

      try

      {

      UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());//設(shè)置系統(tǒng)界面外觀

      new BookLogin();

      //登錄窗口

      }

      catch(Exception ex)

      {

      ex.printStackTrace();

      } } public static void addIFame(JInternalFrame iframe)

      //添加子窗體的方法

      {

      DESKTOP_PANE.add(iframe);

      //新增子窗體

      } public Main(){

      super();

      //設(shè)置“關(guān)閉”按鈕處理事件

      setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);

      //創(chuàng)建工具欄

      Toolkit tool=Toolkit,getDefaultToolkit();

      //獲得屏幕大小

      Dimension screenSize=tool.getScreenSize();

      setSize(800,600);

      //設(shè)置窗體大小

      setLocation((screenSize.width-getWidth())/2,(screenSize.height-getHeight())/2;//設(shè)置窗體位置

      setTitle(“圖書管理系統(tǒng)”);

      //設(shè)置窗體標(biāo)題

      JMenuBar menuBar=createMenu();

      //創(chuàng)建菜單欄

      setJMenuBar(menuBar);

      //設(shè)置菜單欄

      JToolBar toolBar=createToolBar();

      //創(chuàng)建工具欄的方法

      getContentPane(),add(toolBar,BorderLayout.NORTH);

      //設(shè)置工具欄

      final JLable lable=new JLable();

      //創(chuàng)建一個(gè)標(biāo)簽,用來顯示圖片

      lable.setBounds(0,0,0,0);

      //設(shè)置窗體的大小和位置

      lable.setIcon(null);

      //窗體背景

      DESKTOP_PANE.addComponentListener(new ComponentAdapter())

      {

      public void componentResized(final ComponentEvent e)

      {

      Dimension size=e.getComponent().getSize();

      //獲得組建大小

      lable.setSize(e.getComponent().getSize());

      //設(shè)置標(biāo)簽大小

      lable.setText(“”);

      //設(shè)置標(biāo)簽文本,設(shè)置窗口背景

      }

      }

      //將標(biāo)簽添加到桌面窗體

      DESKTOP_PANE.add(lable,new Integer(Integer.MIN_VALUE));

      getContentPane().add(DESKTOP_PANE);

      //將桌面窗體添加到主窗體中

      } } private JToolBar createToolBar()

      //創(chuàng)建工具欄的方法 { JToolBar toolBar=new JToolBar();

      //初始化工具欄

      toolBar.setFloatable(false);

      //設(shè)置是否可以移動(dòng)工具欄

      toolBar.setBorder(new BevelBorder(BevelBorder.RAIZED));

      //設(shè)置邊框

      //圖書信息添加按鈕

      JButton bookAddButton=new JButton(MenuActions.BOOK_ADD);ImageIcon icon=new ImageIcon(Main.class.getResource(“/bookAddtb.jpg”));//添加菜單欄圖標(biāo)

      bookAddButton.setIcon(icon);

      //設(shè)置按鈕圖標(biāo)

      bookAddButton.setHideActionText(true);

      //顯示提示文本

      toolBar.add(bookAddButton);

      //添加到工具欄中

      JButton bookModiAndDelButton=new JButton(MenuActions.BOOK_MODIFY);

      //圖書信息修改按鈕

      ImageIcon bookmodiicon=Icon.add(“bookModiAndDeltb.jpg”);

      //創(chuàng)建圖表方法

      bookModiAndDelButton.setIcon(bookmodiicon);

      //設(shè)置按鈕圖標(biāo)

      bookModiAndDelButton.setHideActionText(true);

      //顯示提示文本

      toolBar.add(bookModiAndDelButton);

      //添加到工具欄

      JButton bookTypeAddButton=new JButton(MenuActions.BOOKTYPE_ADD);

      //圖書類別添加按鈕

      ImageIcon bookTypeAddicon=Icon.add(“bookTypeAddtb.jpg”);

      //創(chuàng)建圖標(biāo)方法

      bookTypeAddButton.setIcon(bookTypeAddicon);

      //設(shè)置按鈕圖標(biāo)

      bookTypeAddButton.setHideActionText(true);

      //顯示提示文本

      toolBar.add(bookTypeAddButton);

      //添加到工具欄

      JButton bookBorrowButton=new JButton(MenuActions.BORROW);

      //圖書借閱按鈕

      ImageIcon bookBorrowicon=Icon.add(“bookBorrowtb.jpg”);

      //創(chuàng)建圖標(biāo)方法

      bookBorrowButton.setIcon(bookBorrowicon);

      //設(shè)置按鈕圖標(biāo)

      bookBorrowButton.setHideActionText(true);

      //顯示提示文本

      toolBar.add(bookBorrowButton);

      //添加到工具欄

      JButton bookOrderButton=new JButton(MenuActions.NEWBOOK_ORDER);

      //新書訂購(gòu)按鈕

      ImageIcon bookOrdericon=Icon.add(“bookOrdertb.jpg”);

      //創(chuàng)建圖標(biāo)方法

      bookOrderButton.setIcon(bookOrdericon);

      //設(shè)置按鈕圖標(biāo)

      bookOrderButton.setHideActionText(true);

      //顯示提示文本

      toolBar.add(bookOrderButton);

      //添加到工具欄

      JButton bookCheckButton=new JButton(MenuActions.NEWBOOK_CHECK);

      //驗(yàn)收新書按鈕

      ImageIcon bookCheckicon=Icon.add(“newbookChecktb.jpg”);

      //創(chuàng)建圖標(biāo)方法

      bookCheckButton.setIcon(bookCheckicon);

      //設(shè)置按鈕圖標(biāo)

      bookCheckButton.setHideActionText(true);

      //顯示提示文本

      toolBar.add(bookCheckButton);

      //添加到工具欄

      JButton readerAddButton=new JButton(MenuActions.READER_ADD);

      //讀者信息添加按鈕

      ImageIcon readerAddicon=Icon.add(“readerAddtb.jpg”);

      //創(chuàng)建圖標(biāo)方法

      readerAddButton.setIcon(readerAddicon);

      //設(shè)置按鈕圖標(biāo)

      readerAddButton.setHideActionText(true);

      //顯示提示文本

      toolBar.add(readerAddButton);

      //添加到工具欄

      JButton readerModiAndDelButton=new JButton(MenuActions.READER_MODIFY);

      //讀者信息修改按鈕

      ImageIcon readerModiAndDelicon=Icon.add(“readerModiAndDeltb.jpg”);

      //創(chuàng)建圖標(biāo)方法

      readerModiAndDelButton.setIcon(readerModiAndDelicon);

      //設(shè)置按鈕圖標(biāo)

      readerModiAndDelButton.setHideActionText(true);

      //顯示提示文本

      toolBar.add(readerModiAndDelButton);

      //添加到工具欄

      JButton ExitButton=new JButton(MenuActions.EXIT);

      //退出系統(tǒng)按鈕

      ImageIcon Exiticon=Icon.add(“exittb.jpg”);

      //創(chuàng)建圖標(biāo)方法

      ExitButton.setIcon(Exiticon);

      //設(shè)置按鈕圖標(biāo)

      ExitButton.setHideActionText(true);

      //顯示提示文本

      toolBar.add(ExitButton);

      //添加到工具欄

      return toolBar;} public class Business { protected static String dbClassName=“com.mysql.jdbc.Driver”;

      //數(shù)據(jù)庫(kù)驅(qū)動(dòng)類

      protected static String dbUr1=“jdbc:mysql://localhost/ts”;

      //連接URL protected static String dbUser=“root”;

      //數(shù)據(jù)庫(kù)用戶名

      protected static String dbpwd=“root”;

      //數(shù)據(jù)庫(kù)密碼

      private static Connection conn=null;

      //數(shù)據(jù)庫(kù)連接對(duì)象,初值為null public Business(){

      try

      {

      if(coon==null)

      //連接對(duì)象為空

      {

      Class.forName(dbClassName);

      //加載驅(qū)動(dòng)類信息

      conn=DriverManager.getConnection(dbUr1,dbUser,dbPwd);

      //建立連接對(duì)象

      }

      }

      catch(Exception ee)

      {

      ee.printStackTrace();

      } } public static ResultSet executeQuery(String sql)

      //執(zhí)行查詢方法

      {

      try

      {

      //如果連接對(duì)象為空,則重新調(diào)用構(gòu)造方法

      if(conn==null)

      {

      new Business();

      return conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE).executeQuery(sql);

      //執(zhí)行查詢

      }

      }

      catch(SQLException e)

      {

      e.printStackTrace();

      return null;

      //返回null值

      }

      finally

      {} } public static int executeUpdata(String sql)

      //更新方法

      {

      try

      {

      if(conn==null)

      {

      new Business();

      //如果連接對(duì)象為空,則重新調(diào)用構(gòu)造方法

      return conn.createStatement().executeUpdate(sql);//執(zhí)行更新

      }

      }

      catch(SQLException e)

      {

      e.printStackTrace();

      return-1;

      }

      finally

      {} } public static void close()

      //關(guān)閉方法 {

      try

      {

      conn.close();

      //關(guān)閉連接對(duì)象

      }

      catch(SQLException e)

      {

      e.printStackTrace();

      }

      finally

      {

      conn=null;

      //設(shè)置連接對(duì)象為null值

      } } }

      //為數(shù)據(jù)庫(kù)添加對(duì)應(yīng)的類 public class BookInfo { private String Book_id;

      //圖書編號(hào)

      private String typeid;

      //類別編號(hào)

      private String writer;

      //作者

      private String translator;//譯者

      private String publisher;

      //出版社

      private Date date;

      //出版日期

      private Double price;

      //圖書單價(jià)

      private String getBookname;//圖書名稱

      public String getBookname(){

      return bookname;} public void setBookname(String bookname){

      this.bookname=bookname;} public Date getDate(){

      return date;} public void setDate(Date date){

      this.date=date;} public string getBook_id()

      { return Book_id;} public void setBook_id(String Book_id){ this.Book_id=Book_id;} public Double getPrice(){ return price;} public void setprice(Double price){ this.price=price;} public String getPublisher(){ return Publisher;} public void setPublisher(String publisher){ this.Publisher=Publisher;} public String getTranslator(){ return translator;} public void setTranslator(String translator){ this.translator=translator;} public String getTypeid(){ return typeid;} public void setTypeid(String typeid){ this.typeid=typeid;} public String getWriter(){ return writer;} public void setWriter(String writer){

      this.writer=writer;} } public class BookType

      //圖書列表信息類 { private String id;

      //圖書類別編號(hào)

      private String typeName;

      //圖書類別名稱

      private String days;

      //可解天數(shù)

      private String fk;//每罰款金額

      public String getFk(){

      return fk;} public void setFk(String fk){

      this.fk=fk;} public String getDays(){

      return days;} public void setDays(String days){

      this.days=days;} public string getId(){

      return id;} public void setId(String id){

      this.Bid=id;} public String getTypeName(){

      return typeName;} public void setTypeName(String typeName){

      this.typeName=typeName;} } public class Order

      //圖書訂單信息類 {

      private String Book_id;

      //圖書編號(hào) private Date date;

      //下單時(shí)間 private String number;

      //圖書數(shù)量 private String operator;//操作員

      private String checkAndAccept;

      //是否收到貨 private String zk;

      //圖書折扣 public String getcheckAndAccept(){ return checkAndAccept;} public void setcheckAndAccept(String checkAndAccept){ this.checkAndAccept=checkAndAccept;} public Date getDate(){ return date;} public void setDate(Date date){ this.date=date;} public string getBook_id(){ return book_id;} public void setBook_id(String book_id){ this.book_id=book_id;} public String getNumber(){ return number;} public void setNumber(String number){ this.number=number;} public String getOperator(){ return operator;} public void setOperator(String operator){

      this.operatorr=operator;

      } public String getZk(){

      return zk;} public void setZk(String Zk){

      this.zk=zk;} } public class Operater { private String id;

      //操作員編號(hào)

      private String name;

      //操作員用戶名

      private String grade;

      //操作員等級(jí)

      private String password;//操作員密碼

      private String type;

      //出版社

      public String getType(){

      return type;} public void setType(String type){

      this.type=type;} public string getGrade(){

      return grade;} public void setGrade(String grade){

      this.grade=grade;} public String getId(){

      return id;} public void setId(String id){

      this.id=id;} public String getName(){

      return name;} public void setName(String name){

      this.name=name;} public String getPassword(){

      return password;} public void setPassword(String password){

      this.password=password;} } public class Borrow

      //書籍借閱信息類 { private int id;

      //借閱編號(hào)

      private String book_id;

      //圖書編號(hào)

      private String reader_id;

      //讀者編號(hào)

      private String num;

      //借書數(shù)量

      private String borrowDate;

      //借書日期

      private String backDate;

      //應(yīng)還日期

      private String Bookname;//圖書名稱

      public String getBookname(){

      return bookname;} public void setBookname(String bookname){

      this.bookname=bookname;} public string getBackDate(){

      return backDate;} public void setBackDate(String backDate){

      this.backDate=backDate;} public string getBorrowDate(){

      return borrowDate;} public void setBorrowDate(String borrowDate){

      this.borrowDate=borrowDate;} public String getNum(){

      return num;} public void setNum(String num){

      this.num=num;} public String getBook_id(){

      return book_id;} public void setBook_id(String book_id){

      this.book_id=book_id;} public String getReader_id(){

      return reader_id;} public void setReader_id(String reader_id){

      this.reader_id=reader_id;} public int getId(){

      return id;} public void setId(Int id){

      this.id=id;} } public class Back

      //圖書歸還信息類 { private String book_id;

      //圖書編號(hào)

      private String bookname;

      //圖書名稱

      private String operatorId;

      //操作員編號(hào)

      private String borrowDate;//圖書借閱時(shí)間

      private String backDate;

      //圖書歸還時(shí)間 private String readerName;

      //讀者姓名 private String reader_id;//讀者編號(hào) private int typeId;private int id; public int getId(){ return id;} public void setId(int id){ this.id=id;} public int getTypeId(){ return typeid;} public void setTypeId(int typeid){ this.typeId=typeId;} public string getBackDate(){ return backDate;} public void setBackDate(String backDate){ this.backDate=backDate;} public String getBookname(){ return bookname;} public void setBookname(String bookname){ this.bookname=bookname;} public string getBorrowDate(){ return borrowDate;} public void setBorrowDate(String borrowDate){ this.borrowDate=borrowDate;} public String getOperatorId(){

      return operatorId;} public void setOperatorId(String operatorId){

      this.operatorId=operatorId;} public String getBook_id(){

      return book_id;} public void setBook_id(String book_id){

      this.book_id=book_id;}

      public String getReader_id(){

      return reader_id;} public void setReader_id(String reader_id){

      this.reader_id=reader_id;}

      public String getReaderName(){

      return readerName;} public void setReaderName(String readerName){

      this.readerName=readerName;} }

      //系統(tǒng)登錄模塊設(shè)計(jì)

      public class BookLogin extends JFrame { private static final Operater Type=null;

      //人員類型

      private static Operater user;

      //用戶名

      private JPasswordField password;private JTextField username;private JButton login;private JButton reset;public BookLogin(){

      super();

      final BorderLayout borderLayout=new BorderLayout();

      //創(chuàng)建布局管理器

      setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

      //設(shè)置“關(guān)閉”按鈕處理事件

      borderLayout.setVgap(10);

      //設(shè)置組件間的垂直關(guān)系

      getContentPane().setLayout(borderLayout);

      //使用布局管理器

      setTitle(“圖書管理系統(tǒng)登錄”)

      //設(shè)置窗體標(biāo)題

      Toolkit tool=Toolkit.getDefaultToolkit();

      //獲得默認(rèn)的工具箱

      Dimension screenSize=tool.getScreenSize();//獲得屏幕的大小

      setSize(285,194);

      setLocation((screenSize.width-getWidth())/2,(screenSize.height-getHeight())/2);//設(shè)置窗體位置

      final JPanel mainPanel=new JPanel();

      //創(chuàng)建主面板

      mainPanel.setLayout(new BorderLayout());

      //設(shè)置邊框布局

      mainPanel.setBorder(new EmptyBorder(0,0,0,0))

      //設(shè)置邊框?yàn)?

      getContentPane().add(mainPanel);

      //在窗體中加入主面板

      final JLabel imageLabel=new JLabel;

      //創(chuàng)建一個(gè)標(biāo)簽,用來顯示圖片

      ImageIcon loginIcon=Icon.add(“l(fā)ogin.jpg”);

      //創(chuàng)建一個(gè)圖像圖標(biāo)

      imagelabel.setIcon(loginIcon);

      //設(shè)置圖片

      imageLabel.setOpaque(true);

      //設(shè)置繪制其邊界內(nèi)的所有像素

      imageLabel.setBackground(Color.GREEN);

      //設(shè)置背景顏色

      imageLabel.setpreferredSize(new Dimension(260,60));//設(shè)置標(biāo)簽大小

      mainPanel.add(imageLabel,BorderLayout.NORTH);

      //添加標(biāo)簽到主面板

      final JPanel centerPanel=new JPanel();

      //添加一個(gè)中心面板

      final GridLayout gridLayout=new GridLayout(2,2);//創(chuàng)建網(wǎng)絡(luò)布局管理器

      gridLayout.setHgap(5);

      //設(shè)置組件之間平行的距離

      gridLayout.setVgap(20);

      //設(shè)置組件之間垂直的距離

      centerPanel.setLayout(gridLayout);

      //使用布局管理器

      mainPanel.add(centerPanel);

      //添加到主桌面

      final JLabel userNamelabel=new JLabel();

      //創(chuàng)建一個(gè)標(biāo)簽

      userNameLabel.setHorizontalAlignment(SwingConstants.CENTER);//設(shè)置對(duì)齊方式

      userNameLabel.setPreferredSize(new Dimension(0,0));

      //設(shè)置組件大小

      userNameLabel.setMinimumSize(new Dimension(0,0));

      //設(shè)置組件最小的大小

      centerPanel.add(userNameLabel);

      //添加到中心面板

      userNameLabel.setText(“用

      名:”);

      //設(shè)置標(biāo)簽文本

      username=new JTextField(20);

      //創(chuàng)建文本框

      username.setPreferredSize(new Dimension(0,0));

      //設(shè)置組件大小

      centerPanel.add(username);

      //添加到中心面板

      final JLabel passwordLabel=new JLabel();

      //創(chuàng)建一個(gè)標(biāo)簽

      passwordLabel.setHorizontalAlignment(SwingConstants.CENTER);

      //設(shè)置對(duì)齊方式

      centerPanel.add(passwordLabel);

      //添加到中心面板

      passwordLabel.setText(“密

      碼:”);

      //設(shè)置標(biāo)簽文本

      password=new JPasswordField(20);

      //創(chuàng)建密碼框

      password.setDocument(new Document(6));

      //設(shè)置密碼長(zhǎng)度為6

      password.addKeyListener(new KeyAdapter()

      //監(jiān)聽密碼框

      {

      public void keyPressed(final keyEvent e)

      //監(jiān)聽鍵盤案件事件

      {

      if(e.getKeyCode()==10)

      //如果按了回車鍵

      {

      login.doClick();

      //進(jìn)行登錄

      }

      }

      })

      centerPanel.add(password);

      //添加到中心面板

      final JPanel southPanel=new JPanel;//新增一個(gè)底部面板

      mainPanel.add(southPanel,BorderLayout.SOUTH);

      //添加到主面板中

      login=new JButton();

      //創(chuàng)建按鈕組件

      login.addActionListener(new BookLoginAtion());

      //添加監(jiān)聽器

      login.setText(“登錄”);

      //設(shè)置按鈕文本

      southPanel.add(login);

      //把按鈕添加到底部面板

      reset=new JButton();

      //創(chuàng)建按鈕組件

      reset.addActionListener(new BookResetAction());

      //添加監(jiān)聽器

      reset.setText(“重置”);

      //設(shè)置按鈕文本

      southPanel.add(reset);

      //把按鈕添加到底部面板

      setVisible(true);

      //設(shè)置創(chuàng)建可見

      setResizable(false);

      //設(shè)置窗體不可改變大小

      } public static Operater getUser(){

      return user;} public static Operater getType(){

      return Type;} public static void setUser(Operater user){

      BookLogin.user=user;} } private class BookResetAction implements ActionListener { public void actionPerformed(final ActionEvent e){

      username.setText(“");//設(shè)置用戶名輸入框?yàn)榭?/p>

      password.setText(”“);//設(shè)置密碼輸入框?yàn)榭?/p>

      } } private class BookLoginAction implements ActionListener { public void actionPerformed(final ActionEvent e){

      user=Business.check(username.getText(),new String(password.getPassword()));//調(diào)用business方法

      if(user.getName()!=null)

      //判斷用戶名是否為null

      {

      try

      {

      Main frame=new Main();

      //創(chuàng)建一個(gè)主窗體

      frame.setVisible(true);

      //設(shè)置其可見

      BookLogin.this.setVisible(false);

      //設(shè)置登錄窗體為不顯示

      }

      catch(Exception ex)

      {

      ex.printStackTrace();

      }

      }

      else

      {

      JOptionPane.showMessageDialog(null,”請(qǐng)輸入正確的用戶名和密碼!“);//彈出提示框

      username.setText(”“);

      //設(shè)置用戶名輸入框?yàn)榭?/p>

      password.setText(”“);

      //設(shè)置密碼輸入框?yàn)榭?/p>

      } } }

      //基本信息管理模塊

      public class ReaderAdd extends JInternalFrame

      //添加讀者信息 { public ReaderAdd(){

      super();

      setTitle(”讀者相關(guān)信息添加“);

      setIconifiable(true);

      //設(shè)置窗體可最小化

      setClosable(true);

      //設(shè)置窗體可關(guān)閉

      setBounds(100,100,500,350);

      final JLabel logoLabel=new JLabel();

      ImageIcon readerAddIcon=Icon.add(”readerAdd.jpg“);

      logoLabel.setIcon(readerAddIcon);

      logoLabel.setOpaque(true);

      logoLabel.setBackground(Color.CYAN);

      logoLabel.setPreferredSize(new Dimension(400,60));

      getContentPane().add(logoLabel,BorderLayout.NORTH);

      final JPanel panel=new JPanel();

      panel.setLayout(new FlowLayout());

      getContentPane().add(panel);

      final JPanel panel_1=new JPanel();

      final GridLayout gridLayout=new GridLayout(0,4);

      gridLayout.setVgap(15);

      gridLayout.setHgap(15);

      panel_1.setLayout(gridLayout);

      panel_1.setPreferredSize(new Dimension(450,200));

      panel.add(panel_1);

      final JLabel label_2=new JLabel();

      label_2.setText(”姓名:“);

      panel_1.add(label_2);

      readername=new JTextField();

      readername.setDocument(new Document(10));

      panel_1.add(readername);

      final JLabel label_3=new JLabel();

      public void actionPerformed(final ActionEvent e)

      {

      Check validator=new Check();

      //校驗(yàn)類

      String zj=String.valueof(comboBox.getSelectedIndex());

      String id=read_id.getText().trim();

      Vector v1=new Vector();

      v1.clear();

      v1.add(”reader“);

      //讀取配置文件中相應(yīng)的查詢語(yǔ)句

      v1.add(id);

      if(l==validator.Validate(V1))

      //檢查是否存在該讀者

      {

      JOptionPane.showMessageDialog(null,”添加失敗,該讀者編號(hào)已存在!“);

      }

      else

      {

      Int i=Business.InsertReader(readername.getText().trim(),sex.trim(),age.getText().trim(),zjnumber.getText().trim(),Date.valueOf(date.getText().trim()),maxnumber.getText().trim().tel.getText().trim(),Double.valueof(keepmoney.getText().trim()),zj,zy.getText().trim(),Date.valueOf(bztime.getText().trim()),read_id.getText().trim());

      if(i==1)

      {

      JOptionPane.showMessageDialog(null,”添加成功!“);

      doDefaultCloseAction();

      }

      }

      }

      }

      class TelListener extends KeyAdapter

      { public void keyTyped(KeyEvent e){

      String numStr=”0123456789-“+(char)8;

      //類型轉(zhuǎn)換

      if(numStr.indexOf(e.getKeyChar())<0)

      {

      e.consume();

      } }

      }

      //添加“關(guān)閉”按鈕的事件監(jiān)聽器

      class CloseActionListener implements ActionListener

      {

      public void actionPerformed(final ActionEvent e)

      {

      doDefaultCloseAction();

      }

      }

      private String[] columnNames(”名稱“,”性別“,”年齡“,”證件號(hào)碼“,”借書證有效日期“,”借書量“,”電話“,”押金“,”證件“,”職業(yè)“,”讀者編號(hào)“,”辦證時(shí)間“);

      private String[] array=new String[]{”身份證“,”軍人證“,”學(xué)生證“};

      String id;

      private Object[][] getFileStates(List list)

      {

      Object[][]results=new Object[list.size()][columnNames.length];

      for(int i=0;i

      {

      Reader reader=(Reader)list.get(i);

      result[i][0]=reader.getName();

      //定義二維數(shù)組

      String sex;

      if(reader.getSex().equals(”1“))

      {

      sex=”男“;

      }

      else

      {

      sex=”女“;

      }

      results[i][1]=sex;

      //讀取讀者歌屬性值

      results[i][2]=reader.getAge();

      results[i][3]=reader.getIdentityCard();

      results[i][4]=reader.getDate();

      results[i][5]=reader.getMaxNum();

      results[i][6]=reader.getTel();

      results[i][7]=reader.getKeepMoney();

      results[i][8]=array[reader.getZj()];

      results[i][9]=reader.getZy();

      results[i][10]=reader.getBook_id();

      results[i][11]=reader.getBZtime();

      }

      return results;

      }

      //圖書類別管理

      //添加圖書信息

      utton.addActionListener(new ActionListener()

      {

      public void actionPerformed(final ActionEvent e)

      {

      if(bookTypeName.getText().length()==0)

      {

      JOptionPane.showMMessageDialog(null,”圖書類別文本框不可為空“);

      return;

      }

      if(days.getText().length()==0)

      {

      JOptionPane.showMessageDialog(null,”可借天數(shù)文本框不可為空“);

      return;

      }

      if(!check.isNumeric(days.getText().trim()))

      {

      JOptionPane.showMessageDialog(null,”可借天數(shù)必須為數(shù)字“);

      return;

      }

      if(fakuan.getText().length()==0)

      {

      JOptionPane.showMessageDialog(null,”罰款文本框不可為空“);

      return;

      }

      if(!check.isNumeric(fakuan.getText().trim()))

      {

      JOptionPane.showMessageDialog(null,”罰款必須為數(shù)字“);

      return;

      }

      int i=Business.InsertBookType(bookTypeName.getText().trim(),days.getText().trim(),Double.valueof(fakuan.getText.trim())/10);

      if(i==1)

      {

      JOptionPane.showMessageDialog(null,”添加成功!“);

      doDefaultCloseAction();

      }

      }

      });

      panel_6.add(button);

      final JButton buttonDel=new JButton();

      buttonDel.setText(”關(guān)閉“);

      buttonDel.addActionListener(new ActionListener(){

      public void actionPerformed(final ActionEvent e){

      doDefaultCloseAction();

      }

      });

      panel_6.add(buttonDel);

      setVisibel(true);}

      //修改圖書類

      class ButtonAddListener implements ActionListener{ public void actionPerformed(ActionEvent e){

      Object selectedItem=bookTypeModel.getSelectedItem();

      int i=Business.UpdatebookType(BookTypeId.getText().trim(),selectedItem.toString(),days.getText().trim(),fk.getText().trim());

      if(i==1)

      {

      JOptionPane.showMessageDialog(null,”修改成功");

      object[][] results=getFileStates(Business.selectBookCategory());

      model.setDataVector(results.columnNames);

      } } }

      table.setModel(model);

      第二篇:圖書管理系統(tǒng)源代碼

      環(huán)植學(xué)院深入開展創(chuàng)先爭(zhēng)優(yōu)活動(dòng)實(shí)施方案

      為貫徹落實(shí)中共中央、海南省委、省委教育工委及學(xué)校黨委“關(guān)于在黨的基層組織和黨員中深入開展創(chuàng)先爭(zhēng)優(yōu)活動(dòng)”的決定,根據(jù)相關(guān)文件精神,結(jié)合我院實(shí)際,特制定如下實(shí)施方案。

      一、總體要求

      根據(jù)上級(jí)黨組織要求,以鄧小平理論和“三個(gè)代表”重要思想為指導(dǎo),以深入學(xué)習(xí)實(shí)踐科學(xué)發(fā)展觀、實(shí)現(xiàn)海南大學(xué)又好又快發(fā)展為主題,以加快“211工程”建設(shè)、促進(jìn)新海大轉(zhuǎn)型升級(jí)為載體,以樹立優(yōu)良校風(fēng)學(xué)風(fēng)和立足崗位奉獻(xiàn)為重點(diǎn),堅(jiān)持服務(wù)學(xué)校教學(xué)科研和建設(shè)發(fā)展大局,振奮精神,改革創(chuàng)新,講求實(shí)效,統(tǒng)籌推進(jìn)黨的建設(shè)及其他經(jīng)常性工作,充分發(fā)揮基層黨組織的戰(zhàn)斗堡壘作用和共產(chǎn)黨員的先鋒模范作用,在推動(dòng)科學(xué)發(fā)展、構(gòu)建和諧校園、服務(wù)師生員工、加強(qiáng)基層組織以及服務(wù)海南國(guó)際旅游島建設(shè)的實(shí)踐中建功立業(yè)。

      通過開展創(chuàng)先爭(zhēng)優(yōu)活動(dòng),整體提高學(xué)院各級(jí)黨組織和黨員隊(duì)伍建設(shè)水平,樹立一批充分發(fā)揮戰(zhàn)斗堡壘作用、先鋒模范作用的先進(jìn)黨支部和優(yōu)秀共產(chǎn)黨員,為學(xué)校順利完成“211工程”項(xiàng)目建設(shè)、實(shí)現(xiàn)轉(zhuǎn)型升級(jí),進(jìn)而更好地服務(wù)海南國(guó)際旅游島建設(shè)提供堅(jiān)強(qiáng)的政治保證和組織保證。

      二、主要內(nèi)容

      創(chuàng)先爭(zhēng)優(yōu)活動(dòng)的主要內(nèi)容:創(chuàng)建先進(jìn)基層黨組織、爭(zhēng)當(dāng)優(yōu)秀共產(chǎn)黨員。

      1、先進(jìn)基層黨組織的基本要求:建設(shè)學(xué)習(xí)型黨組織,努力做到“五個(gè)好”: 一是領(lǐng)導(dǎo)班子好。深入學(xué)習(xí)實(shí)踐科學(xué)發(fā)展觀,全面貫徹黨的教育方針,認(rèn)真落實(shí)黨建工作責(zé)任制,團(tuán)結(jié)協(xié)作,求真務(wù)實(shí),勤政廉潔,有較強(qiáng)的凝聚力、戰(zhàn)斗力和創(chuàng)造力。二是黨員隊(duì)伍好。重視教職工黨員的發(fā)展和教育,黨員素質(zhì)優(yōu)良、黨員意識(shí)較強(qiáng)、精神面貌良好,切實(shí)發(fā)揮先鋒模范作用。三是工作機(jī)制好。圍繞學(xué)院改革發(fā)展開展形式多樣黨建活動(dòng),規(guī)章制度健全完善,管理措施到位,長(zhǎng)效機(jī)制建立務(wù)實(shí)有效。四是工作業(yè)績(jī)好。在開展“211工程”項(xiàng)目建設(shè)、深化教育教學(xué)改革、推進(jìn)學(xué)校各項(xiàng)事業(yè)中強(qiáng)化黨的政治領(lǐng)導(dǎo),圍繞中心、服務(wù)大局,解決問題、促進(jìn)發(fā)展,改革創(chuàng)新、成效明顯。五是群眾反映好。尊重愛護(hù)師生,為師生辦實(shí)事;工作措施符合師生意愿,工作作風(fēng)和工作實(shí)績(jī)師生滿意度高,黨組織得到師生擁護(hù),黨群干群關(guān)系密切。

      學(xué)生黨支部主要突出“三個(gè)好”:黨員培育好。能積極、有效做好大學(xué)生黨員的發(fā)展、教育和管理工作,引導(dǎo)廣大學(xué)生樹立堅(jiān)定的共產(chǎn)主義理想和信念;組織活動(dòng)好。經(jīng)常組織開展健康向上、豐富多樣的支部活動(dòng),支部建設(shè)充滿活力;發(fā)揮作用好。能較好地發(fā)揮支部的戰(zhàn)斗堡壘作用,以黨建帶團(tuán)建,以黨建促進(jìn)其他學(xué)生組織的健康發(fā)展和優(yōu)良學(xué)風(fēng)、班風(fēng)、校風(fēng)的形成,維護(hù)校園安全穩(wěn)定,在學(xué)生中具有較強(qiáng)的感召力。

      2、優(yōu)秀共產(chǎn)黨員的基本要求:模范履行黨章規(guī)定的義務(wù),努力爭(zhēng)當(dāng)“五個(gè)模范”。教工黨員要爭(zhēng)當(dāng):(1)學(xué)習(xí)鉆研的模范。認(rèn)真學(xué)習(xí)實(shí)踐科學(xué)發(fā)展觀,刻苦鉆研業(yè)務(wù)知識(shí),努力提高自身的黨性修養(yǎng)和能力水平,成為熱愛學(xué)習(xí)、學(xué)會(huì)學(xué)習(xí)和終身學(xué)習(xí)的楷模;(2)崗位奉獻(xiàn)的模范。忠誠(chéng)于黨的教育事業(yè),具有強(qiáng)烈的事業(yè)心、責(zé)任感,愛崗敬業(yè),勇挑重?fù)?dān),在教學(xué)、科研、管理或服務(wù)崗位上做出顯著業(yè)績(jī);(3)為人師表的模范。養(yǎng)成求真務(wù)實(shí)和嚴(yán)謹(jǐn)自律的治學(xué)態(tài)度,樹立高尚的道德情操和精神追求,教書育人、管理育人、服務(wù)育人,言傳身教,甘為人梯,以大德樹良師形象;(4)團(tuán)結(jié)協(xié)作的模范。熱愛集體,服務(wù)師生,團(tuán)結(jié)友愛,堅(jiān)決維護(hù)集體榮譽(yù)。樹立大局意識(shí)和團(tuán)隊(duì)精神,以團(tuán)隊(duì)協(xié)作爭(zhēng)創(chuàng)教學(xué)、科研的高層次成果,提升單位的整體管理、服務(wù)水平;(5)遵紀(jì)守法的模范。自覺遵守黨的紀(jì)律,帶頭遵守國(guó)家法律法規(guī)及學(xué)校各項(xiàng)規(guī)章制度,堅(jiān)持原則,弘揚(yáng)正氣,敢于同不良風(fēng)氣、違紀(jì)違法行為作斗爭(zhēng)。

      學(xué)生黨員要爭(zhēng)當(dāng)努力學(xué)習(xí)的模范、實(shí)踐創(chuàng)新的模范、自強(qiáng)自立的模范、尊師愛友的模范、遵紀(jì)守法的模范,努力使自己成為志向遠(yuǎn)大、品德高尚、知識(shí)豐富、能力較強(qiáng)的高素質(zhì)的優(yōu)秀學(xué)生。

      三、方法步驟

      按照上級(jí)組織要求,創(chuàng)先爭(zhēng)優(yōu)活動(dòng)通過公開承諾、領(lǐng)導(dǎo)點(diǎn)評(píng)、群眾評(píng)議、評(píng)選表彰的方式,圍繞迎接建黨90周年、向黨的十八大獻(xiàn)禮兩個(gè)重大節(jié)點(diǎn)推進(jìn)展開。本次活動(dòng)期間跨度2010-2012年的三個(gè)學(xué)年、六個(gè)學(xué)期。整個(gè)活動(dòng)分四個(gè)步驟進(jìn)行。

      (一)動(dòng)員部署、學(xué)習(xí)準(zhǔn)備階段(2010年4月—6月底)。主要抓好四項(xiàng)工作:

      1、動(dòng)員部署。學(xué)院黨委召開動(dòng)員大會(huì),進(jìn)行工作部署。

      2、制定方案。學(xué)院黨委圍繞學(xué)校創(chuàng)先爭(zhēng)優(yōu)活動(dòng)的主題、載體、重點(diǎn)和總體要求,從本單位實(shí)際情況出發(fā),制定切實(shí)可行的活動(dòng)實(shí)施方案;黨員要圍繞黨性修養(yǎng)、作風(fēng)養(yǎng)成、履行職責(zé)、崗位奉獻(xiàn)等方面提出參加活動(dòng)的具體打算。學(xué)院黨委、黨支部的活動(dòng)方案和黨員個(gè)人的具體打算要采取會(huì)議、網(wǎng)絡(luò)、活動(dòng)專欄等方式向群眾公布,重點(diǎn)做出承-2-

      諾,接受群眾監(jiān)督。

      3、組織學(xué)習(xí)。各黨支部組織黨員認(rèn)真學(xué)習(xí)胡錦濤總書記在全黨深入學(xué)習(xí)實(shí)踐科學(xué)發(fā)展觀活動(dòng)總結(jié)大會(huì)上的重要講話及學(xué)校相關(guān)文件精神,統(tǒng)一思想認(rèn)識(shí),積極投入到創(chuàng)先爭(zhēng)優(yōu)活動(dòng)中來。

      4、黨性分析。各黨支部在2010年春季學(xué)期結(jié)束前,集中一周時(shí)間,組織黨員進(jìn)行一次黨性分析,在職黨員應(yīng)撰寫黨性分析報(bào)告,并組織群眾對(duì)黨員進(jìn)行評(píng)議。

      (二)全面創(chuàng)爭(zhēng)、扎實(shí)推進(jìn)階段(2010年9月—2011年6月底)。學(xué)院黨委、黨支部和黨員根據(jù)實(shí)施方案和個(gè)人具體打算,緊密結(jié)合實(shí)際工作,認(rèn)真扎實(shí)、機(jī)動(dòng)靈活地開展創(chuàng)先爭(zhēng)優(yōu)活動(dòng)。具體圍繞幾項(xiàng)主題活動(dòng)展開:

      1、“師德教育”活動(dòng)。在教師節(jié)前后,對(duì)教職工黨員普遍進(jìn)行師德師風(fēng)教育,對(duì)學(xué)生黨員進(jìn)行優(yōu)良校風(fēng)學(xué)風(fēng)教育,促使一批優(yōu)秀共產(chǎn)黨員成為“三育人”標(biāo)兵、師德標(biāo)兵或?qū)W生標(biāo)兵。

      2、“崗位奉獻(xiàn)”活動(dòng)。從新學(xué)期開學(xué)開始,配合學(xué)校開展“211”建設(shè)先鋒、新海大創(chuàng)建標(biāo)兵、海大之星等推選評(píng)比活動(dòng)。

      3、“服務(wù)群眾”活動(dòng)。各黨支部組織黨員走向基層、走向社會(huì),開展志愿服務(wù)、結(jié)對(duì)幫扶、走訪慰問等活動(dòng);合理利用寒暑假時(shí)間,搞好調(diào)查研究和社會(huì)服務(wù),使黨員在聯(lián)系基層、奉獻(xiàn)社會(huì)的過程中增強(qiáng)責(zé)任感、使命感。

      4、“亮牌示范”活動(dòng)。通過設(shè)置黨員先鋒崗、示范崗或掛牌上崗等形式,樹立黨員形象,促使黨員發(fā)揮骨干、先鋒模范作用。

      5、“強(qiáng)基創(chuàng)先”活動(dòng)。優(yōu)化組織設(shè)置,創(chuàng)新組織形式和活動(dòng)方式,加強(qiáng)黨組織班子、制度建設(shè),強(qiáng)化組織功能,推動(dòng)創(chuàng)新發(fā)展,真正發(fā)揮學(xué)院黨組織的政治保證、戰(zhàn)斗堡壘作用,努力提高學(xué)院黨組織建設(shè)的科學(xué)化水平。

      2011年“七一”前,向?qū)W校黨委推薦表彰先進(jìn)黨組織、優(yōu)秀共產(chǎn)黨員和優(yōu)秀黨務(wù)工作者。

      (三)典型帶動(dòng)、全面提升階段(2011年9月—2012年6月底)。充分發(fā)揮先進(jìn)典型的示范帶動(dòng)作用,全面提升活動(dòng)的整體工作水平。主要抓好三項(xiàng)工作:

      1、樹立先進(jìn)典型。學(xué)校將確定一批“五個(gè)好”先進(jìn)基層黨組織和“五個(gè)模范”優(yōu)秀黨員、優(yōu)秀黨務(wù)工作者,采取組織先進(jìn)典型報(bào)告會(huì)、觀摩學(xué)習(xí)、宣傳報(bào)道等形式,擴(kuò)大先進(jìn)典型影響力。

      2、開展向先進(jìn)典型學(xué)習(xí)活動(dòng)。各黨支部和全體黨員,都要對(duì)照先進(jìn)典型,對(duì)照目標(biāo)要求和崗位職責(zé),查找自身差距,明確努力方向,制定跟進(jìn)、趕超的具體措施。

      3、實(shí)施全面提升工程。對(duì)照總體要求,著眼全面提升,進(jìn)一步加強(qiáng)黨組織建設(shè),促進(jìn)提升“五個(gè)好”先進(jìn)基層黨組織和“五個(gè)模范”優(yōu)秀黨員、優(yōu)秀黨務(wù)工作者的比例。

      2012年“七一”前,學(xué)校將根據(jù)上級(jí)組織部署,推薦表彰“2010—2012年創(chuàng)先爭(zhēng)優(yōu)活動(dòng)”先進(jìn)基層黨組織、優(yōu)秀共產(chǎn)黨員、優(yōu)秀黨務(wù)工作者。

      (四)回顧總結(jié)、完善機(jī)制階段(2012年9月——黨的十八大召開前)。圍繞向黨的十八大獻(xiàn)禮,這一階段重點(diǎn)抓好四項(xiàng)工作:

      1、展示成果。配合學(xué)校開展集中展示活動(dòng)成果活動(dòng)。

      2、搞好總結(jié)。學(xué)院黨委對(duì)開展創(chuàng)先爭(zhēng)優(yōu)活動(dòng)進(jìn)行系統(tǒng)總結(jié),認(rèn)真總結(jié)經(jīng)驗(yàn)、查找不足,進(jìn)一步研究制定改進(jìn)措施。

      3、考核評(píng)議。學(xué)校黨委對(duì)學(xué)院黨委、黨支部、黨員開展創(chuàng)先爭(zhēng)優(yōu)活動(dòng)情況進(jìn)行考核,并采取適當(dāng)方式組織黨員、群眾進(jìn)行評(píng)議。

      4、完善機(jī)制。對(duì)開展創(chuàng)先爭(zhēng)優(yōu)活動(dòng)中行之有效的科學(xué)做法用制度的形式固定下來,形成創(chuàng)先爭(zhēng)優(yōu)的長(zhǎng)效機(jī)制。

      四、組織領(lǐng)導(dǎo)

      學(xué)院成立創(chuàng)先爭(zhēng)優(yōu)活動(dòng)領(lǐng)導(dǎo)小組,在校黨委指導(dǎo)、院黨委領(lǐng)導(dǎo)下開展具體工作。各黨支部為活動(dòng)的落實(shí)單位,負(fù)責(zé)具體的學(xué)習(xí)、黨內(nèi)分析、主題活動(dòng)、總結(jié)評(píng)議等工作。

      1、領(lǐng)導(dǎo)小組成員包括:組長(zhǎng):沈秀清;副組長(zhǎng):崔昌華;成員:全體黨委委員、綜合辦主任、各黨支部書記。

      2、按照校黨委的要求,學(xué)院創(chuàng)先爭(zhēng)優(yōu)活動(dòng)要堅(jiān)持服務(wù)大局,圍繞科教中心工作、密切聯(lián)系群眾、經(jīng)常性為主的原則,并努力形成學(xué)習(xí)先進(jìn)、崇尚先進(jìn)、爭(zhēng)當(dāng)先進(jìn)的活動(dòng)氛圍和風(fēng)氣。

      3、各黨支部要組織好各項(xiàng)具體工作,結(jié)合實(shí)際,力求實(shí)效,以創(chuàng)先爭(zhēng)優(yōu)活動(dòng)的成果推進(jìn)學(xué)院黨的建設(shè)和各項(xiàng)工作,促進(jìn)學(xué)院又好又快發(fā)展。

      環(huán)境與植物保護(hù)學(xué)院黨委

      2010年5月31日

      第三篇:vb圖書管理系統(tǒng)源代碼

      Borbook:

      Public sqltxt As String Public rno As String

      '保存讀者借書證號(hào) Public bno As String

      '保存讀者圖書編號(hào) Public xm As String

      '保存讀者姓名 Public dw As String

      '保存讀者單位 Public rs As ADODB.Recordset

      Private Sub Comm1_Click()

      rno = Trim(Text1(0).Text)

      If rno = “" Then

      MsgBox ”借書證號(hào)不能為空,請(qǐng)輸入“, vbOKOnly, ”信息提示“

      Comm2.Enabled = False

      Else

      sqltxt = ”select * from reader where 借書證號(hào)='“ + rno + ”'“

      Set rs = exesql(sqltxt)

      If rs.RecordCount = 0 Then

      MsgBox ”該讀者未登記,不能借書“, vbOKOnly, ”信息提示“

      Comm2.Enabled = False

      Else

      Text2(0).Text = rs.Fields(”姓名“)

      Text2(1).Text = str(rs.Fields(”借書總數(shù)“))

      Text2(2).Text = str(rs.Fields(”借書總數(shù)“)rs.Fields(”已借書數(shù)“))

      End If

      End If

      End If End Sub

      Private Sub retCom_Click()

      Unload Me End Sub

      Private Sub Form_Load()

      Comm2.Enabled = False End Sub

      Edbook:

      Private Sub DataGrid1_Click()

      End Sub

      Private Sub Form_Load()

      '說明:為什么使用recs,而不直接使用adodc1.recordset.recordcount?在調(diào)用edbook1窗體添加一個(gè)記錄(確定)后,再

      '返回到本表單,若不在Form_Activate()事件過程中調(diào)用adodc1.refresh進(jìn)行刷新,adodc1.recordset.recordcount值

      '仍未增1,這樣調(diào)用encomm過程時(shí)出錯(cuò);若在Form_Activate()事件過程中調(diào)用adodc1.refresh進(jìn)行刷新,'adodc1.recordset.recordcount值增1了,調(diào)用encomm過程時(shí)也正確,但返回本窗體時(shí),當(dāng)前行總是第一行,顯然也不行,'因?yàn)橛脩粼谔砑踊蛐薷暮笙M赿atagrid1中顯示當(dāng)前操作的那條記錄.recs = Adodc1.Recordset.RecordCount End Sub

      Private Sub Form_Activate()

      DataGrid1.SetFocus

      Call encomm End Sub

      Private Sub Comm1_Click()

      flag = 1

      edbook1.Show vbModal End Sub

      Private Sub Comm2_Click()

      flag = 2

      edbook1.Show vbModal End Sub

      Private Sub Comm3_Click()

      If MsgBox(”真的要?jiǎng)h除[“ + Trim(Adodc1.Recordset.Fields(”書名“))+ ”]嗎?“, vbYesNo, ”信息提示“)= vbYes Then

      Adodc1.Recordset.Delete

      recs = recs1

      Call encomm

      End If End Sub

      Private Sub Comm4_Click()

      Unload Me End Sub

      Private Sub encomm()

      If recs = 0 Then

      Comm2.Enabled = False

      Comm3.Enabled = False

      Else

      Comm2.Enabled = True

      Comm3.Enabled = True

      End If End Sub

      Edlev1:

      Dim cond As String

      Private Sub Form_Load()

      If flag = 2 Then

      Text1(0).Text = edlev.Adodc1.Recordset.Fields(”級(jí)別“)

      Text1(1).Text = edlev.Adodc1.Recordset.Fields(”過期罰款“)

      Text1(2).Text = edlev.Adodc1.Recordset.Fields(”借書總數(shù)“)

      Text1(3).Text = edlev.Adodc1.Recordset.Fields(”借書天數(shù)“)

      End If End Sub

      Private Sub Comm1_Click()

      If Trim(Text1(0).Text)= ”“ Or Trim(Text1(1).Text)= ”“ Or Trim(Text1(2).Text)= ”“ Or _

      Trim(Text1(3).Text)= ”“ Then

      MsgBox ”數(shù)據(jù)項(xiàng)不全,請(qǐng)重新設(shè)置“, vbOKOnly, ”信息提示“

      Text1(0).SetFocus

      Exit Sub

      End If

      If flag = 1 Then '添加操作

      If edlev.Adodc1.Recordset.RecordCount > 0 Then '原記錄個(gè)數(shù)大于0

      cond = ”級(jí)別='“ + Trim(Text1(0).Text)+ ”'“

      edlev.Adodc1.Recordset.MoveFirst

      '每次從頭開始查找

      edlev.Adodc1.Recordset.Find(cond)

      If Not edlev.Adodc1.Recordset.EOF()Then

      MsgBox ”存在完全相同的記錄“, vbOKOnly, ”信息提示“

      Text1(0).SetFocus

      Exit Sub

      End If

      End If

      edlev.Adodc1.Recordset.AddNew

      edlev.Adodc1.Recordset.Fields(”級(jí)別“)= Trim(Text1(0).Text)

      edlev.Adodc1.Recordset.Fields(”過期罰款“)= Val(Trim(Text1(1).Text))

      edlev.Adodc1.Recordset.Fields(”借書總數(shù)“)= Val(Trim(Text1(2).Text))

      edlev.Adodc1.Recordset.Fields(”借書天數(shù)“)= Val(Trim(Text1(3).Text))

      edlev.Adodc1.Recordset.Update

      recs = recs + 1

      Else

      '修改操作

      n = edlev.Adodc1.Recordset.AbsolutePosition

      cond = ”級(jí)別='“ + Trim(Text1(0).Text)+ ”'“

      edlev.Adodc1.Recordset.MoveFirst '每次從頭開始查找

      edlev.Adodc1.Recordset.Find(cond)

      If Not edlev.Adodc1.Recordset.EOF()And edlev.Adodc1.Recordset.AbsolutePosition <> n Then

      MsgBox ”存在完全相同的記錄“, vbOKOnly, ”信息提示“

      edlev.Adodc1.Recordset.MoveFirst

      '這兩個(gè)語(yǔ)句恢復(fù)原記錄位置

      edlev.Adodc1.Recordset.Move(n1)

      edlev.Adodc1.Recordset.Fields(”級(jí)別“)= Trim(Text1(0).Text)

      edlev.Adodc1.Recordset.Fields(”過期罰款“)= Val(Trim(Text1(1).Text))

      edlev.Adodc1.Recordset.Fields(”借書總數(shù)“)= Val(Trim(Text1(2).Text))

      edlev.Adodc1.Recordset.Fields(”借書天數(shù)“)= Val(Trim(Text1(3).Text))

      edlev.Adodc1.Recordset.Update

      End If

      Unload Me End Sub

      Private Sub Comm2_Click()

      Unload Me End Sub

      Edreader:

      Private Sub DataGrid1_Click()

      End Sub

      Private Sub Form_Load()

      recs = Adodc1.Recordset.RecordCount End Sub

      Private Sub Form_Activate()

      DataGrid1.SetFocus

      Call encomm End Sub

      Private Sub Comm1_Click()

      flag = 1

      edreader1.Show vbModal End Sub

      Private Sub Comm2_Click()

      flag = 2

      edreader1.Show vbModal End Sub

      Private Sub Comm3_Click()

      If MsgBox(”真的要?jiǎng)h除[“ + Trim(Adodc1.Recordset.Fields(”姓名“))+ ”]嗎?“, vbYesNo, ”信息提示“)= vbYes Then

      Adodc1.Recordset.Delete

      recs = recs1

      Call encomm

      End If End Sub Private Sub Comm4_Click()

      Adodc1.Recordset.UpdateBatch

      Adodc1.Recordset.Close

      Unload Me End Sub Private Sub encomm()

      If recs = 0 Then

      Comm2.Enabled = False

      Comm3.Enabled = False

      Else

      Comm2.Enabled = True

      Comm3.Enabled = True

      End If End Sub

      Edrec1:

      Dim cond As String

      Private Sub Form_Load()

      Label1.Caption = cap

      If flag = 1 Then

      Text1.Text = ”“

      Else

      Text1.Text = edrec.Adodc1.Recordset.Fields(”fn“)

      End If End Sub

      Private Sub Comm1_Click()

      If Trim(Text1.Text)= ”“ Then

      MsgBox ”數(shù)據(jù)項(xiàng)不能為空,請(qǐng)重新設(shè)置“, vbOKOnly, ”信息提示“

      Text1.SetFocus

      Exit Sub

      End If

      If flag = 1 Then '添加操作

      If edrec.Adodc1.Recordset.RecordCount > 0 Then '原記錄個(gè)數(shù)大于0

      cond = ”fn='“ + Trim(Text1.Text)+ ”'“

      edrec.Adodc1.Recordset.MoveFirst

      '每次從頭開始查找

      edrec.Adodc1.Recordset.Find(cond)

      If Not edrec.Adodc1.Recordset.EOF()Then

      MsgBox ”存在完全相同的記錄“, vbOKOnly, ”信息提示“

      Text1.SetFocus

      Exit Sub

      End If

      End If

      edrec.Adodc1.Recordset.AddNew

      edrec.Adodc1.Recordset.Fields(”fn“)= Trim(Text1.Text)

      edrec.Adodc1.Recordset.Update

      recs = recs + 1

      Else

      '修改操作

      n = edrec.Adodc1.Recordset.AbsolutePosition

      cond = ”fn='“ + Trim(Text1.Text)+ ”'“

      edrec.Adodc1.Recordset.MoveFirst '每次從頭開始查找

      edrec.Adodc1.Recordset.Find(cond)

      If Not edrec.Adodc1.Recordset.EOF()And edrec.Adodc1.Recordset.AbsolutePosition <> n Then

      MsgBox ”存在完全相同的記錄“, vbOKOnly, ”信息提示“

      edrec.Adodc1.Recordset.MoveFirst

      '這兩個(gè)語(yǔ)句恢復(fù)原記錄位置

      edrec.Adodc1.Recordset.Move(n1)

      edrec.Adodc1.Recordset.Fields(”fn“)= Trim(Text1.Text)

      edrec.Adodc1.Recordset.Update

      End If

      Unload Me End Sub

      Private Sub Comm2_Click()

      Unload Me End Sub

      Menu:

      Private Sub MDIForm_Load()

      If Not userlevel = ”系統(tǒng)管理員“ Then

      menu21.Enabled = False

      menu31.Enabled = False

      menu41.Enabled = False

      menu42.Enabled = False

      End If End Sub

      Private Sub menu11_Click()

      borbook.Show vbModal End Sub

      Private Sub menu12_Click()

      retbook.Show vbModal End Sub

      Private Sub menu13_Click()

      End End Sub

      Private Sub menu21_Click()

      edbook.Show vbModal End Sub

      Private Sub menu22_Click()

      qubook.Show vbModal End Sub

      Private Sub menu31_Click()

      edreader.Show vbModal End Sub

      Private Sub menu32_Click()

      qureader.Show vbModal End Sub

      Private Sub menu41_Click()

      setuser.Show vbModal End Sub

      Private Sub menu42_Click()

      If MsgBox(”本功能要清除系統(tǒng)中所有數(shù)據(jù),真的初始化嗎?“, vbYesNo, ”確認(rèn)初始化操作“)

      = vbYes Then

      Call deldata(”book“)Call deldata(”reader“)Call deldata(”borrow“)Call deldata(”rlevel“)

      Call deldata(”depart“)

      Call deldata(”press“)

      Call deldata(”oper“)

      MsgBox ”系統(tǒng)初始化完畢,下次只能以1234/1234(用戶名/口令)進(jìn)入本系統(tǒng)“, vbOKOnly, ”信息提示“

      End If End Sub

      Pass:

      Public n As Integer

      Private Sub Command1_Click()

      Dim mrc As ADODB.Recordset

      txtsql = ”select * from oper where 用戶名='“ & _

      Trim$(Text1(0).Text)& ”'“ & ” And 口令 = '“ & Trim$(Text1(1).Text)+ ”'“

      Set mrc = exesql(txtsql)

      If mrc.RecordCount = 0 Then '未找到用戶記錄

      n = n + 1

      If n < 3 Then

      MsgBox ”沒有這個(gè)用戶,繼續(xù)登錄“, vbOKOnly + vbExclamation, ”信息提示“

      Text1(0).Text = ”“

      Text1(1).Text = ”“

      Text1(0).SetFocus

      Else

      MsgBox ”已登錄失敗三次,退出系統(tǒng)“, vbOKOnly + vbExclamation, ”信息提示“

      mrc.Close

      Unload Me

      End If

      Else

      '找到合法用戶記錄

      userlevel = Trim(mrc.Fields(”級(jí)別“))

      mrc.Close

      Unload Me

      menu.Show '調(diào)用menu窗體

      End If End Sub

      Private Sub Command2_Click()

      Unload Me End Sub

      Private Sub Form_Load()

      n = 0

      'n保存登錄的次數(shù) End Sub

      Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)

      Call endata(KeyAscii)End Sub

      Qubook:

      Private Sub Comm1_Click()

      Dim sqltxt As String

      If Adodc1.Recordset.Fields(”借否“)= ”借“ Then

      no = Trim(Adodc1.Recordset.Fields(”圖書編號(hào)“))

      sqltxt = ”select * from borrow where 圖書編號(hào)='“ + no + ”'“

      Set rs = exesql(sqltxt)

      If rs.RecordCount = 0 Then

      MsgBox ”該圖書沒有借書記錄“, vbOKOnly, ”信息提示“

      Else

      MsgBox ”圖書編號(hào):“ + no + Chr(10)+ Chr(13)+ _

      ”書

      名:“ + Trim(rs.Fields(”書名“))+ Chr(10)+ Chr(13)+ _

      ”借 書 人:“ + Trim(rs.Fields(”姓名“))+ Chr(10)+ Chr(13)+ _

      ”單

      位:“ + Trim(rs.Fields(”單位“))+ Chr(10)+ Chr(13)+ _

      ”借書日期:“ + Format(rs.Fields(”借書日期“), ”yyyy.mm.dd“), vbOKOnly, ”查找結(jié)果“

      End If

      rs.Close

      Else

      MsgBox ”該書沒有外借,不能顯示借書人“, vbOKOnly, ”信息提示“

      End If End Sub

      Private Sub Comm2_Click()

      Unload Me End Sub

      Private Sub Form_Activate()

      Adodc1.Refresh

      DataGrid1.Refresh

      DataGrid1.SetFocus

      Call encomm End Sub

      Private Sub selcmd1_Click()'設(shè)置條件確定

      Dim str As String

      str = ”“

      '條件表達(dá)式

      If Trim(Text1(0).Text)<> ”“ Then

      If str = ”“ Then

      str = ”圖書編號(hào)='“ + Trim(Text1(0).Text)+ ”'“

      Else

      str = str + ” and 圖書編號(hào)='“ + Trim(Text1(0).Text)+ ”'“

      End If

      End If

      If Trim(Text1(1).Text)<> ”“ Then

      If str = ”“ Then

      str = ”書名='“ + Trim(Text1(1).Text)+ ”'“

      Else

      str = str + ” and 書名='“ + Trim(Text1(1).Text)+ ”'“

      End If

      End If

      If Trim(Text1(2).Text)<> ”“ Then

      If str = ”“ Then

      str = ”作者='“ + Trim(Text1(2).Text)+ ”'“

      Else

      str = str + ” and 作者='“ + Trim(Text1(2).Text)+ ”'“

      End If

      End If

      If Trim(Text1(3).Text)<> ”“ Then

      If str = ”“ Then

      str = ”出版社='“ + Trim(Text1(3).Text)+ ”'“

      Else

      str = str + ” and 出版社='“ + Trim(Text1(3).Text)+ ”'“

      End If

      End If

      If Trim(Text1(4).Text)<> ”“ Then

      If str = ”“ Then

      str = ”借否='“ + Trim(Text1(4).Text)+ ”'“

      Else

      str = str + ” and 借否='“ + Trim(Text1(4).Text)+ ”'“

      End If

      End If

      If Trim(Text1(5).Text)<> ”“ Then

      If str = ”“ Then

      str = ”定價(jià)=“ + Trim(Text1(5).Text)

      Else

      str = str + ” and 定價(jià)=“ + Trim(Text1(5).Text)

      End If

      End If

      If str <> ”“ Then

      Adodc1.RecordSource = ”select * from book where “ + str

      Adodc1.Refresh

      Else

      Adodc1.RecordSource = ”select * from book“

      Adodc1.Refresh

      End If

      If Adodc1.Recordset.RecordCount = 0 Then

      MsgBox ”沒有任何滿足條件的記錄“, vbOKOnly, ”信息提示“

      End If

      Call encomm End Sub

      Private Sub selcmd2_Click()'設(shè)置條件重置

      Text1(0).Text = ”“

      Text1(1).Text = ”“

      Text1(2).Text = ”“

      Text1(3).Text = ”“

      Text1(4).Text = ”“

      Text1(5).Text = ”“ End Sub

      Private Sub encomm()'自定義子過程:判斷Adodc1中是否存在記錄

      If Adodc1.Recordset.RecordCount = 0 Then

      Comm1.Enabled = False

      Else

      Comm1.Enabled = True

      End If End Sub

      Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)

      Call endata(KeyAscii)End Sub

      Qureader:

      Private Sub Comm1_Click()

      Dim strn As String

      Dim sqltxt As String

      no = Trim(Adodc1.Recordset.Fields(”借書證號(hào)“))

      sqltxt = ”select * from borrow where 借書證號(hào)='“ + no + ”'“

      Set rs = exesql(sqltxt)

      If rs.RecordCount = 0 Then

      MsgBox ”該讀者沒有借任何圖書“, vbOKOnly, ”信息提示“

      Else

      rs.MoveFirst

      strn = ”書

      名(借書日期)“ + Chr(10)+ Chr(13)

      Do While Not rs.EOF()

      strn = strn & Trim(rs.Fields(”書名“))& ”(“ & Format(rs.Fields(”借書日期“), ”yyyy.mm.dd“)& ”)“ + Chr(10)+ Chr(13)

      rs.MoveNext

      Loop

      MsgBox strn, vbOKOnly, ”列所借圖書清單“

      rs.Close

      End If End Sub

      Private Sub Comm2_Click()

      Unload Me End Sub

      Private Sub Form_Activate()

      Adodc1.Refresh

      DataGrid1.Refresh

      DataGrid1.SetFocus

      Call encomm End Sub

      Private Sub selcmd1_Click()'設(shè)置條件確定

      Dim str As String

      str = ”“

      '條件表達(dá)式

      If Trim(Text1(0).Text)<> ”“ Then

      If str = ”“ Then

      str = ”借書證號(hào)='“ + Trim(Text1(0).Text)+ ”'“

      Else

      str = str + ” and 借書證號(hào)='“ + Trim(Text1(0).Text)+ ”'“

      End If

      End If

      If Trim(Text1(1).Text)<> ”“ Then

      If str = ”“ Then

      str = ”姓名='“ + Trim(Text1(1).Text)+ ”'“

      Else

      str = str + ” and 姓名='“ + Trim(Text1(1).Text)+ ”'“

      End If

      End If

      If Trim(Text1(2).Text)<> ”“ Then

      If str = ”“ Then

      str = ”單位='“ + Trim(Text1(2).Text)+ ”'“

      Else

      str = str + ” and 單位='“ + Trim(Text1(2).Text)+ ”'“

      End If

      End If

      If Trim(Text1(3).Text)<> ”“ Then

      If str = ”“ Then

      str = ”級(jí)別='“ + Trim(Text1(3).Text)+ ”'“

      Else

      str = str + ” and 級(jí)別='“ + Trim(Text1(3).Text)+ ”'“

      End If

      End If

      If Trim(Text1(4).Text)<> ”“ Then

      If str = ”“ Then

      str = ”性別='“ + Trim(Text1(4).Text)+ ”'“

      Else

      str = str + ” and 性別='“ + Trim(Text1(4).Text)+ ”'“

      End If

      End If

      If str <> ”“ Then

      Adodc1.RecordSource = ”select * from reader where “ + str

      Adodc1.Refresh

      Else

      Adodc1.RecordSource = ”select * from reader“

      Adodc1.Refresh

      End If

      If Adodc1.Recordset.RecordCount = 0 Then

      MsgBox ”沒有任何滿足條件的記錄“, vbOKOnly, ”信息提示“

      End If

      Call encomm End Sub

      Private Sub selcmd2_Click()'設(shè)置條件重置

      Text1(0).Text = ”“

      Text1(1).Text = ”“

      Text1(2).Text = ”“

      Text1(3).Text = ”“

      Text1(4).Text = ”“ End Sub

      Private Sub encomm()'自定義子過程:判斷Adodc1中是否存在記錄

      If Adodc1.Recordset.RecordCount = 0 Then

      Comm1.Enabled = False

      Else

      Comm1.Enabled = True

      End If End Sub

      Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)

      Call endata(KeyAscii)End Sub

      Retbook:

      Public rno As String Public bno As String

      Private Sub Comm1_Click()

      bno = Trim(Text1.Text)

      If bno <> ”“ Then

      Dim sqltxt As String

      sqltxt = ”select * from borrow where 圖書編號(hào)='“ + bno + ”'“

      Set brs = exesql(sqltxt)

      If brs.RecordCount = 0 Then

      MsgBox ”該書不是從本圖書館所借的,不能歸還!“, vbOKOnly, ”信息提示“

      Else

      If Trim(brs.Fields(”借書證號(hào)“))<> rno Then

      If rno <> ”“ Then

      '另一讀者還書,自動(dòng)列出上一個(gè)還書人的罰款單

      dstr = ”罰款單“ + Chr(10)+ Chr(13)

      dstr = dstr & ”姓名:“ & Trim(Text2(1).Text)+ ”(“ + rno + ”)罰款總額:“ & str(Text2(4).Text)& ”元“

      MsgBox dstr, vbOKOnly, ”列罰款單“

      End If

      rno = Trim(brs.Fields(”借書證號(hào)“))

      sqltxt = ”select * from book where 圖書編號(hào)='“ + bno + ”'“ '處理圖書記錄

      Set bs = exesql(sqltxt)

      bs.Fields(”借否“)= ”否“

      bs.Update

      sqltxt = ”select * from reader where 借書證號(hào)='“ + rno + ”'“ '處理讀者記錄

      Set rs = exesql(sqltxt)

      rs.Fields(”已借書數(shù)“)= rs.Fields(”已借書數(shù)“)rs.Fields(”已借書數(shù)“)

      If(Datebrs.Fields(”借書日期“)1

      rs.Update

      If(Datebrs.Fields(”借書日期“)1

      Call encomm

      End If End Sub

      Private Sub Comm4_Click()

      Unload Me End Sub

      Private Sub encomm()

      If recs = 0 Then

      Comm2.Enabled = False

      Comm3.Enabled = False

      Else

      Comm2.Enabled = True

      Comm3.Enabled = True

      End If End Sub

      Setuser1:

      Dim cond As String

      Private Sub Form_KeyPress(KeyAscii As Integer)

      If KeyAscii = 13 Then

      SendKeys ”{TAB}“

      End If End Sub

      Private Sub Form_Load()

      If flag = 2 Then

      Text1(0).Text = setuser.Adodc1.Recordset.Fields(”用戶名“)

      Text1(1).Text = setuser.Adodc1.Recordset.Fields(”口令“)

      Combo1.Text = setuser.Adodc1.Recordset.Fields(”級(jí)別“)

      End If End Sub

      Private Sub Comm1_Click()

      If Trim(Text1(0).Text)= ”“ Or Trim(Text1(1).Text)= ”“ Or Trim(Combo1.Text)= ”“ Then

      MsgBox ”數(shù)據(jù)項(xiàng)不全,請(qǐng)重新設(shè)置“, vbOKOnly, ”信息提示“

      Text1(0).SetFocus

      Exit Sub

      End If

      If flag = 1 Then '添加操作

      If setuser.Adodc1.Recordset.RecordCount > 0 Then '原記錄個(gè)數(shù)大于0

      cond = ”級(jí)別='“ + Trim(Text1(0).Text)+ ”'“

      setuser.Adodc1.Recordset.MoveFirst

      '每次從頭開始查找

      setuser.Adodc1.Recordset.Find(cond)

      If Not setuser.Adodc1.Recordset.EOF()Then

      MsgBox ”存在完全相同的記錄“, vbOKOnly, ”信息提示“

      Text1(0).SetFocus

      Exit Sub

      End If

      End If

      setuser.Adodc1.Recordset.AddNew

      setuser.Adodc1.Recordset.Fields(”用戶名“)= Trim(Text1(0).Text)

      setuser.Adodc1.Recordset.Fields(”口令“)= Val(Trim(Text1(1).Text))

      setuser.Adodc1.Recordset.Fields(”級(jí)別“)= Trim(Combo1.Text)

      setuser.Adodc1.Recordset.Update

      recs = recs + 1

      Else

      '修改操作

      n = setuser.Adodc1.Recordset.AbsolutePosition

      cond = ”級(jí)別='“ + Trim(Text1(0).Text)+ ”'“

      setuser.Adodc1.Recordset.MoveFirst '每次從頭開始查找

      setuser.Adodc1.Recordset.Find(cond)

      If Not setuser.Adodc1.Recordset.EOF()And setuser.Adodc1.Recordset.AbsolutePosition <> n Then

      MsgBox ”存在完全相同的記錄“, vbOKOnly, ”信息提示“

      setuser.Adodc1.Recordset.MoveFirst

      '這兩個(gè)語(yǔ)句恢復(fù)原記錄位置

      setuser.Adodc1.Recordset.Move(n1)

      setuser.Adodc1.Recordset.Fields(”用戶名“)= Trim(Text1(0).Text)

      setuser.Adodc1.Recordset.Fields(”口令“)= Val(Trim(Text1(1).Text))

      setuser.Adodc1.Recordset.Fields(”級(jí)別“)= Trim(Combo1.Text)

      setuser.Adodc1.Recordset.Update

      End If

      Unload Me End Sub

      Private Sub Comm2_Click()

      Unload Me End Sub

      Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)

      Call endata(KeyAscii)End Sub

      模塊:

      Public userlevel As String '保存用戶級(jí)別

      Public flag As Integer

      '用作記錄操作標(biāo)記

      Public tna As String

      '保存表名:用于調(diào)用edrec1窗體 Public cap As String

      '保存標(biāo)題名:用于調(diào)用edrec1窗體 Public recs As Integer

      '保存記錄集中記錄個(gè)數(shù)

      Sub main()

      pass.Show vbModal End Sub

      Public Function exesql(ByVal sql As String)As ADODB.Recordset

      sql = Trim$(sql)

      Set conn = New ADODB.Connection

      Set rst = New ADODB.Recordset

      conn.ConnectionString = ”DSN=Library;UID=sa;PWD=;“

      conn.Open

      Set rst.ActiveConnection = conn

      rst.LockType = adLockOptimistic

      rst.CursorType = adOpenKeyset

      rst.Open sql

      Set exesql = rst

      Set rst = Nothing

      Set conn = Nothing End Function

      Public Sub deldata(ByVal tn As String)刪除指定表中所有記錄,對(duì)于oper表添加一個(gè)系統(tǒng)用戶

      Dim sql As String

      sql = ”delete “ & Trim$(tn)

      Set conn = New ADODB.Connection

      conn.ConnectionString = ”DSN=Library;UID=sa;PWD=;“

      conn.Open

      conn.Execute sql

      If Trim(tn)= ”oper“ Then

      sql = ”insert oper values('1234','1234','系統(tǒng)管理員')“

      conn.Execute sql

      End If

      conn.Close End Sub Public Sub endata(Keyasc As Integer)

      If Keyasc = 13 Then

      SendKeys ”{TAB}" '將回車鍵轉(zhuǎn)換成Tab鍵

      End If End Sub

      第四篇:人事管理系統(tǒng)數(shù)據(jù)庫(kù)源代碼

      using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Xml.Linq;

      namespace WebApplication1 { public partial class WebForm1 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e){

      }

      protected void Button1_Click(object sender, EventArgs e){ Response.Redirect(“~/登錄.aspx”);

      }

      protected void Button2_Click(object sender, EventArgs e){ Response.Redirect(“~/人員信息查詢.aspx”);}

      protected void Button3_Click(object sender, EventArgs e){ Response.Redirect(“~/人員修改.aspx”);}

      protected void Button4_Click(object sender, EventArgs e){ Response.Redirect(“~/部門信息.aspx”);}

      protected void Button5_Click(object sender, EventArgs e){ Response.Redirect(“~/工資信息.aspx”);} } }

      using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Xml.Linq;using System.Data.SqlClient;namespace WebApplication1 { public partial class 部門信息 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e){

      }

      protected void Button1_Click(object sender, EventArgs e){ bool find =false;SqlConnection con=new SqlConnection(“server=localhost;Integrated Security=SSPI;database=人事管理系統(tǒng)”);con.Open();string cmdstr=“select * from 部門表”;SqlDataAdapter da=new SqlDataAdapter(cmdstr,con);DataSet ds=new DataSet();da.Fill(ds);for(int i=0;i

      TextBox2.Text=ds.Tables[0].Rows[i][“部門代碼”].ToString();TextBox3.Text=ds.Tables[0].Rows[i][“部門名稱”].ToString();

      find=true;}

      } } if(find == false){ Response.Write(“”);con.Close();} }

      protected void Button2_Click(object sender, EventArgs e){ Response.Redirect(“~/Default.aspx”);} } }

      using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Xml.Linq;using System.Data.SqlClient;using System.Data.SqlTypes;namespace WebApplication1 { public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e){

      }

      protected void TextBox1_TextChanged(object sender, EventArgs e){

      }

      protected void Button1_Click(object sender, EventArgs e){

      SqlConnection con = new SqlConnection(“server=localhost;Integrated Security=SSPI;database=人事管理系統(tǒng)”);

      string strCount;strCount = “select * from 人事表”;con.Open();SqlCommand com = new SqlCommand(strCount, con);SqlDataReader dr = com.ExecuteReader();string strUsername = “", strPassword = ”“;

      while(dr.Read()){ if(TextBox1.Text == dr[”編號(hào)“].ToString()||TextBox2.Text == dr[”用戶密碼“].ToString()){ strUsername = dr[”編號(hào)“].ToString();strPassword = dr[”用戶密碼“].ToString();break;} } dr.Close();con.Close();if(strUsername == ”“){ Response.Write(”“);return;}

      }

      protected void Button2_Click(object sender, EventArgs e){ Response.Redirect(”~/Default.aspx“);

      } } }

      using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Xml.Linq;using System.Data.SqlClient;

      namespace WebApplication1 { public partial class 工資信息 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e){

      }

      protected void TextBox2_TextChanged(object sender, EventArgs e){

      }

      protected void TextBox5_TextChanged(object sender, EventArgs e){

      }

      protected void Button1_Click(object sender, EventArgs e){ bool find = false;SqlConnection con = new SqlConnection(”server=localhost;Integrated Security=SSPI;database=人事管理系統(tǒng)“);con.Open();string cmdstr = ”select * from 工資表“;SqlDataAdapter da = new SqlDataAdapter(cmdstr, con);DataSet ds = new DataSet();da.Fill(ds);for(int i = 0;i < ds.Tables[0].Rows.Count;i++){ for(int j = 0;j < ds.Tables[0].Columns.Count;j++){ String data =(ds.Tables[0].Rows[i][j].ToString()).Trim();if(data == TextBox1.Text.Trim()){

      TextBox2.Text = ds.Tables[0].Rows[i][”應(yīng)發(fā)工資“].ToString();TextBox3.Text = ds.Tables[0].Rows[i][”崗位津貼“].ToString();TextBox4.Text = ds.Tables[0].Rows[i][”獎(jiǎng)勵(lì)“].ToString();TextBox5.Text = ds.Tables[0].Rows[i][”保險(xiǎn)“].ToString();

      find = true;}

      } } if(find == false){ Response.Write(”“);con.Close();}

      }

      protected void Button2_Click(object sender, EventArgs e){ Response.Redirect(”~/Default.aspx“);} } }

      using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Xml.Linq;using System.Data.SqlClient;namespace WebApplication1 { public partial class 人員信息 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e){

      }

      protected void Button1_Click(object sender, EventArgs e){ Response.Redirect(”~/Default.aspx“);}

      protected void Button2_Click(object sender, EventArgs e){ bool find =false;SqlConnection con = new SqlConnection(”server=localhost;Integrated Security=SSPI;database=人事管理系統(tǒng)“);con.Open();string cmdstr=”select * from 工資表“;SqlDataAdapter da=new SqlDataAdapter(cmdstr,con);DataSet ds=new DataSet();da.Fill(ds);for(int i=0;i

      TextBox2.Text=ds.Tables[0].Rows[i][”應(yīng)發(fā)工資“].ToString();TextBox3.Text=ds.Tables[0].Rows[i][”崗位津貼“].ToString();TextBox4.Text=ds.Tables[0].Rows[i][”獎(jiǎng)勵(lì)“].ToString();TextBox5.Text = ds.Tables[0].Rows[i][”保險(xiǎn)“].ToString();

      find=true;}

      } } if(find == false){ Response.Write(”“);con.Close();} } } }

      using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Xml.Linq;using System.Data.SqlClient;namespace WebApplication1 { public partial class 人員修改 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e){

      }

      protected void TextBox5_TextChanged(object sender, EventArgs e){

      }

      protected void Button2_Click(object sender, EventArgs e){ SqlConnection con=new SqlConnection(”server=localhost;Integrated Security=SSPI;database=人事管理系統(tǒng)“);con.Open();string insert=”insert into 人事表(員工號(hào),姓名,性別,職稱,學(xué)歷)values(“+”“+ TextBox1.Text.Trim()+”“+”,“+”“ + TextBox2.Text.Trim()+”“+”,“+ TextBox3.Text.Trim()+ ”,“ +”“+ TextBox4.Text.Trim()+”“+”,“+”“ +TextBox5.Text.Trim()+ ”“+”)“;Response.Write(insert);SqlCommand cmd1=new SqlCommand(insert,con);

      con.Close();}

      protected void Button1_Click(object sender, EventArgs e){ Response.Redirect(”~/Default.aspx");}

      protected void GridView1_SelectedIndexChanged(object sender, EventArgs e){ } } }

      第五篇:圖書管理系統(tǒng)數(shù)據(jù)庫(kù)設(shè)計(jì)

      數(shù)據(jù)庫(kù)設(shè)計(jì).................................................................2 3.1 專門術(shù)語(yǔ)的定義...................................................2 3.1.1 系統(tǒng)中常用的術(shù)語(yǔ)(或使用頻率較高的術(shù)語(yǔ)).........................2 3.1.2 表格定義及規(guī)范.................................................2 3.1.2.1數(shù)據(jù)約定.....................................................2 3.1.2.2表和表字段命名規(guī)范:.........................................3 3.2 數(shù)據(jù)設(shè)計(jì).........................................................3 3.2.1 數(shù)據(jù)流程圖設(shè)計(jì).................................................3 3.2.2實(shí)體關(guān)系結(jié)構(gòu)設(shè)計(jì)...............................................4 3.3安全保密設(shè)計(jì).....................................................6 3.3.1 邏輯上的安全保密...............................................6 3.3.2 物理上的安全保密...............................................6 3.4 表格與功能模塊相關(guān)性分析.........................................7 3.5 表格定義.........................................................7 數(shù)據(jù)庫(kù)設(shè)計(jì)

      3.1 專門術(shù)語(yǔ)的定義

      暫無(wú)

      3.1.1 系統(tǒng)中常用的術(shù)語(yǔ)(或使用頻率較高的術(shù)語(yǔ))暫無(wú)

      3.1.2 表格定義及規(guī)范 3.1.2.1數(shù)據(jù)約定

      所有數(shù)據(jù)項(xiàng)都用英文、漢語(yǔ)拼音或縮寫表示,數(shù)據(jù)庫(kù)名稱除外。

      所有字段在設(shè)計(jì)時(shí),除以下數(shù)據(jù)類型timestamp、image、datetime、smalldatetime、uniqueidentifier、binary、sql_variant、binary、varbinary外,必須有默認(rèn)值。字符型的默認(rèn)值為一個(gè)空字符值串;數(shù)值型的默認(rèn)值為數(shù)值0;邏輯型的默認(rèn)值為數(shù)值0;

      其中:系統(tǒng)中所有邏輯型中數(shù)值0表示為“假”;數(shù)值1表示為“真”。datetime、smalldatetime類型的字段沒有默認(rèn)值,必須為NULL。當(dāng)字段定義為字符串形時(shí)建議使用varchar而不用nvarchar。建議在大多數(shù)表中(如報(bào)銷單,申請(qǐng)單),應(yīng)都有以下字段: 字段名說明類型默認(rèn)值 CreatorID創(chuàng)建者int CreatedTime創(chuàng)建時(shí)間DatetimeNULL 字符集采用 UTF-8,請(qǐng)注意字符的轉(zhuǎn)換。

      所有數(shù)據(jù)表第一個(gè)字段都是系統(tǒng)內(nèi)部使用自動(dòng)序列主鍵列,自增字段,不可空,名稱為:id,確保不把此字段暴露給最終用戶。

      除特別說明外,所有字符串字段都采用varchar(50)類型,(無(wú)論漢字還是英文,都算一個(gè)字符)。

      除特別說明外,所有小數(shù)的字段都采用 decimal(18,2)的形式表達(dá)。

      除特別說明外,所有日期格式都采用 datetime 格式(根據(jù)需要提取時(shí)間格式); 除特別說明外,所有整形都采用 bigint 格式。除特別說明外,所有字段默認(rèn)都設(shè)置為 null。3.1.2.2表和表字段命名規(guī)范:

      命名規(guī)則約束的范圍包括:數(shù)據(jù)庫(kù)的命名、表的命名及字段的命名。數(shù)據(jù)庫(kù)相關(guān)的命名規(guī)則采用與通常的編程的變量命名規(guī)則原則一致,具體要求如下: 1)字段名及表名為典型的名詞結(jié)構(gòu); 2)中文名稱要求語(yǔ)言精練、文法嚴(yán)謹(jǐn);

      3)望文知意、易懂易用,禁止采用如:A002這種命名;

      4)主體采用拼音字母的首寫字母拼寫構(gòu)成,基于慣常法可適度采用無(wú)詞義歧義性的英文命名;

      5)長(zhǎng)度不少于3個(gè)字母,不大于12個(gè)字母;

      6)在對(duì)于拼音首字母類似的字段和表,為區(qū)別,添加下劃線和數(shù)字如男性人數(shù):NXRS,女性人數(shù):NXRS_2。

      3.2 數(shù)據(jù)設(shè)計(jì)

      繪制數(shù)據(jù)流程圖的目的是為了方便開發(fā)人員與用戶的交流,以及為系統(tǒng)的設(shè)計(jì)提供依據(jù)。數(shù)據(jù)流程圖的繪制過程通常采用自頂向下,逐層分解,直到功能細(xì)化為止,形成若干層次的數(shù)據(jù)流程圖。3.2.1 數(shù)據(jù)流程圖設(shè)計(jì)

      0層數(shù)據(jù)流圖

      1層數(shù)據(jù)流圖

      3.2.2實(shí)體關(guān)系結(jié)構(gòu)設(shè)計(jì)

      圖書實(shí)體關(guān)系

      讀者實(shí)體關(guān)系

      圖書借閱關(guān)系實(shí)體

      用戶實(shí)體關(guān)系

      圖書類別實(shí)體關(guān)系

      3.3安全保密設(shè)計(jì)

      3.3.1 邏輯上的安全保密

      1、系統(tǒng)對(duì)非法使用者的安全保密處理措施

      2、系統(tǒng)對(duì)正常使用者的安全保密處理措施

      3、系統(tǒng)對(duì)管理員的安全保密 3.3.2 物理上的安全保密

      1、數(shù)據(jù)庫(kù)系統(tǒng)異常時(shí)的還原處理措施

      2、設(shè)備遭異常毀壞時(shí)的安全防護(hù)措施

      3、數(shù)據(jù)參數(shù)做到及時(shí)更新,保證系統(tǒng)正常運(yùn)行

      3.4 表格與功能模塊相關(guān)性分析

      3.5 表格定義

      a.圖書信息表

      b.讀者信息表

      c.借閱表

      d.管理員_書籍

      e.管理員_學(xué)生

      下載圖書管理系統(tǒng)數(shù)據(jù)庫(kù)源代碼word格式文檔
      下載圖書管理系統(tǒng)數(shù)據(jù)庫(kù)源代碼.doc
      將本文檔下載到自己電腦,方便修改和收藏,請(qǐng)勿使用迅雷等下載。
      點(diǎn)此處下載文檔

      文檔為doc格式


      聲明:本文內(nèi)容由互聯(lián)網(wǎng)用戶自發(fā)貢獻(xiàn)自行上傳,本網(wǎng)站不擁有所有權(quán),未作人工編輯處理,也不承擔(dān)相關(guān)法律責(zé)任。如果您發(fā)現(xiàn)有涉嫌版權(quán)的內(nèi)容,歡迎發(fā)送郵件至:645879355@qq.com 進(jìn)行舉報(bào),并提供相關(guān)證據(jù),工作人員會(huì)在5個(gè)工作日內(nèi)聯(lián)系你,一經(jīng)查實(shí),本站將立刻刪除涉嫌侵權(quán)內(nèi)容。

      相關(guān)范文推薦

        數(shù)據(jù)庫(kù)課程設(shè)計(jì) 圖書管理系統(tǒng)(精選)

        課 程 設(shè) 計(jì) 軟件工程與數(shù)據(jù)庫(kù) 課程設(shè)計(jì) 任務(wù)書 學(xué)院名稱:數(shù)學(xué)與計(jì)算機(jī)學(xué)院 課程代碼:_6014419_ 專業(yè): 年級(jí):一、設(shè)計(jì)題目 圖書管理系統(tǒng) 二、主要內(nèi)容 一個(gè)簡(jiǎn)單的圖書管理系統(tǒng)......

        數(shù)據(jù)庫(kù)圖書管理系統(tǒng)題目

        請(qǐng)?jiān)O(shè)計(jì)圖書管理系統(tǒng)數(shù)據(jù)庫(kù),要求能滿足讀者的注冊(cè)、注銷、個(gè)人信息修改、圖書的入庫(kù)、圖書報(bào)廢、圖書的借閱、歸還、續(xù)約、滯納金賠償、損壞賠償功能 系統(tǒng)中至少包含如下信息:......

        圖書借閱管理系統(tǒng)數(shù)據(jù)庫(kù)要求

        圖書借閱管理系統(tǒng)設(shè)計(jì)文檔 學(xué)號(hào):00,姓名:***,班級(jí):*** 一 系統(tǒng)概述 為學(xué)校圖書借閱室設(shè)計(jì)圖書管理系統(tǒng),完成新增圖書上架、讀者辦理圖書借閱證、圖書查詢、借書、還書工作的自動(dòng)處......

        Oracle數(shù)據(jù)庫(kù) 圖書管理系統(tǒng)實(shí)驗(yàn)報(bào)告

        圖書管理系統(tǒng)(Oracle) 1、創(chuàng)建表空間student_library 2、(1)創(chuàng)建表Administrator (2)創(chuàng)建表library (3)創(chuàng)建表student (4)創(chuàng)建表lent_library (5)創(chuàng)建表booktype 3、 創(chuàng)建表空間stude......

        圖書管理系統(tǒng)數(shù)據(jù)庫(kù)設(shè)計(jì)示例

        圖書管理系統(tǒng)數(shù)據(jù)庫(kù)設(shè)計(jì) 一個(gè)簡(jiǎn)單的圖書管理系統(tǒng)包括圖書館內(nèi)書籍的信息、學(xué)校在校學(xué)生的信息以及學(xué)生的借閱信息。此系統(tǒng)功能分為面向?qū)W生和面向管理員兩部分,其中學(xué)生可以......

        圖書管理系統(tǒng)的數(shù)據(jù)庫(kù)設(shè)計(jì)

        圖書管理系統(tǒng)的數(shù)據(jù)庫(kù)設(shè)計(jì) 摘要:虛擬為某公司建立的圖書館管理系統(tǒng)進(jìn)行數(shù)據(jù)庫(kù)設(shè)計(jì),目的在于使該系統(tǒng)的運(yùn)行能提高該公司的資料管理水平和現(xiàn)代化管理水平。本系統(tǒng)是一個(gè)中小型......

        圖書管理系統(tǒng)數(shù)據(jù)庫(kù)的設(shè)計(jì)

        圖書管理系統(tǒng)數(shù)據(jù)庫(kù)的設(shè)計(jì) 摘 要:書籍是人類不可缺少的精神食糧,尤其對(duì)一些學(xué)校來說,尤其重要。所以圖書館借閱信息管理系統(tǒng)應(yīng)該能夠?yàn)橛脩籼峁┏渥愕男畔⒑涂旖莸牟樵兪侄?。?.....

        圖書管理系統(tǒng)--創(chuàng)建數(shù)據(jù)庫(kù)和表

        /* 1管理員表(L_Administrator) 字段名 字段說明 數(shù)據(jù)類型 約束 備注 a_id 管理員編號(hào) int Primary Key Identity(1000,1) a_name 管理員姓名 nvarchar(20) Not null a_pwd......