コード例 #1
0
 static public String GetDefaultValue(FieldInfoRow paFieldInfoRow)
 {
     switch (paFieldInfoRow.DefaultValue)
     {
     default: return(paFieldInfoRow.DefaultValue);
     }
 }
コード例 #2
0
        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"); }
        }
コード例 #3
0
        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);
            }
        }