/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* managermenu.java
*
* Created on Jul 4, 2010, 1:32:39 AM
*/
package testsql;
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.sql.*;
/**
*
* @author VincenWong
*/
public class ManagerMenu extends javax.swing.JFrame {
String staffid= home.checkid();
String name = home.checkname();
String names,genders,adresss,phones,positions,salarys;
static String branchess;
String totalprice;
int totprice,finalprice,bsalary,esalary;
int finalcprice;
//DefaultListModel ls1 = new DefaultListModel();
/** Creates new form managermenu */
public ManagerMenu() {
try
{
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
String connectionUrl = "jdbc:sqlserver://localhost:1433;" +
"databaseName=vivi;user=sa;password=1234;";
Connection con=DriverManager.getConnection(connectionUrl);
Statement cmd=con.createStatement();
ResultSet rs=cmd.executeQuery("select * from STAFF where StaffID='"+staffid+"'");
if(rs.next())
{
names= rs.getString("Name");
genders=rs.getString("Gender");
adresss= rs.getString("Address");
phones =rs.getString("WorkPhone");
positions = rs.getString("Position");
salarys =rs.getString("Salary");
branchess = rs.getString("Branches");
}
else
JOptionPane.showMessageDialog(null,"Access denied2");
ResultSet rs1= cmd.executeQuery("select * from ORDERS where Branches='"+branchess+"'");
while (rs1.next())
{
// ls1.addElement(rs.getString("OrderID"));
totalprice = rs1.getString("Price");
totprice =Integer.parseInt(totalprice);
finalprice += totprice;
finalcprice++;
}
} catch(Exception ex){JOptionPane.showMessageDialog(null,ex);}
setDefaultCloseOperation(EXIT_ON_CLOSE);
setResizable ( false );
Point center = GraphicsEnvironment.getLocalGraphicsEnvironment().getCenterPoint();
int windowWidth = 800;
int windowHeight = 600;
// set position and size
setBounds(center.x - windowWidth / 2, center.y - windowHeight / 2, windowWidth,
windowHeight);
initComponents();
ImageIcon hahas = new ImageIcon("android-mario-bros.jpg");
String first = "Welcome :"+home.checkname();
String second = " This is "+branchess+" branch";
jlbwel.setText( first+" "+second );
jlmap.setIcon(hahas);
if (branchess.compareTo("PAHANG")==0)
{
jlmap.setIcon(hahas);
}
jtname.setText(names);
jtgender.setText(genders);
jTextArea1.setText(adresss);
jtphone.setText(phones);
jtposition.setText(positions);
jtsalary.setText(salarys);
// jlphone.repaint();
// jlphone.setModel(ls1);
jtbranches.setText(branchess);
jtts.setText(""+finalprice);
jttc.setText(""+finalcprice);
}
public static String getbran()
{
return branchess;
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jTabbedPane4 = new javax.swing.JTabbedPane();
jFrame1 = new javax.swing.JFrame();
jLabel23 = new javax.swing.JLabel();
jTabbedPane3 = new javax.swing.JTabbedPane();
jPanel1 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
jLabel5 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
jLabel7 = new javax.swing.JLabel();
jLabel8 = new javax.swing.JLabel();
jtname = new javax.swing.JTextField();
jtgender = new javax.swing.JTextField();
jScrollPane1 = new javax.swing.JScrollPane();
jTextArea1 = new javax.swing.JTextArea();
jtphone = new javax.swing.JTextField();
jtposition = new javax.swing.JTextField();
jtsalary = new javax.swing.JTextField();
jtbranches = new javax.swing.JTextField();
jLabel13 = new javax.swing.JLabel();
jLabel17 = new javax.swing.JLabel();
jLabel19 = new javax.swing.JLabel();
jlmap = new javax.swing.JLabel();
jPanel2 = new javax.swing.JPanel();
jLabel9 = new javax.swing.JLabel();
jLabel10 = new javax.swing.JLabel();
jtts = new javax.swing.JTextField();
jLabel11 = new javax.swing.JLabel();
jttc = new javax.swing.JTextField();
jButton1 = new javax.swing.JButton();
jLabel12 = new javax.swing.JLabel();
jLabel20 = new javax.swing.JLabel();
jLabel21 = new javax.swing.JLabel();
jPanel3 = new javax.swing.JPanel();
jblocal = new javax.swing.JButton();
jbmap = new javax.swing.JButton();
jLabel14 = new javax.swing.JLabel();
jLabel15 = new javax.swing.JLabel();
jLabel16 = new javax.swing.JLabel();
jLabel18 = new javax.swing.JLabel();
jLabel22 = new javax.swing.JLabel();
jblogout = new javax.swing.JButton();
jlbwel = new javax.swing.JLabel();
javax.swing.GroupLayout jFrame1Layout = new javax.swing.GroupLayout(jFrame1.getContentPane());
jFrame1.getContentPane().setLayout(jFrame1Layout);
jFrame1Layout.setHorizontalGroup(
jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 400, Short.MAX_VALUE)
);
jFrame1Layout.setVerticalGroup(
jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 300, Short.MAX_VALUE)
);
jLabel23.setText("jLabel23");
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("Manager ");
setBackground(new java.awt.Color(51, 204, 0));
jLabel1.setFont(new java.awt.Font("Raavi", 0, 18));
jLabel1.setText("Manager Personal detail");
jLabel2.setText("Name:");
jLabel3.setText("Gender");
jLabel4.setText("Address:");
jLabel5.setText("Phone:");
jLabel6.setText("Position:");
jLabel7.setText("Base Salary:");
jLabel8.setText("Branches: ");
jtname.setEditable(false);
jtgender.setEditable(false);
jTextArea1.setColumns(20);
jTextArea1.setEditable(false);
jTextArea1.setRows(5);
jScrollPane1.setViewportView(jTextArea1);
jtphone.setEditable(false);
jtphone.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jtphoneActionPerformed(evt);
}
});
jtposition.setEditable(false);
jtsalary.setEditable(false);
jtbranches.setEditable(false);
jLabel13.setFont(new java.awt.Font("Tahoma", 1, 13));
jLabel13.setText("Personal Detail");
jLabel17.setFont(new java.awt.Font("Tahoma", 1, 13));
jLabel17.setText("Work Detail");
jlmap.setText("ewe");
javax.swing.GroupLayout jPanel1Layout = new javax.swing.Group
没有合适的资源?快使用搜索试试~ 我知道了~
基于java编程语言的电话销售和管理系统
共189个文件
class:120个
java:30个
form:21个
5星 · 超过95%的资源 需积分: 13 27 下载量 149 浏览量
2010-09-23
15:38:03
上传
评论 1
收藏 370KB RAR 举报
温馨提示
大二的一个项目 用java做的一个电话销售和管理系统,你可以查看员工的业绩,还有各个销售分区的销售业绩。。。
资源推荐
资源详情
资源评论
收起资源包目录
基于java编程语言的电话销售和管理系统 (189个子文件)
ManagerMenu.class 15KB
adminview.class 14KB
Register.class 14KB
Staffmenu.class 14KB
home.class 11KB
orderform2.class 10KB
orderform.class 10KB
addnewstock.class 9KB
updatefull.class 9KB
aviewstaff.class 9KB
editstaff.class 8KB
fspemap.class 8KB
viewUnit.class 8KB
viewstaff.class 7KB
spebranch.class 7KB
statransfer.class 6KB
confirmation.class 5KB
specmap.class 5KB
ownbranch.class 5KB
dfsdfsd.class 4KB
PriceList.class 4KB
SalesRecord.class 4KB
MapPanel.class 2KB
MapPanel$MapLabel.class 2KB
Map.class 2KB
agraph.class 2KB
ShopSalesRecord.class 2KB
Avail.class 2KB
test.class 2KB
viewUnit$2.class 832B
viewUnit$1.class 832B
fspemap$2.class 826B
fspemap$1.class 826B
confirmation$1.class 760B
confirmation$2.class 760B
statransfer$2.class 753B
ManagerMenu$2.class 753B
addnewstock$1.class 753B
ManagerMenu$3.class 753B
ManagerMenu$4.class 753B
ManagerMenu$6.class 753B
ManagerMenu$5.class 753B
statransfer$1.class 753B
ManagerMenu$1.class 753B
aviewstaff$3.class 746B
aviewstaff$4.class 746B
aviewstaff$2.class 746B
orderform2$5.class 746B
orderform2$1.class 746B
updatefull$2.class 746B
orderform2$2.class 746B
aviewstaff$1.class 746B
orderform2$3.class 746B
orderform2$4.class 746B
updatefull$1.class 746B
editstaff$1.class 739B
orderform$1.class 739B
viewstaff$2.class 739B
adminview$1.class 739B
adminview$3.class 739B
ownbranch$3.class 739B
editstaff$2.class 739B
orderform$3.class 739B
adminview$2.class 739B
Staffmenu$2.class 739B
orderform$2.class 739B
adminview$4.class 739B
Staffmenu$3.class 739B
ownbranch$2.class 739B
spebranch$2.class 739B
orderform$4.class 739B
spebranch$1.class 739B
Staffmenu$4.class 739B
Staffmenu$1.class 739B
orderform$5.class 739B
ownbranch$1.class 739B
spebranch$3.class 739B
viewstaff$1.class 739B
Register$3.class 732B
Register$7.class 732B
Register$4.class 732B
viewUnit$3.class 732B
Register$2.class 732B
Register$1.class 732B
Register$6.class 732B
Register$5.class 732B
specmap$1.class 725B
fspemap$3.class 725B
specmap$2.class 725B
specmap$3.class 725B
home$4.class 704B
home$5.class 704B
home$1.class 704B
home$2.class 704B
home$3.class 704B
orderform2$6.class 560B
ShopSalesRecord$1.class 557B
spebranch$4.class 556B
specmap$4.class 548B
fspemap$4.class 547B
共 189 条
- 1
- 2
资源评论
- liaozhiyan2014-06-01不错的 可以借鉴借鉴
HushPuppies
- 粉丝: 3
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功