向数据库中插入null值,不能直接使用C#中的null,必须使用DBNull.Value
int?height = textBox3.Text.Trim().lengeth==0?null:(int?)Convert.ToInt32(textBox3.text.trim());
Sqlparameter [ ] pms = new Sqlparameter[ ]{
new Sqlparameter("@height",SqlDbType.Int){Value ==height==null?DBNull.value:(object)height}
}