static public String GetDefaultValue(FieldInfoRow paFieldInfoRow) { switch (paFieldInfoRow.DefaultValue) { default: return(paFieldInfoRow.DefaultValue); } }
protected void ApplyBehaviour(TWidControl paWidControl, FieldInfoRow paFieldInfoRow) { PropertyInfo lcPropertyInfo; object lcValue; object lcOutputValue; try { if ((paFieldInfoRow != null) && ((lcPropertyInfo = paWidControl.GetType().GetProperty(paFieldInfoRow.ColumnName)) != null)) { lcValue = clFormInfoManager.TranslateStringEx(paFieldInfoRow.DefaultValue); if ((!String.IsNullOrWhiteSpace(paFieldInfoRow.DefaultValue)) && (General.TryChangeType(lcValue, lcPropertyInfo.PropertyType, out lcOutputValue))) { lcPropertyInfo.SetValue(paWidControl, lcOutputValue, null); } } } catch (Exception paException) { General.WriteExceptionLog(paException, "ApplyBehaviour"); } }
public void RenderWidget(String paRederMode = "") { TWidControl lcWidControl; FieldInfoRow lcFieldInfoRow; lcWidControl = new TWidControl(); lcWidControl.SCI_ParentForm = clCompositeForm; if (clFormInfoManager.FieldInfoManager.FieldInfoList != null) { lcFieldInfoRow = new FieldInfoRow(null); foreach (DataRow lcDataRow in clFormInfoManager.FieldInfoManager.FieldInfoList.Rows) { lcFieldInfoRow.Row = lcDataRow; ApplyBehaviour(lcWidControl, lcFieldInfoRow); } lcWidControl.RenderChildMode(clComponentController, paRederMode); } }