日期:2014-05-18  浏览次数:20785 次

求助!!!查错comboBox取值问题
using   System;
using   System.Collections.Generic;
using   System.ComponentModel;
using   System.Data;
using   System.Drawing;
using   System.Text;
using   System.Windows.Forms;

namespace   test
{
        public   partial   class   Form1   :   Form
        {
                public   Form1()
                {
                        InitializeComponent();
                }

                //System.DateTime   currentTime   =   new   System.DateTime();
 

                private   bool   Check(int   year)
                {
                        if   ((year   %   4   ==   0)   &&   (year   %   100   !=   0)   ||   (year   %   400   ==   0))
                                return   true;
                        else  
                                return   false;
                }

         

           

                private   void   Form1_Load(object   sender,   EventArgs   e)
                {
                        for   (int   i   =   2000;   i   <=   2099;   i++)
                        {
                                comboBox1.Items.Add(i.ToString());
                        }

                        for   (int   i   =   1;   i   <=   12;   i++)
                        {
                                comboBox2.Items.Add(i.ToString());
                        }

                        for   (int   i   =   1;   i   <=   31;   i++)
                        {
                                comboBox3.Items.Add(i.ToStri