//提交事务 public void CommitTransaction() { if (!tran.IsNullOrSpace()) { tran.Commit(); } this.Close(); }