Esempio n. 1
0
        private void btn_car_append_Click(object sender, EventArgs e)
        {
            Form_CarInfo_appendModify form_CarInfo_appendModify = new Form_CarInfo_appendModify();

            form_CarInfo_appendModify.isAppend = true;
            form_CarInfo_appendModify.Text     = "车辆信息添加";

            if (form_CarInfo_appendModify.ShowDialog() == DialogResult.OK)
            {
                dataGridView_car.DataSource = mDBM.Select(carViewSQL).Tables[0];
            }
        }
Esempio n. 2
0
        private void dataGridView_car_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex >= 0)
            {
                Form_CarInfo_appendModify form_CarInfo_appendModify = new Form_CarInfo_appendModify();
                form_CarInfo_appendModify.isAppend = false;
                form_CarInfo_appendModify.Text     = "车辆信息修改";

                form_CarInfo_appendModify.licenseNo         = dataGridView_car.Rows[e.RowIndex].Cells["车辆号牌号码"].Value.ToString();
                form_CarInfo_appendModify.subjectName       = dataGridView_car.Rows[e.RowIndex].Cells["考试科目"].Value.ToString();
                form_CarInfo_appendModify.carNo             = dataGridView_car.Rows[e.RowIndex].Cells["车辆编号"].Value.ToString();
                form_CarInfo_appendModify.qualifiedCarTypes = dataGridView_car.Rows[e.RowIndex].Cells["适用准驾车型范围"].Value.ToString();
                form_CarInfo_appendModify.carBrand          = dataGridView_car.Rows[e.RowIndex].Cells["车辆品牌"].Value.ToString();
                form_CarInfo_appendModify.ip        = dataGridView_car.Rows[e.RowIndex].Cells["车载IP"].Value.ToString();
                form_CarInfo_appendModify.scrapDate = dataGridView_car.Rows[e.RowIndex].Cells["强制报废期止"].Value.ToString();

                if (form_CarInfo_appendModify.ShowDialog() == DialogResult.OK)
                {
                    dataGridView_car.DataSource = mDBM.Select(carViewSQL).Tables[0];
                }
            }
        }