62,267
社区成员
发帖
与我相关
我的任务
分享
添加方法
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)