private void btnEidt_Click(object sender, EventArgs e) { formResidentBaseInfo formBaseInfo = new formResidentBaseInfo(); dgvCurrentRow = dgvResidentBaseInfo.CurrentRow.DataBoundItem.ToStringObjectDictionary(); formBaseInfo.ShowDialog(); }
private void btnAdd_Click(object sender, EventArgs e) { formResidentBaseInfo formBaseInfo = new formResidentBaseInfo(); dgvCurrentRow = null; formBaseInfo.ShowDialog(); }
private void formForAdd() { formResidentBaseInfo fm = new formResidentBaseInfo(); fm.Text = "新增居民基本信息"; lblResidentId.Text = Guid.NewGuid().ToString(); txbResidentName.Text = null; txbIDNo.Text = null; txbTel.Text = null; txbMobile.Text = null; txbPlaceOfHouseholdRegister.Text = null; txbResidentialAddress.Text = null; txbPostCode.Text = null; txbRemark.Text = null; rbtGenderM.Checked = true; //cbxStreet.SelectedIndex = -1; //cbxCommunity.SelectedIndex = -1; cbxResidentBizId.SelectedIndex = -1; cbxAccountType.SelectedIndex = -1; cbxEducationLevel.SelectedIndex = -1; cbxMarriage.SelectedIndex = -1; cbxLivingStatus.SelectedIndex = -1; cbxHousingStatus.SelectedIndex = -1; cbxIncomeStatus.SelectedIndex = -1; cbxNation.SelectedIndex = -1; cbxNativePlace.SelectedIndex = -1; cbxHouseholdRegister.SelectedIndex = -1; cbxResidentialOfHometown.SelectedIndex = -1; }
private void formForEidt(StringObjectDictionary baseInfo) { formResidentBaseInfo fm = new formResidentBaseInfo(); fm.Text = "编辑居民基本信息"; lblResidentId.Text = baseInfo["ResidentId"].ToString(); txbResidentName.Text = baseInfo["ResidentName"].ToString(); txbIDNo.Text = baseInfo["IDNo"].ToString(); txbTel.Text = baseInfo["Tel"].ToString(); txbMobile.Text = baseInfo["Mobile"].ToString(); txbPlaceOfHouseholdRegister.Text = baseInfo["PlaceOfHouseholdRegister"].ToString(); txbResidentialAddress.Text = baseInfo["ResidentialAddress"].ToString(); txbPostCode.Text = baseInfo["PostCode"].ToString(); txbRemark.Text = baseInfo["Remark"].ToString(); string gender = baseInfo["Gender"].ToString(); if (gender == "M") { rbtGenderM.Checked = true; } else if (gender == "F") { rbtGenderF.Checked = true; } else { rbtGenderM.Checked = false; rbtGenderF.Checked = false; } //cbxStreet.SelectedIndex = -1; //cbxCommunity.SelectedIndex = -1; //cbxResidentBizId.SelectedValue = Int32.Parse(baseInfo["ResidentBizId"].ToString()); //cbxAccountType.SelectedValue = Int32.Parse(baseInfo["AccountType"].ToString()); //cbxEducationLevel.SelectedValue = Int32.Parse(baseInfo["EducationLevel"].ToString()); //cbxMarriage.SelectedValue = Int32.Parse(baseInfo["Marriage"].ToString()); //cbxLivingStatus.SelectedValue = Int32.Parse(baseInfo["LivingStatus"].ToString()); //cbxHousingStatus.SelectedValue = Int32.Parse(baseInfo["HousingStatus"].ToString()); //cbxIncomeStatus.SelectedValue = Int32.Parse(baseInfo["IncomeStatus"].ToString()); //cbxNation.SelectedValue = Int32.Parse(baseInfo["Nation"].ToString()); //cbxNativePlace.SelectedValue = Int32.Parse(baseInfo["NativePlace"].ToString()); //cbxHouseholdRegister.SelectedValue = Int32.Parse(baseInfo["HouseholdRegister"].ToString()); //cbxResidentialOfHometown.SelectedValue = Int32.Parse(baseInfo["ResidentialOfHometown"].ToString()); }