コード例 #1
0
        public ActionResult SaveForm(string keyValue, string schemeInfo, string scheme, int type)
        {
            FormSchemeInfoEntity schemeInfoEntity = schemeInfo.ToObject <FormSchemeInfoEntity>();
            FormSchemeEntity     schemeEntity     = new FormSchemeEntity();

            schemeEntity.F_Scheme = scheme;
            schemeEntity.F_Type   = type;

            formSchemeIBLL.SaveEntity(keyValue, schemeInfoEntity, schemeEntity);
            return(Success("保存成功!"));
        }
コード例 #2
0
        public ActionResult GetFormData(string keyValue)
        {
            FormSchemeInfoEntity schemeInfoEntity = formSchemeIBLL.GetSchemeInfoEntity(keyValue);
            FormSchemeEntity     schemeEntity     = formSchemeIBLL.GetSchemeEntity(schemeInfoEntity.F_SchemeId);
            var jsonData = new
            {
                schemeInfoEntity = schemeInfoEntity,
                schemeEntity     = schemeEntity
            };

            return(Success(jsonData));
        }
コード例 #3
0
        /// <summary>
        /// 获取自定义表单设置内容和表单模板
        /// </summary>
        /// <param name="keyValue">主键</param>
        /// <returns></returns>
        public ActionResult GetCustmerFormData(string keyValue)
        {
            var relation = formRelationIBLL.GetEntity(keyValue);

            FormSchemeInfoEntity schemeInfoEntity = formSchemeIBLL.GetSchemeInfoEntity(relation.F_FormId);
            FormSchemeEntity     schemeEntity     = formSchemeIBLL.GetSchemeEntity(schemeInfoEntity.F_SchemeId);

            var jsonData = new
            {
                relation   = relation,
                schemeInfo = schemeInfoEntity,
                scheme     = schemeEntity
            };

            return(Success(jsonData));
        }
コード例 #4
0
ファイル: FormApi.cs プロジェクト: wangzhefeng2000/Learun
        /// <summary>
        /// 获取表单模板数据
        /// </summary>
        /// <param name="_"></param>
        /// <returns></returns>
        private Response GetScheme(dynamic _)
        {
            List <SchemeReq> req = this.GetReqData <List <SchemeReq> >();// 获取模板请求数据
            Dictionary <string, FormSchemeEntity> schemeList = new Dictionary <string, FormSchemeEntity>();

            foreach (var item in req)
            {
                FormSchemeInfoEntity schemeInfoEntity = formSchemeIBLL.GetSchemeInfoEntity(item.id);
                FormSchemeEntity     schemeEntity     = formSchemeIBLL.GetSchemeEntity(schemeInfoEntity.F_SchemeId);
                string ver = ((DateTime)schemeEntity.F_CreateDate).ToString("yyyyMMddhhmmss");
                if (ver != item.ver)
                {
                    schemeList.Add(item.id, schemeEntity);
                }
            }
            return(Success(schemeList));
        }
コード例 #5
0
        /// <summary>
        /// 获取表单模板数据
        /// </summary>
        /// <param name="_"></param>
        /// <returns></returns>
        private Response GetScheme(dynamic _)
        {
            List <SchemeReq> req = this.GetReqData <List <SchemeReq> >();// 获取模板请求数据
            Dictionary <string, FormSchemeEntity> schemeList = new Dictionary <string, FormSchemeEntity>();

            foreach (var item in req)
            {
                FormSchemeInfoEntity schemeInfoEntity = formSchemeIBLL.GetSchemeInfoEntity(item.id);
                if (schemeInfoEntity != null)
                {
                    FormSchemeEntity schemeEntity = formSchemeIBLL.GetSchemeEntity(schemeInfoEntity.F_SchemeId);
                    if (schemeEntity != null)
                    {
                        if (schemeInfoEntity.F_SchemeId != item.ver)
                        {
                            schemeList.Add(item.id, schemeEntity);
                        }
                    }
                }
            }
            return(Success(schemeList));
        }