private void FillFormData() { try { hdCuId.Value = Request["cuid"]; var entity = CustomerBiz.GetCuCustomerEntity(hdCuId.Value); if (entity != null) { txtCuId.Text = entity.CuId; txtCuName.Text = entity.CuName; txtDistrict.Text = entity.District; txtAddress.Text = entity.Address; txtRemark.Text = entity.Remark; rEnabled.Checked = (bool)entity.ActivityFlag; rDisabled.Checked = !(bool)entity.ActivityFlag; } else { btnAddNew.Enabled = false; txtCuId.Text = "*后台自动生成*"; } txtCuId.Enabled = false; } catch (Exception ex) { lMessage.Text = string.Format("数据加载失败,原因:{0}", ex.Message); } }