public static int ExecuteScalarReInt(string cmdText, params SqlParameter[] commandParameters) { object o = SqlProvider.ExecuteScalar(SqlProvider.CONN_STRING, CommandType.Text, cmdText, commandParameters); if (o != null && o != DBNull.Value) { return((int)o); } return(0); }
public static object ExecuteScalar(string cmdText, params SqlParameter[] commandParameters) { return(SqlProvider.ExecuteScalar(SqlProvider.CONN_STRING, CommandType.Text, cmdText, commandParameters)); }