protected void Button1_Click(object sender, EventArgs e) { var a = new CommentOps(); int checkInsert = a.SaveComment(TextBox1.Text,TextBox2.Text, DateTime.Now); if (checkInsert == 1) { Label1.Text = "保存成功"; } else { Label1.Text = "保存失败"; } }
protected void Page_Load(object sender, EventArgs e) { var a = new CommentOps(); List<CommentModel> comment= a.GetComment(); }