当前位置:首页 > 代码 > 正文

关于超市会员管理系统源代码的信息

admin 发布:2022-12-19 17:07 145


本篇文章给大家谈谈超市会员管理系统源代码,以及对应的知识点,希望对各位有所帮助,不要忘了收藏本站喔。

本文目录一览:

跪求 VB 课程设计 高手

学生档案管理系统 vb

——————————————附录程序清单及注释

程序清单6.1

Option Explicit

Dim Fi

leName As String '文件名,用于打开、保存文件

Dim UndoString As String '用于 Undo 操作

Dim UndoNew As String '用于 Undo 操作

Private Sub ImgUndoDisable()

'禁用“Undo”按钮

UndoString = ""

UndoNew = ""

ImgUndo.Enabled = False

ImgUndo.Picture = ImageDisable.ListImages("Undo").Picture

End Sub

Private Sub ImgUndoEnable()

'有效“Undo”按钮

ImgUndo.Enabled = True

ImgUndo.Picture = ImageUp.ListImages("Undo").Picture

End Sub

Private Sub Check_ImgPaste()

'设置粘贴按钮

If Len(Clipboard.GetText) 0 Then

ImgPaste.Enabled = True

ImgPaste.Picture = ImageUp.ListImages("Paste").Picture

Else

ImgPaste.Enabled = False

ImgPaste.Picture = ImageDisable.ListImages("Paste").Picture

End If

End Sub

Private Sub Check_ImgCutCopy()

'设置剪切、复制按钮

If Text1.SelLength 0 Then

ImgCut.Enabled = True

ImgCut.Picture = ImageUp.ListImages("Cut").Picture

ImgCopy.Enabled = True

ImgCopy.Picture = ImageUp.ListImages("Copy").Picture

Else

ImgCut.Enabled = False

ImgCut.Picture = ImageDisable.ListImages("Cut").Picture

ImgCopy.Enabled = False

ImgCopy.Picture = ImageDisable.ListImages("Copy").Picture

End If

End Sub

Private Sub BackColor_Click()

CommonDialog1.ShowColor

Text1.BackColor = CommonDialog1.Color

End Sub

Private Sub Box_Click()

'显停工具栏

If Box.Checked Then

'将停显工具栏

Box.Checked = False

CoolBar1.Visible = False

Else

Box.Checked = True

CoolBar1.Visible = True[NextPage]

End If

Form_Resize '重新调整控件位置

End Sub

Private Sub Close_Click()

Dim FileNum As Integer

If Len(FileName) 0 Then

'有输入文件名

FileNum = FreeFile() '获得可用文件号

Open FileName For Output As FileNum '打开输出文件

'如果无指定文件,则创建新文件

Print #FileNum, Text1.Text '输出文本

Close FileNum '关闭文件

End If

Text1.Text = ""

FileName = ""

End Sub

Private Sub ComboSize_Click()

Text1.FontSize = Val(ComboSize.Text)

End Sub

Private Sub ComboFont_Click()

Text1.FontName = ComboFont.Text

End Sub

Private Sub Copy_Click()

Clipboard.SetText Text1.SelText '复制文本到剪裁板

End Sub

Private Sub Cut_Click()

Clipboard.SetText Text1.SelText '复制文本到剪裁板

Text1.SelText = "" '清选择的文本

End Sub

Private Sub DataTime_Click()

Text1.SelText = Now

End Sub

Private Sub Delete_Click()

Text1.SelText = "" '清选择的文本

End Sub

Private Sub Edit_Click()

'当程序显示“编辑”子菜单前,触发该程序

If Text1.SelLength 0 Then

'文本框中有选中的文本

Cut.Enabled = True

Copy.Enabled = True

Delete.Enabled = True

Else

Cut.Enabled = False

Copy.Enabled = False

Delete.Enabled = False

End If

If Len(Clipboard.GetText()) 0 Then

'剪裁板中有文本数据

Paste.Enabled = True

Else

'没有可粘贴的文本

Paste.Enabled = False

End If

End Sub

Private Sub Exit_Click()

Unload Me

End Sub

Private Sub FindText_KeyPress(KeyAscii As Integer)

Dim BeginPos As Long

If KeyAscii = 13 Then

BeginPos = InStr(1, Text1.Text, FindText.Text, vbTextCompare)

If BeginPos 0 Then

Text1.SelStart = BeginPos - 1

Text1.SelLength = Len(FindText.Text)

End If

End If

End Sub

Private Sub Fontcolor_Click()

CommonDialog1.ShowColor

Text1.ForeColor = CommonDialog1.Color

End Sub

Private Sub Form_Load()

Dim i As Integer

'加载图像

ImgNew.Picture = ImageUp.ListImages("New").Picture

ImgOpen.Picture = ImageUp.ListImages("Open").Picture

ImgSave.Picture = ImageUp.ListImages("Save").Picture

ImgUndo.Picture = ImageDisable.ListImages("Undo").Picture

Check_ImgPaste

Check_ImgCutCopy

'加载系统字体

For i = 0 To Screen.FontCount - 1

ComboFont.AddItem Screen.Fonts(i)

Next i

End Sub

Private Sub Form_Resize()

Dim TextTop As Long

'修改工具条大小

CoolBar1.Top = Me.ScaleTop

Me.ScaleLeft

Text1.Width = Me.ScaleWidth

If Me.ScaleHeight CoolBar1.Height Then

Text1.Height = Me.ScaleHeight - TextTop

Else

Text1.Height = 0

End If

End Sub

Private Sub ImgCopy_Click()

Copy_Click '复制

Check_ImgPaste

Check_ImgCutCopy

End Sub

Private Sub ImgCopy_MouseDown(Button As Integer, Shift As Integer,

X As Single, Y As Single)

'“按下”按钮

If Button = 1 Then

ImgCopy.Picture = ImageDown.ListImages("Copy").Picture

End If

End Sub

Private Sub ImgCopy_MouseMove(Button As Integer, Shift As Integer,

X As Single, Y As Single)

Label1 = "将选择的文本复制到剪裁板"

'判断鼠标位置,显示不同图像

If Button = 1 And (X 0 And X ImgNew.Width And Y 0 And Y

ImgNew.Height) Then

ImgCopy.Picture = ImageDown.ListImages("Copy").Picture[NextPage]

ElseIf Button = 1 Then

ImgCopy.Picture = ImageUp.ListImages("Copy").Picture

End If

End Sub

Private Sub ImgCopy_MouseUp(Button As Integer, Shift As Integer, X

As Single, Y As Single)

If Button = 1 Then

'“抬起”按钮

ImgCopy.Picture = ImageUp.ListImages("Copy").Picture

End If

End Sub

Private Sub ImgCut_Click()

'If Text1.SelLength 0 Then

Cut_Click '剪切

Check_ImgPaste

Check_ImgCutCopy

'End If

End Sub

Private Sub ImgCut_MouseDown(Button As Integer, Shift As Integer,

X As Single, Y As Single)

If Button = 1 Then

'“按下”按钮

ImgCut.Picture = ImageDown.ListImages("Cut").Picture

End If

End Sub

Private Sub ImgCut_MouseMove(Button As Integer, Shift As Integer,

X As Single, Y As Single)

Label1 = "剪切选择的文字到剪裁板"

'判断鼠标位置,显示不同图像

If Button = 1 And (X 0 And X ImgNew.Width And Y 0 And Y

ImgNew.Height) Then

ImgCut.Picture = ImageDown.ListImages("Cut").Picture

ElseIf Button = 1 Then

ImgCut.Picture = ImageUp.ListImages("Cut").Picture

End If

End Sub

Private Sub ImgCut_MouseUp(Button As Integer, Shift As Integer, X

As Single, Y As Single)

If Button = 1 Then

'“抬起”按钮

ImgCut.Picture = ImageUp.ListImages("Cut").Picture

End If

End Sub

Private Sub ImgNew_Click()

New_Click

End Sub

Private Sub ImgNew_MouseDown(Button As Integer, Shift As Integer,

X As Single, Y As Single)

If Button = 1 Then

'“按下”按钮

ImgNew.Picture = ImageDown.ListImages("New").Picture

End If

End Sub

Private Sub ImgNew_MouseMove(Button As Integer, Shift As Integer,

X As Single, Y As Single)

Label1 = "创建新文件" '修改提示信息

'判断鼠标位置,显示不同图像

If Button = 1 And (X 0 And X ImgNew.Width And Y 0 And Y

ImgNew.Height) Then

ImgNew.Picture = ImageDown.ListImages("New").Picture

ElseIf Button = 1 Then

ImgNew.Picture = ImageUp.ListImages("New").Picture

End If

End Sub

Private Sub ImgNew_MouseUp(Button As Integer, Shift As Int

eger, X As Single, Y As Single)

If Button = 1 Then

'“抬起”按钮

ImgNew.Picture = ImageUp.ListImages("New").Picture

End If

End Sub

Private Sub ImgOpen_Click()

Open_Click

End Sub

Private Sub ImgOpen_MouseDown(Button As Integer, Shift As Integer,

X As Single, Y As Single)

'“按下”按钮

If Button = 1 Then

ImgOpen.Picture = ImageDown.ListImages("Open").Picture

End If

End Sub

Private Sub ImgOpen_MouseMove(Button As Integer, Shift As Integer,

X As Single, Y As Single)

Label1 = "选择文件名并打开文件"

'判断鼠标位置,显示不同图像

If Button = 1 And (X 0 And X ImgNew.Width And Y 0 And Y

ImgNew.Height) Then

ImgOpen.Picture = ImageDown.ListImages("Open").Picture

ElseIf Button = 1 Then

ImgOpen.Picture = ImageUp.ListImages("Open").Picture

End If

End Sub

Private Sub ImgOpen_MouseUp(Button As Integer, Shift As Integer, X

As Single, Y As Single)

If Button = 1 Then

'“抬起”按钮

ImgOpen.Picture = ImageUp.ListImages("Open").Picture

End If

End Sub

Private Sub ImgPaste_Click()

Paste_Click '粘贴

End Sub

Private Sub ImgPaste_MouseDown(Button As Integer, Shift As

Integer, X As Single, Y As Single)

If Button = 1 Then

'“按下”按钮

ImgPaste.Picture = ImageDown.ListImages("Paste").Picture[NextPage]

End If

End Sub

Private Sub ImgPaste_MouseMove(Button As Integer, Shift As

Integer, X As Single, Y As Single)

Label1 = "粘贴文本到当前光标位置"

'判断鼠标位置,显示不同图像

If Button = 1 And (X 0 And X ImgNew.Width And Y 0 And Y

ImgNew.Height) Then

ImgPaste.Picture = ImageDown.ListImages("Paste").Picture

ElseIf Button = 1 Then

ImgPaste.Picture = ImageUp.ListImages("Paste").Picture

End If

End Sub

Private Sub ImgPaste_MouseUp(Button As Integer, Shift As Integer,

X As Single, Y As Single)

If Button = 1 Then

eName For Output As FileNum '打开输出文件

'如果无指定文件,则创建新文件

Print #FileNum, Text1.Text '输出文本

Close FileNum '关闭文件

ImgUndoDisable

Else

MsgBox "不能保存无名文件" + Chr(13) + Chr(10) + "请选择“文件”菜单

的“保存”项", , "警告"

End If

End Sub

Private Sub ImgSave_MouseDown(Button As Integer, Shift As Integer,

X As Single, Y As Single)

If Button = 1 Then

ImgSave.Picture = ImageDown.ListImages("Save").Picture

End If

End Sub

Private Sub ImgSave_MouseMove(Button As Integer, Shift As Integer,

X As Single, Y As Single)

Label1 = "保存当前文件"

'判断鼠标位置,显示不同图像

If Button = 1 And (X 0 And X ImgNew.Width And Y 0 And Y

ImgNew.Height) Then

ImgSave.Picture = ImageDown.ListImages("Save").Picture

ElseIf Button = 1 Then

ImgSave.Picture = ImageUp.ListImages("Save").Picture

End If

Private Sub ImgUndo_MouseMove(Button As Integer, Shift As Integer,

X As Single, Y As Single)

Label1 = "取消当前操作"

'判断鼠标位置,显示不同图像

If Button = 1 And (X 0 And X ImgNew.Width And Y 0 And Y

ImgNew.Height) Then

ImgUndo.Picture = ImageDown.ListImages("Undo").Picture

ElseIf Button = 1 Then

ImgUndo.Picture = ImageUp.ListImages("Undo").Picture

End If

End Sub

Private Sub ImgUndo_MouseUp(Button As Integer, Shift As Integer, X

As Single, Y As Single)

If Button = 1 Then

'“抬起”按钮

ImgUndo.Picture = ImageUp.ListImages("Undo").Picture

End If

End Sub

Private Sub New_Click()

FileName = ""

Text1 = ""

ImgUndoDisable

End Sub

Private Sub Open_Click()

Dim FileNum As Integer

Dim buffer As String

Dim buffer1 As String

Dim FileSize As Long

Dim MaxLen As Long

MaxLen = 32768 '文件最大长度

CommonDialog1.ShowOpen '显示"打开文件"对话框

If Len(CommonDialog1.FileName) 0 Then

'有输入文件名

FileName = CommonDialog1.FileName '保存文件名

FileSize = FileLen(FileName) '获得文件长度

If FileSize MaxLen Then[NextPage]

'文件超长

MsgBox "该文件过大,只能显示部分文本", , "警告"

Exit Sub

End If

Screen.MousePointer = 11 '设置鼠标为沙漏

FileNum = FreeFile() '获得可用文件号

Open FileName For Input As FileNum '以顺序输入方式打开文件

Do While Not EOF(FileNum) And Len(buffer) MaxLen '读必须文本小于

32K

Line Input #FileNum, buffer1 '读一行文字

buffer = buffer + buffer1 + Chr(13) + Chr(10) '加入回车换行符

Loop '循环体

Close FileNum '关闭文件

ImgUndoDisable '取消 Undo 功能

Text1.Text = buffer '显示文本

UndoNew = buffer '保存文本

buffer = "" '释放内存

buffer1 = ""

Screen.MousePointer = 0 '恢复鼠标指针

Me.Caption = "记事本 - " + FileName '修改标题显示

End If

End Sub

Private Sub Paste_Click()

Text1.SelText = Clipboard.GetText

End Sub

Private Sub Picture1_MouseMove(Button As Integer, Shift As

Integer, X As Single, Y As Single)

Label1 = "工具栏"

End Sub

Private Sub Picture1_Resize()

If Picture1.Width Label1.Left Then

Label1.Width = Picture1.ScaleWidth - Label1.Left

End If

End Sub

Private Sub Save_Click()

Dim FileNum As Integer '文件句柄号

CommonDialog1.ShowSave '显示保存对话框

If Len(CommonDialog1.FileName) 0 Then

'有输入文件名

FileName = CommonDialog1.FileName '保存文件名

FileNum = FreeFile() '获得可用文件号

Open FileName For Output As FileNum '打开输出文件

'如果无指定文件,则创建新文件

Print #FileNum, Text1.Text '输出文本

Close FileNum '关闭文件

Me.Caption = "记事本 - " + FileName '修改标题显示

ImgUndoDisable

End If

End Sub

Private Sub Text1_Change()

If Not ImgUndo.Enabled Then

'使“Undo”按钮可用

ImgUndoEnable

End If

UndoString = UndoNew

UndoNew = Text1

End Sub

Private Sub Text1_Click()

Check_ImgCutCopy

End Sub

Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)

Check_ImgCutCopy

End sub

End Sub

Private Sub ImgSave_MouseUp(Button As Integer, Shift As Integer, X

As Single, Y As Single)

If Button = 1 Then

'“抬起”按钮

ImgSave.Picture = ImageUp.ListImages("Save").Picture

End If

End Sub

Private Sub ImgUndo_Click()

Text1.Text = UndoString

End Sub

Private Sub ImgUndo_MouseDown(Button As Integer, Shift As Integer,

X As Single, Y As Single)

If Button = 1 Then

'“按下”按钮

ImgUndo.Picture = ImageDown.ListImages("Undo").Picture

End If

End Sub

求助!!!超市管理系统 c#编写 主要模块:销售管理、会员管理、员工管理

超市管理信息系统设计

一、超市管理系统设计的目的和意义

为了更好、更方便地管理该超市,我设计了该管理系统。该系统主要是利用了SQL SERVER 2000数据库来开发的一套小型超市管理系统。该系统主要包括一个登录模块和五个子模块(管理员管理模块、客户管理模块、采购员管理模块、经理管理模块、销售员管理模块)功能。通过不同的用户权限让不同的用户进入不同的界面,用户权限主要有系统管理员、顾客、经理、采购员、销售员。系统管理员具有查看进货信息、销售信息、用户信息以及对用户信息可进行添加、修改、删除等功能;顾客可以浏览全部的商品信息或者根据商品名或商品ID浏览某一种商品信息,并且可以购买某种商品,商品购买成功后商品信息表中的商品数量也会相对地减少其数量,销售表中将增加销售出的商品记录;经理可查看进货和销售商品的信息;采购员可以查看全部订单、增加订单、修改订单、删除订单等功能;销售员可以查看销售信息。

二.超市管理系统设计

1.问题定义

针对目前农村中杂货店向中小型超市发展趋势以及农村超市管理技术比较落后这一问题,开发一个适用于农村中小型超市的管理系统显得越来越有必要。开发超市管理系统是要达到方便管理员和消费者的目的,我们就得解决以下问题:

a) 超市的商品信息管理;

b) 超市的仓库管理;

c) 超市员工管理;

d) 商品的销售管理;

e) 超市会员的管理;

f) 日常数据的统计;

2.可行性研究

经过上面对超市管理系统的问题定义,从技术方面来看,超市的商品信息管理,仓库管理,员工管理,销售管理,会员管理以及日常的数据统计实现起来并不难,这些功能都是一些经常遇到的;经济方面由于自身属于没资本的人,投入的只能是简单的开发设备。

3.需求分析

3.1 系统概述

背景:随着我国信息技术和经济的发展,计算机已经被广泛的应用到各个领域。计算机给人们的生活带来方便的同时也需要开发相应的管理系统。根据目前农村现状来看,很多杂货店向中小型超市发展的趋势越来越明显,但是现实农村中很多超市的管理都依靠原始的人力管理,没有与其相对应的管理系统,给日常的超市管理带来了很多不必要的麻烦。

3.2 目的

通过实现超市管理系统,达到超市管理者能够方便地对超市中商品的管理,同时让消费者享受到购物的快捷。

3.3 系统功能需求

a) 超市的员工能够对商品的信息和超市会员信息实现添加,删除,更新,查询操作,能够对商品的信息按不同种类的查询;

b) 超市的管理员能够对超市仓库中各种商品信息的查询,能够及时地了解仓库中各种商品的库存信息;

c) 超市的管理员通过超市管理系统实现对超市员工的管理,能够对员工信息的查询,添加,删除,更新操作;

d) 管理员能够简单地查询超市的部门信息;

e) 超市管理系统中能够对超市中的员工分类,对不同类型的员工,赋予不同的权限对超市进行管理;

3.4 系统运行环境要求

硬件:内存256MB以上,硬盘60GB以上;

软件:windows操作系统,mysql数据库,myeclipse。

4.分析与综合

外部实体:商品,顾客

数据流:商品信息,账单

a) 建立当前系统的具体模型,如下图所示

b) 抽象当前系统的逻辑模型,如下图所示

c) 建立目标系统的逻辑模型,如下图所示

DFD图说明:在顾客进行购物进行结账时,超市员工通过整理顾客所购买的商品的商品号在数据库中进行查询,得到商品的价格,同时通过整理能得到某种商品的购物数量,之后通过判断顾客的身份采取不同的结账算法,把账单给顾客,顾客付款之后即可把商品带走。

5.总体设计

1. 通过对DFD图的转换,得出超市管理系统的软件结构图,如下图所示

2. 通过对软件结构图的进一部分析得到超市管理系统的框架图,如下图所示

6.详细设计

1. 模块设计及功能说明

a) 登陆模块:登陆模块主要用于超市员工的登陆。通过登陆模块实现不同类型的员工登陆到不同的界面,这样能更容易地达到不同类型的员工在超市管理系统中有不同的操作权限。

b) 员工管理模块:员工管理模块主要是方便超市的管理员对超市的员工的管理。通过员工管理模块主要是对员工信息的增,删,改,查操作。

c) 仓库管理模块:仓库管理模块主要是用于商品库存信息的查询以及商品入库,出库查询。通过仓库管理模块超市管理系统的管理员能够查询库存信息,商品入库以及出库的信息。

d) 销售管理模块:销售管理模块主要是商品的结账计算。通过销售管理模块能够方便商品的结账。

e) 部门管理模块:部门管理模块主要用于部门的管理。部门管理模块主要是实现部门信息的增加,删除和更新。

f) 会员管理模块:会员管理模块主要是用于会员的管理。通过会员管理模块可以实现会员的增,删,改,查操作。

2. 数据库设计

数据库E-R图

7.数据结构设计:

(1)用户表的结构

字段名 字段类型 字段大小 说明

userID Int 4 用户ID

userName Varchar 50 用户名称

userPassword Varchar 50 用户密码

userAddress Varchar 50 用户住址

userAuthority Varchar 50 用户类型(权限)

userGender Varchar 10 用户性别

userAge Int 4 用户年龄

(2)商品信息表

字段名 数据类型 长度 说明

GoodsID Int 4 主键

GoodsName Varchar 50 商品名称

GoodsNumber Int 4 商品数量

GoodsProduct Varchar 50 商品生产地

GoodsPrice Float 8 商品价格

GoodsSize Varchar 50 商品大小

(3)销售商品表

字段名 数据类型 长度 说明

VenditionID bigint 4 主键

GoodsName varchar 50 商品名称

GoodsCustomNumber varchar 50 商品销售数量

CustomerName varchar 50 顾客姓名

VenditionDate varchar 50 销售日期

GoodsSize varchar 50 商品大小

GoodsPrice Float 8 商品价格

(4)订货表

字段名 数据类型 长度 说明

BuyerID Int 4 主键

BuyerGoodsName varchar 50 订购商品名称

BuyerGoodsNumber varchar 50 订购商品数量

BuyerManufacturer varchar 50 订购生产厂家

BuyerDate varchar 50 订购日期

BuyerName varchar 50 订购人姓名

c#超市管理系统的源代码

包括典型的进、存、销模块,以及交易记录、后台维护等功能,整个系统相当大

java超市管理系统源代码

只写个demo级的例程很好写,但用到生产环境中还得具体分析设计再编码。这种代码网上太多了内,你随便搜下就有了。

亲有java语言写的超市管理系统课程设计和源代码吗,能给我吗

package untitled5;

import java.io.*;

import java.net.*;

import java.sql.*;

import java.lang.*;

import javax.sql.*;

import java.awt.*;

import java.awt.event.*;

import javax.swing.*;

import com.borland.jbcl.layout.*;

public class delbook extends JFrame {

JPanel contentPane;

XYLayout xYLayout1 = new XYLayout();

JLabel jLabel1 = new JLabel();

JLabel jLabel2 = new JLabel();

JLabel jLabel3 = new JLabel();

JTextField jTextField1 = new JTextField();

JLabel jLabel4 = new JLabel();

JTextField jTextField2 = new JTextField();

JLabel jLabel5 = new JLabel();

JTextField jTextField3 = new JTextField();

JLabel jLabel6 = new JLabel();

JTextField jTextField4 = new JTextField();

JButton jButton1 = new JButton();

//Construct the frame

public delbook() {

enableEvents(AWTEvent.WINDOW_EVENT_MASK);

try {

jbInit();

}

catch(Exception e) {

e.printStackTrace();

}

}

//Component initialization

private void jbInit() throws Exception {

contentPane = (JPanel) this.getContentPane();

jLabel1.setFont(new java.awt.Font("SansSerif", 0, 25));

jLabel1.setForeground(Color.red);

jLabel1.setText("超市管理系统");

contentPane.setLayout(xYLayout1);

this.setSize(new Dimension(500,400));

this.setTitle("超市管理系统");

jLabel2.setFont(new java.awt.Font("SansSerif", 0, 30));

jLabel2.setText("业务单位信息");

jLabel3.setFont(new java.awt.Font("SansSerif", 0, 25));

jLabel3.setText("产品编号");

jTextField1.setText("");

jLabel4.setFont(new java.awt.Font("SansSerif", 0, 25));

jLabel4.setText("公司名称");

jTextField2.setText("");

jLabel5.setFont(new java.awt.Font("SansSerif", 0, 25));

jLabel5.setText("订单号码");

jTextField3.setText("");

jLabel6.setFont(new java.awt.Font("SansSerif", 0, 25));

jLabel6.setText("电 话");

jTextField4.setText("");

jButton1.setFont(new java.awt.Font("SansSerif", 0, 25));

jButton1.setText("提交");

jButton1.addActionListener(new delbook_jButton1_actionAdapter(this));

contentPane.add(jLabel1, new XYConstraints(179, 1, 153, 32));

contentPane.add(jLabel2, new XYConstraints(162, 33, -1, -1));

contentPane.add(jLabel3, new XYConstraints(83, 89, -1, -1));

contentPane.add(jTextField1, new XYConstraints(189, 88, 141, 36));

contentPane.add(jTextField2, new XYConstraints(189, 149, 142, 36));

contentPane.add(jLabel4, new XYConstraints(84, 148, -1, -1));

contentPane.add(jTextField3, new XYConstraints(188, 206, 143, 33));

contentPane.add(jLabel5, new XYConstraints(84, 204, -1, -1));

contentPane.add(jLabel6, new XYConstraints(84, 253, -1, -1));

contentPane.add(jTextField4, new XYConstraints(189, 260, 143, 36));

contentPane.add(jButton1, new XYConstraints(197, 318, -1, -1));

}

//Overridden so we can exit when window is closed

protected void processWindowEvent(WindowEvent e) {

super.processWindowEvent(e);

if (e.getID() == WindowEvent.WINDOW_CLOSING) {

System.exit(0);

}

}

void update() {

try {

//定义显示的字符串

String str1;

String str2;

String str3;

String str4;

str1 = jTextField1.getText();

str2 = jTextField2.getText();

str3 = jTextField3.getText();

str4 = jTextField4.getText();

//装载jdbc驱动程序

String driverName = "oracle.jdbc.OracleDriver";

Driver driver = (Driver) Class.forName(driverName).newInstance();

//连接数据库

Connection con = DriverManager.getConnection(

"jdbc:oracle:thin:@thsspc0791:1521:liuyong", "hr", "tongfang");

PreparedStatement pstmt = con.prepareStatement(

" insert Customer1('goodID','Name','PID','tel')values(?,?,?,?)");

pstmt.setString(1, str1);

pstmt.setString(2, str2);

pstmt.setString(1, str3);

pstmt.setString(4, str4);

ResultSet res = pstmt.executeQuery();

pstmt.close();

con.close();

}catch (InstantiationException e) {

System.out.println(e.getMessage());

}catch (IllegalAccessException e) {

System.out.println(e.getMessage());

}catch (ClassNotFoundException e) {

System.out.println(e.getMessage());

}catch (SQLException edd) {

edd.printStackTrace() ;

System.out.println(edd.getMessage());

}

}

void jButton1_actionPerformed(ActionEvent e) {

update();

}

}

class delbook_jButton1_actionAdapter implements java.awt.event.ActionListener {

delbook adaptee;

delbook_jButton1_actionAdapter(delbook adaptee) {

this.adaptee = adaptee;

}

public void actionPerformed(ActionEvent e) {

adaptee.jButton1_actionPerformed(e);

}

}

package untitled5;

import java.awt.*;

import java.awt.event.*;

import javax.swing.*;

import com.borland.jbcl.layout.*;

/**

* pTitle: /p

* pDescription: /p

* pCopyright: Copyright © 2003/p

* pCompany: /p

* @author not attributable

* @version 1.0

*/

public class retur extends JFrame {

JPanel contentPane;

XYLayout xYLayout1 = new XYLayout();

JLabel jLabel1 = new JLabel();

//Construct the frame

public retur() {

enableEvents(AWTEvent.WINDOW_EVENT_MASK);

try {

jbInit();

}

catch(Exception e) {

e.printStackTrace();

}

}

//Component initialization

private void jbInit() throws Exception {

contentPane = (JPanel) this.getContentPane();

jLabel1.setFont(new java.awt.Font("SansSerif", 0, 20));

jLabel1.setForeground(Color.red);

jLabel1.setText("超市管理系统");

contentPane.setLayout(xYLayout1);

this.setSize(new Dimension(400, 300));

this.setTitle("超市管理系统");

contentPane.add(jLabel1, new XYConstraints(139, 1, 126, 33));

}

//Overridden so we can exit when window is closed

protected void processWindowEvent(WindowEvent e) {

super.processWindowEvent(e);

if (e.getID() == WindowEvent.WINDOW_CLOSING) {

System.exit(0);

}

}

}

package untitled5;

import java.io.*;

import java.net.*;

import java.sql.*;

import java.lang.*;

import javax.sql.*;

import java.awt.*;

import java.awt.event.*;

import javax.swing.*;

import com.borland.jbcl.layout.*;

import com.borland.dbswing.*;

//货品信息登记

public class Frame2 extends JFrame {

JPanel contentPane;

JLabel jLabel1 = new JLabel();

XYLayout xYLayout1 = new XYLayout();

JLabel jLabel2 = new JLabel();

JLabel jLabel3 = new JLabel();

JTextField jTextField1 = new JTextField();

JLabel jLabel4 = new JLabel();

JTextField jTextField2 = new JTextField();

JPanel jPanel1 = new JPanel();

XYLayout xYLayout2 = new XYLayout();

JScrollPane jScrollPane1 = new JScrollPane();

JLabel jLabel5 = new JLabel();

JTextField jTextField3 = new JTextField();

//Construct the frame

public Frame2() {

enableEvents(AWTEvent.WINDOW_EVENT_MASK);

try {

jbInit();

}

catch(Exception e) {

e.printStackTrace();

}

}

//Component initialization

private void jbInit() throws Exception {

contentPane = (JPanel) this.getContentPane();

contentPane.setLayout(xYLayout1);

this.setSize(new Dimension(600, 500));

this.setTitle("超市管理系统");

this.addHierarchyBoundsListener(new Frame2_this_hierarchyBoundsAdapter(this));

jLabel1.setFont(new java.awt.Font("SansSerif", 0, 25));

jLabel1.setForeground(Color.red);

jLabel1.setText("超市管理系统");

contentPane.setForeground(Color.black);

jLabel2.setFont(new java.awt.Font("SansSerif", 0, 30));

jLabel2.setText("产 品 信 息 展 示");

// statusBar.setFont(new java.awt.Font("SansSerif", 0, 20));

jLabel3.setFont(new java.awt.Font("SansSerif", 0, 20));

jLabel3.setText("产品名称");

jTextField1.setText("");

jLabel4.setEnabled(true);

jLabel4.setFont(new java.awt.Font("SansSerif", 0, 20));

jLabel4.setText("产品ID号");

jTextField2.setText("");

jTextField2.addActionListener(new Frame2_jTextField2_actionAdapter(this));

jPanel1.setLayout(xYLayout2);

jLabel5.setFont(new java.awt.Font("SansSerif", 0, 25));

jLabel5.setForeground(Color.red);

jLabel5.setText("该产品详细信息");

jTextField3.setText("");

contentPane.add(jLabel1, new XYConstraints(237, 0, 153, 40));

contentPane.add(jLabel2, new XYConstraints(200, 47, 231, 58));

contentPane.add(jLabel3, new XYConstraints(47, 102, 101, 42));

contentPane.add(jTextField1, new XYConstraints(128, 108, 112, 34));

contentPane.add(jTextField2, new XYConstraints(361, 107, 109, 36));

contentPane.add(jPanel1, new XYConstraints(75, 166, 453, 277));

jPanel1.add(jScrollPane1, new XYConstraints(14, 8, 433, 221));

jScrollPane1.getViewport().add(jTextField3, null);

jPanel1.add(jLabel5, new XYConstraints(112, 240, -1, -1));

contentPane.add(jLabel4, new XYConstraints(278, 111, -1, -1));

}

//Overridden so we can exit when window is closed

protected void processWindowEvent(WindowEvent e) {

super.processWindowEvent(e);

if (e.getID() == WindowEvent.WINDOW_CLOSING) {

System.exit(0);

}

}

void Select() {

try {

String str1, str2;

str1 = jTextField1.getText();

str2 = jTextField2.getText();

关于超市会员管理系统源代码和的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站。

版权说明:如非注明,本站文章均为 AH站长 原创,转载请注明出处和附带本文链接;

本文地址:http://ahzz.com.cn/post/14817.html


取消回复欢迎 发表评论:

分享到

温馨提示

下载成功了么?或者链接失效了?

联系我们反馈

立即下载