public void Initialize(ABCView view, ABCBindingInfo bindingInfo) { this.DataSource = bindingInfo.BusName; this.DataMember = bindingInfo.FieldName; this.TableName = bindingInfo.TableName; this.Text = ABCPresentHelper.GetLabelCaption(view, this.DataSource, this.DataMember); }
public void PopulateControls(ABCView view, String BusName, String strTableName) { ViewOwner = view; DataSource = BusName; TableName = strTableName; int iCount = 0; foreach (DataConfigProvider.FieldConfig fieldConfig in DataConfigProvider.TableConfigList[strTableName].FieldConfigList.Values) { //if ( fieldConfig.IsDefault ) //{ String strDiplay = DataConfigProvider.GetFieldCaption(strTableName, fieldConfig.FieldName); if (strDiplay == fieldConfig.FieldName) { continue; } ABCBindingBaseEdit ctrl; if (view.Mode == ViewMode.Design) { ctrl = (ABCBindingBaseEdit)view.Surface.DesignerHost.CreateComponent(typeof(ABCBindingBaseEdit)); } else { ctrl = (ABCBindingBaseEdit)ABCDynamicInvoker.CreateInstanceObject(typeof(ABCBindingBaseEdit)); } ABCBindingInfo bindInfo = new ABCBindingInfo(); bindInfo.BusName = BusName; bindInfo.TableName = TableName; bindInfo.FieldName = fieldConfig.FieldName; List <Type> lstType = ABCControls.ABCPresentHelper.GetControlTypes(TableName, fieldConfig.FieldName); if (lstType.Count <= 0) { continue; } foreach (Type type in lstType) { if (type != typeof(ABCSearchControl)) { bindInfo.ControlType = lstType[0]; break; } } ctrl.Initialize(view, bindInfo); ctrl.Parent = this; iCount++; //} } if (iCount % 2 != 0) { iCount++; } iCount = iCount / 2; this.Size = new Size(229 * 2 + 4 * 3, 20 * iCount + (iCount + 1) * 5); }
public void Initialize(ABCView view, ABCBindingInfo bindingInfo) { try { OwnerView = view; this.DataSource = bindingInfo.BusName; this.DataMember = bindingInfo.FieldName; this.TableName = bindingInfo.TableName; if (bindingInfo.ControlType == null || String.IsNullOrWhiteSpace(bindingInfo.ControlType.FullName)) { this.UIControlType = typeof(ABCTextEdit).FullName; } else { this.UIControlType = bindingInfo.ControlType.FullName; } } catch (Exception ex) { ABCHelper.ABCMessageBox.Show("Binding cancel"); } }
public void Initialize(ABCBindingInfo bindingInfo) { this.DataSource = bindingInfo.BusName; this.DataMember = bindingInfo.FieldName; this.TableName = bindingInfo.TableName; }
public void Initialize(ABCView view, ABCBindingInfo bindingInfo) { this.DataSource = bindingInfo.BusName; this.DataMember = bindingInfo.FieldName; // this.Caption=ABCPresentUtils.GetLabelCaption( view , this.DataSource , this.DataMember ); }