• 大小: 8.4MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-10-08
  • 语言: 其他
  • 标签: 网上花店  源码  

资源简介

完整的网上花店管理系统,有数据库 很经典 是学习的参考代码

资源截图

代码片段和文件信息

package com;

import java.sql.*;
import java.util.*;
import java.util.ArrayList;
import java.util.Collection;

public class AdminBean
{
    private Connection con;
    AdminClass admin=new AdminClass();

    public AdminBean()
    {
        try
        {
            con = DBConnection.getConnection();
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
    }

    public void setAdminInfo(AdminClass admin) {
        this.admin = admin;
    }
    public void addAdminInfo()throws Exception
    {
        try
        {

              PreparedStatement stm=con.prepareStatement(“insert into admin values(??)“);
              stm.setString(1admin.getAdminName());
              stm.setString(2admin.getAdminPass());

              try
              {
                  stm.executeQuery();
              }
              catch(Exception e)
              {
              }


        }
        catch(Exception e)
        {
                e.printStackTrace();
                throw e;
        }
    }
    public boolean checkAdminInfo()throws Exception
    {
        boolean flag=false;
        try
        {

                PreparedStatement stat=con.prepareStatement(“select * from admin where adminName=? and adminPass=?“);
                stat.setString(1admin.getAdminName());
                stat.setString(2admin.getAdminPass());
                ResultSet result=stat.executeQuery();

                if(result.next())
                {
                    flag=true;
                }

                result.close();
                stat.close();
        }
        catch(Exception e)
        {
                e.printStackTrace();
                throw e;
        }
        return flag;
    }

    public AdminClass getAdminInfo()throws Exception
    {
        AdminClass admin1=new AdminClass();
        try
        {
                PreparedStatement stat=con.prepareStatement(“select * from admin where adminName=? and adminPass=?“);
                stat.setString(1admin.getAdminName());
                stat.setString(2admin.getAdminPass());
                ResultSet result=stat.executeQuery();

                while(result.next())
                {
                      int id=result.getInt(1);
                      String name=result.getString(2);
                      String pass=result.getString(3);

                      //System.out.println(name+“    “+sex);

                      admin1.setAdminId(id);
                      admin1.setAdminName(name);
                      admin1.setAdminPass(pass);
                }
                result.close();
                stat.close();

        }
        catch(Exception e)
        {
                e.printStackTrace();
                throw e;
        }
        return admin1;
    }
    
    public Collection getAllUserInfo()
    {
    AdminClass admin;
    ArrayL

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        552  2010-09-13 16:38  网上花店系统java(附带数据库。论文)\FlowerShop\.classpath

     文件        303  2010-09-13 16:38  网上花店系统java(附带数据库。论文)\FlowerShop\.mymetadata

     文件       1228  2007-09-27 11:51  网上花店系统java(附带数据库。论文)\FlowerShop\.project

     文件    1048576  2010-09-13 16:43  网上花店系统java(附带数据库。论文)\FlowerShop\buyFlowers_Data.MDF

     文件    1048576  2010-09-13 16:43  网上花店系统java(附带数据库。论文)\FlowerShop\buyFlowers_Log.LDF

     文件      61572  2007-10-13 15:34  网上花店系统java(附带数据库。论文)\FlowerShop\db\sql脚本.sql

     文件       2897  2007-09-27 11:21  网上花店系统java(附带数据库。论文)\FlowerShop\src\com\AdminBean.class

     文件       4069  2007-09-27 11:22  网上花店系统java(附带数据库。论文)\FlowerShop\src\com\AdminBean.java

     文件        758  2007-09-27 11:21  网上花店系统java(附带数据库。论文)\FlowerShop\src\com\AdminClass.class

     文件        657  2007-09-27 11:22  网上花店系统java(附带数据库。论文)\FlowerShop\src\com\AdminClass.java

     文件       5157  2007-09-27 11:21  网上花店系统java(附带数据库。论文)\FlowerShop\src\com\Cart.class

     文件       7838  2007-09-27 11:22  网上花店系统java(附带数据库。论文)\FlowerShop\src\com\Cart.java

     文件        731  2007-09-27 11:21  网上花店系统java(附带数据库。论文)\FlowerShop\src\com\DBConnection.class

     文件        611  2010-09-13 16:41  网上花店系统java(附带数据库。论文)\FlowerShop\src\com\DBConnection.java

     文件       1211  2007-09-27 11:21  网上花店系统java(附带数据库。论文)\FlowerShop\src\com\ding\EncodingFilter.class

     文件       1447  2007-09-27 11:23  网上花店系统java(附带数据库。论文)\FlowerShop\src\com\ding\EncodingFilter.java

     文件      10929  2007-09-27 11:21  网上花店系统java(附带数据库。论文)\FlowerShop\src\com\GoodsBean.class

     文件      27840  2007-09-27 11:22  网上花店系统java(附带数据库。论文)\FlowerShop\src\com\GoodsBean.java

     文件       2031  2007-09-27 11:21  网上花店系统java(附带数据库。论文)\FlowerShop\src\com\GoodsClass.class

     文件       2359  2007-09-27 11:22  网上花店系统java(附带数据库。论文)\FlowerShop\src\com\GoodsClass.java

     文件       6630  2008-01-28 14:38  网上花店系统java(附带数据库。论文)\FlowerShop\src\com\leavelanguageBean.java

     文件       1212  2007-09-27 11:21  网上花店系统java(附带数据库。论文)\FlowerShop\src\com\LeaveLanguageClass.class

     文件       1241  2007-09-27 11:22  网上花店系统java(附带数据库。论文)\FlowerShop\src\com\LeaveLanguageClass.java

     文件       4228  2007-09-27 11:21  网上花店系统java(附带数据库。论文)\FlowerShop\src\com\LeaveLauguageBean.class

     文件        954  2007-09-27 11:21  网上花店系统java(附带数据库。论文)\FlowerShop\src\com\OrdersClass.class

     文件        912  2007-09-27 11:22  网上花店系统java(附带数据库。论文)\FlowerShop\src\com\OrdersClass.java

     文件        951  2007-09-27 11:21  网上花店系统java(附带数据库。论文)\FlowerShop\src\com\OrdersDetailsClass.class

     文件        873  2007-09-27 11:22  网上花店系统java(附带数据库。论文)\FlowerShop\src\com\OrdersDetailsClass.java

     文件        912  2007-09-27 11:21  网上花店系统java(附带数据库。论文)\FlowerShop\src\com\PageNumber.class

     文件        918  2007-09-27 11:22  网上花店系统java(附带数据库。论文)\FlowerShop\src\com\PageNumber.java

............此处省略1145个文件信息

评论

共有 条评论