Exemplo n.º 1
0
        private void CarPosition_Load(object sender, EventArgs e)
        {
            //加载所有车位信息
            //CarPositionDal carpos = new CarPositionDal();
            //dt= carpos.GetAll();
            //if (dt.Rows.Count <= 0)
            //{
            //    MessageBox.Show("还有添加任何车位...");
            //    return;
            //}

            //dataGridView1.DataSource = dt;
            GetData();
            comboBox1.SelectedIndex = 0;

            //将所有车类型信息加载到combox中
            CarType   types = new CarType();
            DataTable dt2   = types.GetAll();

            foreach (DataRow row in dt2.Rows)
            {
                comboBox1.Items.Add(row["name"]);
                //同时将下面的车类型也填充进去
                cmbCarType.Items.Add(row["name"]);
            }
        }
Exemplo n.º 2
0
        //窗体一加载的时候就将所有车的类型加载出来
        private void CarCollectFee_Load(object sender, EventArgs e)
        {
            CarType   cars = new CarType();
            DataTable dt   = cars.GetAll();

            foreach (DataRow row in dt.Rows)
            {
                string car = row["name"].ToString();
                comboBox1.Items.Add(car);
            }
            DataRow row1 = dt.Rows[0];

            comboBox1.SelectedIndex = 0;
            txtPosition.Text        = row1["needposition"].ToString();
            txtStartMoney.Text      = row1["startmoney"].ToString();
        }
Exemplo n.º 3
0
        //窗体一加载的时候,将车类型全部加载出来
        private void CollectFeeStandard_Load(object sender, EventArgs e)
        {
            CarType   types = new CarType();
            DataTable dt    = types.GetAll();

            foreach (DataRow row in dt.Rows)
            {
                string type = row["name"].ToString();
                comboBox1.Items.Add(type);
            }
            DataRow row1 = dt.Rows[0];

            comboBox1.SelectedIndex = 0;
            txtFee.Text             = row1["startmoney"].ToString();
            txtPosition.Text        = row1["needPosition"].ToString();
        }