public virtual int MaxId()
    {
        int id = 0;

        try
        {
            id = db.ExecuteCommand("select max(id) from " + typeof(T).Name);
        }
        catch
        {
            id = 0;
        }
        return(id);
    }
 protected void Button2_Click(object sender, EventArgs e)
 {
     if (!tool.StrIsNullOrEmpty(TextBox2.Text))
     {
         using (dbcms db = new dbcms())
         {
             try
             {
                 db.ExecuteCommand(TextBox2.Text);
             }
             catch (Exception error)
             {
                 tj.Text = TextBox2.Text + " 错误信息:" + error.Message;
             }
             tj.Text = TextBox2.Text + " sql语句执行完毕";
         }
     }
 }