Exemple #1
0
        // 加载数据
        void ShowData(int id)
        {
            object o = AppContext.Current.Set(entityType).Find(id);

            FormHelper.ShowFormData(this.map, o);
        }
Exemple #2
0
        //-----------------------------------------------
        // 显示表单数据
        //-----------------------------------------------
        /// <summary>绑定表单。自动生成表单控件,并显示数据</summary>
        /// <param name="form">表单对象</param>
        /// <param name="o">数据对象</param>
        public static void BindForm(FormBase form, object o)
        {
            var map = FormHelper.BuildForm(form, new UISetting(o.GetType()));

            ShowFormData(map, o);
        }