C#代码
public 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"]; }
T-SQL代码
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 [email protected] end else print ‘id 存在,不做任何操作‘ select * from inserted go insert Student values(‘123123‘,‘nnn‘,‘女‘,0,‘138‘,‘地址地址‘,‘2012-12-12‘,‘[email protected]‘,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;}
时间: 2024-10-14 15:04:49