Example #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);
 }
Example #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);
        }
Example #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);
        }
Example #4
0
File: Cell.cs Project: vein7/Net00
 public abstract bool IsExist <TValue>(CellBase <TValue> cell, bool isExist);
Example #5
0
File: Cell.cs Project: vein7/Net00
 public abstract bool NotNull <TValue>(CellBase <TValue> cell, object obj);
Example #6
0
File: Cell.cs Project: vein7/Net00
 /// <summary>
 /// 解析时会为 cell.Value 赋值
 /// </summary>
 public abstract bool Parse <TValue>(CellBase <TValue> cell, object obj);