Пример #1
0
        /// <summary>
        /// 根据标签 获取表格值
        /// </summary>
        /// <param name="tagName"></param>
        /// <returns></returns>
        public string GetTagTableValue(string tagName)
        {
            LawItemPara p = GetParaByTagName(tagName);

            if (p != null)
            {
                return(Convert.ToBase64String(p.byte_ParaValue));
            }
            return(null);
        }
Пример #2
0
        /// <summary>
        /// 根据标签 获取BOOL值
        /// </summary>
        /// <param name="tagName"></param>
        /// <returns></returns>
        public bool GetTagBoolValue(string tagName)
        {
            LawItemPara p = GetParaByTagName(tagName);

            if (p != null)
            {
                return(p.s_ParaValue == "True");
            }
            return(false);
        }
Пример #3
0
        /// <summary>
        /// 根据标签 获取值
        /// </summary>
        /// <param name="tagName"></param>
        /// <returns></returns>
        public string GetTagValue(string tagName)
        {
            LawItemPara p = GetParaByTagName(tagName);

            if (p != null)
            {
                return(p.s_ParaValue);
            }
            return("");
        }
Пример #4
0
        /// <summary>
        /// 根据标签,获取日期值
        /// 支持日期加减
        /// 支持自定义日期格式
        /// 注意:本方法只用于从参数传递日期加减与格式计算
        /// </summary>
        /// <param name="tagName"></param>
        /// <returns></returns>
        public string GetTagDateValue(string tagName)
        {
            string[]    tagPart = TagPart(tagName);
            LawItemPara p       = GetParaByTagName(tagName);

            if (p != null)
            {
                string value = p.s_ParaValue;
                if (!string.IsNullOrEmpty(value))
                {
                    DateTime dt = DateTime.Parse(value);
                    //对值进行加减
                    dt = AplayDate(dt, tagPart[3]);
                    //对值进行格式化
                    return(FormatDate(ref dt, tagPart[4]));
                }
            }
            return(null);
        }