object convertToType(object pVal, Type pType) { if (ToolCell.isNull(pVal)) { pVal = ToolType.getTypeDefaulValue(pType); } return(Convert.ChangeType(pVal, pType)); }
public static object getCellTypeDefaulValue(Type type) { return((type == typeof(DateTime)) ? DBNull.Value : ToolType.getTypeDefaulValue(type)); }