日期:2014-05-18 浏览次数:20525 次
添加方法 string name= this.TextBox1.Text.Trim(); DB_Test dbt = new DB_Test(); dbt.Uname = name; int i = TestManager.Add(dbt); if (i>0) { Page.ClientScript.RegisterStartupScript(this.GetType(), "", "alert('成功');", true); bind(); } else { Page.ClientScript.RegisterStartupScript(this.GetType(), "", "alert('失败');", true); }
存储过程 if exists(select * from sysobjects where name='proc_Add') drop proc proc_Add go create proc proc_Add @uname nvarchar(50) as insert into Test (uname) values(@uname)