@Override
	public void actionPerformed(ActionEvent e) {
		if (e.getActionCommand().equals("保存")) {
			String ids = id.getText();
			String names = name.getText();
			String ages = age.getText();
			String tells = tell.getText();
			String adds = address.getText();
			String memos = memo.getText();
			String sexs = sex.getSelectedItem().toString();
			String months = month.getSelectedItem().toString();
			String days = day.getSelectedItem().toString();
			
			//**********校验
			if(!Check.checkNull(new String[]{"会员编号","会员名","年龄","电话","地址"}, new String[]{ids,names,ages,tells,adds})){
				return ;
			}
			if(!Check.checkNum(new String[]{"年龄"}, new String[]{ages})){
				return ;
			}
			CustomerService cs=new CustomerService();
			Customer cc = cs.getCustomer(ids);
			if(cc!=null){
				JOptionPane.showMessageDialog(null, "该帐号已存在！", "提示", JOptionPane.INFORMATION_MESSAGE);
				return ;
			}
			//***********保存
			
			Customer cus = new Customer();
			cus.setId(ids);
			cus.setUsername(names);
			cus.setAge(Integer.parseInt(ages));
			cus.setTel(tells);
			cus.setAddress(adds);
			cus.setRemarks(memos);
			cus.setSex(sexs);
			cus.setBrithday(months+"."+days);
			cus.setStatus("0");
			
			cs.save(cus);
			JOptionPane.showMessageDialog(null, "保存成功", "提示", JOptionPane.INFORMATION_MESSAGE);
			Constants.id = ids;
			reset();
		} else if (e.getActionCommand().equals("清空")) {
			reset();
		} else if (e.getActionCommand().equals("查询")) {
			select();
		}else if (e.getActionCommand().equals("账户信息")) {
			main.change(new Cardinfo_Add(this.main,id.getText(),name.getText()));
		} 
		
	}