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

资源简介

很齐全的网上花店系统,界面很好看,功能都可以实现,有后台管理系统

资源截图

代码片段和文件信息

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(??)“);
              //String name=admin.getAdminName();
              stm.setString(1new String(admin.getAdminName().getBytes(“ISO-8859-1“)“GB2312“));
              stm.setString(2admin.getAdminPass());
              //System.out.println(“@@@@@@@@@@@@@@@@@@“);
              //System.out.println(admin.getAdminName());
              //System.out.print(new String(name.getBytes(“ISO-8859-1“)“GB2312“));
              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);
                }
              

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

     文件        340  2007-09-27 11:20  网上花店\FlowerShopttt\.classpath

     文件        303  2017-02-11 20:05  网上花店\FlowerShopttt\.mymetadata

     文件       1416  2016-12-23 13:39  网上花店\FlowerShopttt\.project

     文件        500  2016-12-23 13:39  网上花店\FlowerShopttt\.settings\.jsdtscope

     文件         49  2016-12-23 13:39  网上花店\FlowerShopttt\.settings\org.eclipse.wst.jsdt.ui.superType.container

     文件          6  2016-12-23 13:39  网上花店\FlowerShopttt\.settings\org.eclipse.wst.jsdt.ui.superType.name

     文件       2897  2007-09-27 11:21  网上花店\FlowerShopttt\src\com\AdminBean.class

     文件       4365  2010-05-22 21:14  网上花店\FlowerShopttt\src\com\AdminBean.java

     文件        758  2007-09-27 11:21  网上花店\FlowerShopttt\src\com\AdminClass.class

     文件        657  2007-09-27 11:22  网上花店\FlowerShopttt\src\com\AdminClass.java

     文件       5157  2007-09-27 11:21  网上花店\FlowerShopttt\src\com\Cart.class

     文件       7567  2017-01-06 17:01  网上花店\FlowerShopttt\src\com\Cart.java

     文件        731  2007-09-27 11:21  网上花店\FlowerShopttt\src\com\DBConnection.class

     文件        686  2016-12-31 17:56  网上花店\FlowerShopttt\src\com\DBConnection.java

     文件       1211  2007-09-27 11:21  网上花店\FlowerShopttt\src\com\ding\EncodingFilter.class

     文件       1447  2007-09-27 11:23  网上花店\FlowerShopttt\src\com\ding\EncodingFilter.java

     文件      10929  2007-09-27 11:21  网上花店\FlowerShopttt\src\com\GoodsBean.class

     文件      29425  2017-01-04 15:08  网上花店\FlowerShopttt\src\com\GoodsBean.java

     文件       2031  2007-09-27 11:21  网上花店\FlowerShopttt\src\com\GoodsClass.class

     文件       2359  2007-09-27 11:22  网上花店\FlowerShopttt\src\com\GoodsClass.java

     文件       7877  2017-01-05 00:45  网上花店\FlowerShopttt\src\com\leavelanguageBean.java

     文件       1212  2007-09-27 11:21  网上花店\FlowerShopttt\src\com\LeaveLanguageClass.class

     文件       1408  2017-01-04 22:29  网上花店\FlowerShopttt\src\com\LeaveLanguageClass.java

     文件       4228  2007-09-27 11:21  网上花店\FlowerShopttt\src\com\LeaveLauguageBean.class

     文件        954  2007-09-27 11:21  网上花店\FlowerShopttt\src\com\OrdersClass.class

     文件        912  2007-09-27 11:22  网上花店\FlowerShopttt\src\com\OrdersClass.java

     文件        951  2007-09-27 11:21  网上花店\FlowerShopttt\src\com\OrdersDetailsClass.class

     文件        873  2007-09-27 11:22  网上花店\FlowerShopttt\src\com\OrdersDetailsClass.java

     文件        912  2007-09-27 11:21  网上花店\FlowerShopttt\src\com\PageNumber.class

     文件        918  2007-09-27 11:22  网上花店\FlowerShopttt\src\com\PageNumber.java

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

评论

共有 条评论