コード例 #1
0
 public virtual void BindData(IDataForm dataForm)
 {
     this.TryEnter();
     if (this.DataEngine == null)
     {
         throw new DataFormException("DataEngine cannot be null");
     }
     if (this.ds != null)
     {
         this.BeginEdit();
         foreach (DataControl control in this.daoDataForm.DataControls)
         {
             if (!(((control.MapColumn == null) && (control.MapTable == null)) && string.IsNullOrEmpty(control.ValueList)))
             {
                 string memberName = (control.MapColumn != null) ? control.MapColumn.Name : string.Empty;
                 dataForm.BindDataToControl(control.Name, (control.MapTable != null) ? this.ds.Tables[control.MapTable.Name] : null, memberName, control.ValueCollection);
             }
         }
     }
     else
     {
         LoggingService.WarnFormatted("异步线程没有获取到数据集", new object[0]);
     }
 }