Ejemplo n.º 1
0
        private void NewVehicleForm_Load(object sender, EventArgs e)
        {
            LoadLanguage("");
            this.cmb_Nation.Items.Clear();
            DAL.DAL_CustomerInfo customerdal = new DAL.DAL_CustomerInfo();

            DataTable _dt = customerdal.getNationTable();

            if (_dt.Rows.Count > 0)
            {
                foreach (DataRow _row in _dt.Rows)
                {
                    this.cmb_Nation.Items.Add(_row[1]);
                }
            }
        }
Ejemplo n.º 2
0
        private void EditCustomerForm_Load(object sender, EventArgs e)
        {
            LoadLanguage("");

            this.cmb_Nation.Items.Clear();

            DAL.DAL_CustomerInfo userdal = new DAL.DAL_CustomerInfo();

            DataTable _dt = userdal.getNationTable();

            if (_dt.Rows.Count > 0)
            {
                foreach (DataRow _row in _dt.Rows)
                {
                    this.cmb_Nation.Items.Add(_row[1]);
                }
            }

            userdao = userdal.selectCustomerInfoID(customerid);

            if (userdao == null)
            {
                MessageBox.Show("获取用户信息失败!");
                this.Close();
            }
            else
            {
                this.combo_CustomerSex.Text = userdao.Sex;
                this.txb_CustomerName.Text  = userdao.Name;
                this.cmb_Nation.Text        = userdao.Nation;
                this.txb_Address.Text       = userdao.Address;
                this.txb_IDCard.Text        = userdao.Idcard;
                this.txb_Rfid.Text          = userdao.Rfid;
                this.txb_Remark.Text        = userdao.Remark;
                if (userdao.Istemp == 0)
                {
                    cmb_CustomerType.SelectedIndex = 0;
                }
                else
                {
                    cmb_CustomerType.SelectedIndex = 1;
                }
            }
        }