Exemplo n.º 1
0
 public override bool IsExist <TValue>(CellBase <TValue> cell, bool isExist)
 {
     if (isExist)
     {
         return(true);
     }
     Builder.AppendFormat("行:{0},列:{1},“<b>{2}</b>”不存在。<br />", rowNo, cell.Name, cell.Value);
     return(false);
 }
Exemplo n.º 2
0
        public override bool NotNull <TValue>(CellBase <TValue> cell, object obj)
        {
            if (obj != null && string.IsNullOrWhiteSpace(obj.ToString()) == false)
            {
                return(true);
            }

            Builder.AppendFormat("行:{0},列:{1},不能为空。<br />", rowNo, cell.Name);
            return(false);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 解析时会为 cell.Value 赋值
        /// </summary>
        public override bool Parse <TValue>(CellBase <TValue> cell, object obj)
        {
            if ((cell.TryParse ?? ObjUtil.TryParse)(obj, out cell.Value))
            {
                return(true);
            }

            Builder.AppendFormat("行:{0},列:{1},{2}。<br />", rowNo, cell.Name, SMsg <TValue> .InvalidType);
            return(false);
        }
Exemplo n.º 4
0
Arquivo: Cell.cs Projeto: vein7/Net00
 public abstract bool IsExist <TValue>(CellBase <TValue> cell, bool isExist);
Exemplo n.º 5
0
Arquivo: Cell.cs Projeto: vein7/Net00
 public abstract bool NotNull <TValue>(CellBase <TValue> cell, object obj);
Exemplo n.º 6
0
Arquivo: Cell.cs Projeto: vein7/Net00
 /// <summary>
 /// 解析时会为 cell.Value 赋值
 /// </summary>
 public abstract bool Parse <TValue>(CellBase <TValue> cell, object obj);