private void _dialogStockPoolEdit_Load(object sender, EventArgs e) { var stock = _stockService.GetStockInfoByCode(StockCode); this.txtCode.Text = stock.FullCode; this.txtName.Text = stock.Name; var investors = _userService.GetAllOperators(); this.luPrincipal.Initialize(investors, "Code", "Name", showHeader: true, enableSearch: true); var stockPool = _IDService.GetIDStockPoolByCode(StockCode); //修改股票池的场合 if (stockPool != null) { this._isEdit = true; luPrincipal.EditValue = stockPool.Principal; this.memoRemarks.Text = stockPool.Remarks; } else { this._isEdit = false; } }