示例#1
0
        /// <summary>
        /// 编辑时,加载数据
        /// </summary>
        /// <param name="Id"></param>
        private void LoadData(string Id)
        {
            FormDesignBLL bll  = new FormDesignBLL();
            ControlInfo   info = bll.GetControlById(Id);

            if (info != null)
            {
                txtControlType.Text = info.Class;
                txtDesc.Text        = info.Description;
                txtJson.Text        = info.Json;
                txtName.Text        = info.Name;
                txtType.Text        = info.Type;
            }
        }
示例#2
0
        /// <summary>
        /// 取得某个控件
        /// </summary>
        /// <returns></returns>
        private string GetControlByID()
        {
            string Id = HttpContext.Current.Request.Form["ID"];

            if (string.IsNullOrEmpty(Id))
            {
                return("Fail");
            }
            else
            {
                FormDesignBLL bll  = new FormDesignBLL();
                ControlInfo   info = bll.GetControlById(Id);
                if (info != null)
                {
                    return(EasyUIJsonConvert.Serialize <ControlInfo>(info));
                }
                else
                {
                    return("Fail");
                }
            }
        }