⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 datehistorysearch.java

📁 小区物业管理系统
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
					t++;
					inuptownname=new String(uptown_name2[i]);
					inuptownid=new String(uptown_id2[i]);
					if(t==1)
					{
						DateHistorySearch dhs1=new DateHistorySearch(2,inuptownid, inuptownname);
					}
					DateHistorySearch.this.setVisible(false);
				}
			}
			);
		dateLabel[1]=new JLabel("时间");
		c = new GridBagConstraints(5,5,1,1,0,0,10,0,inset,0,0);
		gridbag.setConstraints(dateLabel[1],c);
		panelin.add(dateLabel[1]);
		
		dateBox2=new JComboBox(date2);
		dateBox2.setMaximumRowCount( 5 );
		c = new GridBagConstraints(6,5,1,1,0,0,10,0,inset,0,0);
		gridbag.setConstraints(dateBox2,c);
		panelin.add(dateBox2);
		dateBox2.addItemListener(
			new ItemListener() {
				public void itemStateChanged( ItemEvent event )
				{
					int i=0;
					i = dateBox2.getSelectedIndex();
					t++;
					indate=new String(date2[i]);
				}
			}
			);
		
		button2=new JButton("确定");
		c = new GridBagConstraints(11,5,1,1,0,0,10,0,inset,0,0);
		gridbag.setConstraints(button2,c);
		panelin.add(button2);
		button2.addActionListener( 
			new ActionListener(){
				public void actionPerformed( ActionEvent event) {
					if(indate.equals("选择日期"))
					{
						JOptionPane.showMessageDialog(null,"请选择日期后再按确定","Error",JOptionPane.PLAIN_MESSAGE);
					}
					else
					{
						UptownBuildingShow ubs=new UptownBuildingShow(indate, inuptownid, inuptownname);
						DateHistorySearch.this.setVisible(false);
					}
				}
			}
			);
		if(tt!=2)
		{
			button2.setEnabled(false);
		}
		
		System.out.println("step2 end");
		
		titleLabel3=new JLabel("3、查询小区内的全部业主");
		c = new GridBagConstraints(2,6,2,1,0,0,10,0,inset,0,0);
		gridbag.setConstraints(titleLabel3,c);
		panelin.add(titleLabel3);
		
		uptownLabel[1]=new JLabel("小区选择");
		c = new GridBagConstraints(2,7,1,1,0,0,10,0,inset,0,0);
		gridbag.setConstraints(uptownLabel[1],c);
		panelin.add(uptownLabel[1]);
		
		uptownBox[1]=new JComboBox(uptown_name3);
		uptownBox[1].setMaximumRowCount( 5 );
		c = new GridBagConstraints(3,7,1,1,0,0,10,0,inset,0,0);
		gridbag.setConstraints(uptownBox[1],c);
		panelin.add(uptownBox[1]);
		uptownBox[1].addItemListener(
			new ItemListener() {
				public void itemStateChanged( ItemEvent event )
				{
					int i=0;
					i = uptownBox[1].getSelectedIndex();
					t++;
					inuptownname=new String(uptown_name3[i]);
					inuptownid=new String(uptown_id3[i]);
					if(t==1)
					{
						DateHistorySearch dhs1=new DateHistorySearch(3,inuptownid, inuptownname);
					}
					DateHistorySearch.this.setVisible(false);
				}
			}
			);
		dateLabel[2]=new JLabel("时间");
		c = new GridBagConstraints(5,7,1,1,0,0,10,0,inset,0,0);
		gridbag.setConstraints(dateLabel[2],c);
		panelin.add(dateLabel[2]);
		
		dateBox3=new JComboBox(date3);
		dateBox3.setMaximumRowCount( 5 );
		c = new GridBagConstraints(6,7,1,1,0,0,10,0,inset,0,0);
		gridbag.setConstraints(dateBox3,c);
		panelin.add(dateBox3);
		dateBox3.addItemListener(
			new ItemListener() {
				public void itemStateChanged( ItemEvent event )
				{
					int i=0;
					i = dateBox3.getSelectedIndex();
					t++;
					indate=new String(date3[i]);
				}
			}
			);
		
		button3=new JButton("确定");
		c = new GridBagConstraints(11,7,1,1,0,0,10,0,inset,0,0);
		gridbag.setConstraints(button3,c);
		panelin.add(button3);
		button3.addActionListener( 
			new ActionListener(){
				public void actionPerformed( ActionEvent event) {
					if(indate.equals("选择日期"))
					{
						JOptionPane.showMessageDialog(null,"请选择日期后再按确定","Error",JOptionPane.PLAIN_MESSAGE);
					}
					else
					{
						UptownRoomShow urs=new UptownRoomShow(indate, inuptownid, inuptownname);
						DateHistorySearch.this.setVisible(false);
					}
				}
			}
			);
		if(tt!=3)
		{
			button3.setEnabled(false);
		}
		
		System.out.println("step3 end");
		
		titleLabel4=new JLabel("4、查询小区内某栋楼的全部业主");
		c = new GridBagConstraints(2,8,2,1,0,0,10,0,inset,0,0);
		gridbag.setConstraints(titleLabel4,c);
		panelin.add(titleLabel4);
		
		uptownLabel[2]=new JLabel("小区选择");
		c = new GridBagConstraints(2,9,1,1,0,0,10,0,inset,0,0);
		gridbag.setConstraints(uptownLabel[2],c);
		panelin.add(uptownLabel[2]);
		
		uptownBox[2]=new JComboBox(uptown_name4);
		uptownBox[2].setMaximumRowCount( 5 );
		c = new GridBagConstraints(3,9,1,1,0,0,10,0,inset,0,0);
		gridbag.setConstraints(uptownBox[2],c);
		panelin.add(uptownBox[2]);
		uptownBox[2].addItemListener(
			new ItemListener() {
				public void itemStateChanged( ItemEvent event )
				{
					int i=0;
					i = uptownBox[2].getSelectedIndex();
					t++;
					inuptownname=new String(uptown_name4[i]);
					inuptownid=new String(uptown_id4[i]);
					if(t==1)
					{
						DateHistorySearch dhs1=new DateHistorySearch(4,inuptownid, inuptownname);
					}
					DateHistorySearch.this.setVisible(false);
				}
			}
			);
		
		buildingLabel=new JLabel("楼宇选择");
		c = new GridBagConstraints(5,9,1,1,0,0,10,0,inset,0,0);
		gridbag.setConstraints(buildingLabel,c);
		panelin.add(buildingLabel);
		
		buildingBox=new JComboBox(building_id);
		buildingBox.setMaximumRowCount( 5 );
		c = new GridBagConstraints(6,9,1,1,0,0,10,0,inset,0,0);
		gridbag.setConstraints(buildingBox,c);
		panelin.add(buildingBox);
		buildingBox.addItemListener(
			new ItemListener() {
				public void itemStateChanged( ItemEvent event )
				{
					int i=0;
					i = buildingBox.getSelectedIndex();
					t++;
					inbuilding=new String(building_id[i]);
					if(t==1)
					{
						DateHistorySearch dhs1=new DateHistorySearch(inuptownid, inuptownname, inbuilding);
					}
					DateHistorySearch.this.setVisible(false);
				}
			}
			);
		
		dateLabel[3]=new JLabel("时间");
		c = new GridBagConstraints(8,9,1,1,0,0,10,0,inset,0,0);
		gridbag.setConstraints(dateLabel[3],c);
		panelin.add(dateLabel[3]);
		
		date4=new String[5];
		date4[0]=new String("选择时间");
		dateBox4=new JComboBox(date4);
		dateBox4.setMaximumRowCount( 5 );
		c = new GridBagConstraints(9,9,1,1,0,0,10,0,inset,0,0);
		gridbag.setConstraints(dateBox4,c);
		panelin.add(dateBox4);
		
		button4=new JButton("确定");
		c = new GridBagConstraints(11,9,1,1,0,0,10,0,inset,0,0);
		gridbag.setConstraints(button4,c);
		panelin.add(button4);
		button4.setEnabled(false);
		
		System.out.println("step14 end");
		
		setSize(800,600);
		setVisible(true);
	}
	
	public DateHistorySearch(String uptownid, String uptownname, String buildingid)
	{
		super("类别选择");
		System.out.println("date history seatch 3 begin");
		Container panelin = getContentPane();
		gridbag=new GridBagLayout();
		panelin.setLayout(gridbag);
		inset = new Insets(5,5,5,5);
		indate=new String("选择日期");
		
		dateLabel=new JLabel[4];
		uptownLabel=new JLabel[3];
		uptownBox=new JComboBox[3];
		
		getuptown();
		getdate1();
		
		inuptownid=new String(uptownid);
		inuptownname=new String(uptownname);
		inbuilding=new String(buildingid);
		
		getdate4(inuptownid,inbuilding);
		
		uptown_name4[0]=new String(inuptownname);
		uptown_id4[0]=new String(inuptownid);
		
		getbuilding(inuptownid);
		building_id[0]=new String(inbuilding);
		
		
		titleLabel1=new JLabel("1、查询全部小区");
		c = new GridBagConstraints(2,1,2,1,0,0,10,0,inset,0,0);
		gridbag.setConstraints(titleLabel1,c);
		panelin.add(titleLabel1);
		
		dateLabel[0]=new JLabel("时间");
		c = new GridBagConstraints(2,3,1,1,0,0,10,0,inset,0,0);
		gridbag.setConstraints(dateLabel[0],c);
		panelin.add(dateLabel[0]);
		
		dateBox1=new JComboBox(date1);
		dateBox1.setMaximumRowCount( 5 );
		c = new GridBagConstraints(3,3,1,1,0,0,10,0,inset,0,0);
		gridbag.setConstraints(dateBox1,c);
		panelin.add(dateBox1);
		dateBox1.addItemListener(
			new ItemListener() {
				public void itemStateChanged( ItemEvent event )
				{
					int i=0;
					i = dateBox1.getSelectedIndex();
					t++;
					indate=new String(date1[i]);
				}
			}
			);
		
		button1=new JButton("确定");
		c = new GridBagConstraints(11,3,1,1,0,0,10,0,inset,0,0);
		gridbag.setConstraints(button1,c);
		panelin.add(button1);
		button1.addActionListener( 
			new ActionListener(){
				public void actionPerformed( ActionEvent event) {
					if(indate.equals("选择日期"))
					{
						JOptionPane.showMessageDialog(null,"请选择日期后再按确定","Error",JOptionPane.PLAIN_MESSAGE);
					}
					else
					{
						UptownShow us=new UptownShow(indate);
						DateHistorySearch.this.setVisible(false);
					}
				}
			}
			);
		
		System.out.println("step 1 end");
			
		titleLabel2=new JLabel("2、查询小区内全部楼宇");
		c = new GridBagConstraints(2,4,2,1,0,0,10,0,inset,0,0);
		gridbag.setConstraints(titleLabel2,c);
		panelin.add(titleLabel2);
		
		uptownLabel[0]=new JLabel("小区选择");
		c = new GridBagConstraints(2,5,1,1,0,0,10,0,inset,0,0);
		gridbag.setConstraints(uptownLabel[0],c);
		panelin.add(uptownLabel[0]);
		
		uptownBox[0]=new JComboBox(uptown_name2);
		uptownBox[0].setMaximumRowCount( 5 );
		c = new GridBagConstraints(3,5,1,1,0,0,10,0,inset,0,0);
		gridbag.setConstraints(uptownBox[0],c);
		panelin.add(uptownBox[0]);
		uptownBox[0].addItemListener(
			new ItemListener() {
				public void itemStateChanged( ItemEvent event )
				{
					int i=0;
					i = uptownBox[0].getSelectedIndex();
					t++;
					inuptownname=new String(uptown_name2[i]);
					inuptownid=new String(uptown_id2[i]);
					if(t==1)
					{
						DateHistorySearch dhs1=new DateHistorySearch(2,inuptownid, inuptownname);
					}DateHistorySearch.this.setVisible(false);
				}
			}
			);
		dateLabel[1]=new JLabel("时间");
		c = new GridBagConstraints(5,5,1,1,0,0,10,0,inset,0,0);
		gridbag.setConstraints(dateLabel[1],c);
		panelin.add(dateLabel[1]);
		
		date2=new String[4];
		date2[0]=new String("选择时间");
		dateBox2=new JComboBox(date2);
		dateBox2.setMaximumRowCount( 5 );
		c = new GridBagConstraints(6,5,1,1,0,0,10,0,inset,0,0);
		gridbag.setConstraints(dateBox2,c);
		panelin.add(dateBox2);
		
		button2=new JButton("确定");
		c = new GridBagConstraints(11,5,1,1,0,0,10,0,inset,0,0);
		gridbag.setConstraints(button2,c);
		panelin.add(button2);
		button2.setEnabled(false);
		
		System.out.println("step 2 end");
		
		titleLabel3=new JLabel("3、查询小区内的全部业主");
		c = new GridBagConstraints(2,6,2,1,0,0,10,0,inset,0,0);
		gridbag.setConstraints(titleLabel3,c);
		panelin.add(titleLabel3);
		
		uptownLabel[1]=new JLabel("小区选择");
		c = new GridBagConstraints(2,7,1,1,0,0,10,0,inset,0,0);
		gridbag.setConstraints(uptownLabel[1],c);
		panelin.add(uptownLabel[1]);
		
		uptownBox[1]=new JComboBox(uptown_name3);
		uptownBox[1].setMaximumRowCount( 5 );
		c = new GridBagConstraints(3,7,1,1,0,0,10,0,inset,0,0);
		gridbag.setConstraints(uptownBox[1],c);
		panelin.add(uptownBox[1]);
		uptownBox[1].addItemListener(
			new ItemListener() {
				public void itemStateChanged( ItemEvent event )
				{
					int i=0;
					i = uptownBox[1].getSelectedIndex();

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -