private void InitCompontValue() { var result = new InsuranceFundBLL().GetInsuranceFundList(_currentPeopleID).Data; if (result.Count > 0) { isEdit = true; var fund = result.FirstOrDefault(r => r.InsuranceFundType == (int)InsuranceFundType.住房公积金); if (fund != null) { this._fundID = fund.InsuranceFundID; this.txtHouseNumber.Text = fund.Number; this.txtHousePaymentAddress.Text = fund.PaymentAddress; if (fund.PaymentEndDate.HasValue) { this.dtpHousePaymentEndDate.Checked = true; this.dtpHousePaymentEndDate.Value = fund.PaymentEndDate.Value; } else { this.dtpHousePaymentEndDate.Checked = false; } if (fund.PaymentStartDate.HasValue) { this.dtphousePaymentStartDate.Value = fund.PaymentStartDate.Value; } this.txtHouseBasicNum.Text = fund.BasicNum.ToString(); } var insurance = result.FirstOrDefault(r => r.InsuranceFundType == (int)InsuranceFundType.社保); if (insurance != null) { this._insuranceID = insurance.InsuranceFundID; this.txtSocialNumber.Text = fund.Number; this.txtSocialPaymentAddress.Text = insurance.PaymentAddress; if (insurance.PaymentEndDate.HasValue) { this.dtpSocialPaymentEndDate.Checked = true; this.dtpSocialPaymentEndDate.Value = insurance.PaymentEndDate.Value; } else { this.dtpSocialPaymentEndDate.Checked = false; } if (insurance.PaymentStartDate.HasValue) { this.dtpSocialPaymentStartDate.Value = insurance.PaymentStartDate.Value; } this.txtSocialBasicNum.Text = insurance.BasicNum.ToString(); } } }