测试 Windows Live Wrter
2020-12-13 16:28
标签:style blog http io color ar sp 数据 div C#代码 T-SQL代码 测试 Windows Live Wrter 标签:style blog http io color ar sp 数据 div 原文地址:http://www.cnblogs.com/vin-c/p/4083687.htmlpublic CartHandler()
{
}
public CartHandler(int id, int num, string action)
{
this.id = id;// string.IsNullOrEmpty(context.Request.Params["id"]) ? 0 : Convert.ToInt32(context.Request.Params["id"]);
this.num = num;// string.IsNullOrEmpty(context.Request.Params["num"]) ? 0 : Convert.ToInt32(context.Request.Params["num"]);
this.action = action;// string.IsNullOrEmpty(context.Request.Params["action"]) ? "" : context.Request.Params["action"];
}
if exists(select * from sysobjects where name =‘tr_student_insert‘)
drop trigger tr_student_insert
go
create trigger tr_student_insert
on student after insert
as
--declare @studentNo int =(select StudentNo from inserted)
--declare @classId int =(select ClassId from inserted)
declare @studentNo int
declare @classId int
select @studentNo=studentNo, @classId= ClassId from inserted
if((select ClassId from grade where ClassId=@classId) is null)
begin
print ‘id不存在,删除一条插入的数据‘
--delete Student where StudentNo=@studentNo
end
else
print ‘id 存在,不做任何操作‘
select * from inserted
go
insert Student values(‘123123‘,‘nnn‘,‘女‘,0,‘138‘,‘地址地址‘,‘2012-12-12‘,‘xx@qq.com‘,0)
select * from Student
Css代码
@charset "gb2312";
/* CSS Document */
.list_1 div.title{ background:none; border-bottom:none; height:80px; text-align:center;}
.list_1 div.title span{ float:right; margin:0 50px 0 0;}
.detail .content{ background:none;width:640px; margin:0 auto 20px;}
.detail .content p{ margin:0; width:auto; line-height:25px;}