junfkt2
11/24/2014 - 6:53 AM

给时间参数传空值

给时间参数传空值

            SqlParameter parm2 = new SqlParameter()
            {
                ParameterName = "@CompletedTime",
                SqlDbType = SqlDbType.DateTime,
                Value = isCompleted ? System.DateTime.Now : (object)DBNull.Value
            };