示例#1
0
        public IHttpActionResult AllColumnInfo(HttpRequestMessage request, string progId)
        {
            string errorMsg = string.Empty;
            var    result   = BcfTemplateMethods.GetBcfDefineFields(progId, out errorMsg);

            if (!string.IsNullOrEmpty(errorMsg))
            {
                return(BadRequest(errorMsg));
            }
            return(Ok(result));
        }
示例#2
0
        public IHttpActionResult DisplayColumnInfo(HttpRequestMessage request, string progId)
        {
            string errorMsg = string.Empty;
            var    result   = BcfTemplateMethods.GetBcfMobileShowScheme(progId, out errorMsg);

            if (!string.IsNullOrEmpty(errorMsg))
            {
                return(BadRequest(errorMsg));
            }
            return(Ok(JsonConvert.DeserializeObject(result)));
        }
示例#3
0
        /// <summary>
        /// 根据功能标识返回对应的主表中的所有列,以FuzzyResult的形式返回
        /// Zhangkj 20170321
        /// </summary>
        /// <param name="progId"></param>
        /// <returns></returns>
        public IList <FuzzyResult> GetDynamicFields(string progId)
        {
            List <FuzzyResult>         list      = new List <FuzzyResult>();
            string                     msg       = string.Empty;
            List <List <DefineField> > fieldList = BcfTemplateMethods.GetBcfDefineFields(progId, out msg);

            if (string.IsNullOrEmpty(msg) == false || fieldList == null || fieldList.Count == 0 || fieldList[0] == null || fieldList[0].Count == 0)
            {
                return(list);
            }
            foreach (DefineField field in fieldList[0])
            {
                if (field == null)
                {
                    continue;
                }
                list.Add(new FuzzyResult(field.Name, field.DisplayName));
            }
            return(list);
        }