private void InitMe(ParticipantEntity pe)
 {
     this.cboPartType.Properties.DisplayMember = "Description";
     this.cboPartType.Properties.ValueMember = "Type";
     LookUpColumnInfo column = new LookUpColumnInfo("Description");
     column.Caption = "参与者类型";
     column.FieldName = "Description";
     this.cboPartType.Properties.Columns.Clear();
     this.cboPartType.Properties.Columns.Add(column);
     this.cboPartType.Properties.DataSource = ParticipantTypeList.Get();
     this.cboParticipantIDValue.EditValueChanged += delegate (object sender, EventArgs e) {
         this.cboParticipantIDValue.Visible = true;
         string editValue = (string) this.cboPartType.EditValue;
         if (editValue != null)
         {
             if (!(editValue == "DEPT"))
             {
                 if (editValue == "ROLE")
                 {
                     this.cboParticipantIDValue.Properties.DataSource = OGMService.Roles;
                 }
                 else if (editValue == "STAFF")
                 {
                     this.cboParticipantIDValue.Properties.DataSource = OGMService.Staffs;
                 }
                 else if (editValue == "ALL")
                 {
                     this.cboParticipantIDValue.EditValue = string.Empty;
                     this.cboParticipantIDValue.Properties.DataSource = null;
                     this.cboParticipantIDValue.Visible = false;
                 }
             }
             else
             {
                 this.cboParticipantIDValue.Properties.DataSource = OGMService.Depts;
             }
         }
     };
     this.cboPartType.EditValue = pe.Type;
     this.cboParticipantIDValue.Properties.DisplayMember = "Name";
     this.cboParticipantIDValue.Properties.ValueMember = "Id";
     column = new LookUpColumnInfo("Description");
     column.Caption = "名称";
     column.FieldName = "Name";
     this.cboParticipantIDValue.Properties.Columns.Clear();
     this.cboParticipantIDValue.Properties.Columns.Add(column);
     this.cboParticipantIDValue.EditValue = pe.IdValue;
 }
 public ParticipantEntityControl(ParticipantEntity pe)
 {
     this.InitializeComponent();
     this.InitMe(pe);
 }