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); }
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); }
/// <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); }
public abstract bool IsExist <TValue>(CellBase <TValue> cell, bool isExist);
public abstract bool NotNull <TValue>(CellBase <TValue> cell, object obj);
/// <summary> /// 解析时会为 cell.Value 赋值 /// </summary> public abstract bool Parse <TValue>(CellBase <TValue> cell, object obj);