CreateTable.aspx.cs 881 B

12345678910111213141516171819202122232425
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. using System.Web.UI;
  6. using System.Web.UI.WebControls;
  7. public partial class Admin_CreateTable : System.Web.UI.Page
  8. {
  9. LYS.UserData1 myud = new LYS.UserData1();
  10. protected void Page_Load(object sender, EventArgs e)
  11. {
  12. }
  13. protected void Button1_Click(object sender, EventArgs e)
  14. { //Create TABLE [表名]([字段名1] MEMO NOT NULL, [字段名2] MEMO, [字段名3] COUNTER NOT NULL, [字段名4] DATETIME, [字段名5] TEXT(200), [字段名6] TEXT(200))
  15. myud.RunCreateSQL(TextBox1.Text);
  16. }
  17. protected void Button3_Click(object sender, EventArgs e)
  18. {//
  19. string SQL = "select ID,教师姓名,count(distinct 教师姓名) from TKJL GROUP BY ID,教师姓名 order by 教师姓名";
  20. Literal1.Text = myud.DispLineData(SQL).ToString();
  21. }
  22. }