日期:2014-05-17 浏览次数:20504 次
SqlParameter[] para = { new SqlParameter("@PID", privateAch.PID), new SqlParameter("@ID", privateAch.ID), new SqlParameter("@PersonID", privateAch.PersonID), new SqlParameter("@AchName", privateAch.AchName), new SqlParameter("@AchAddress", privateAch.AchAddress), new SqlParameter("@CreateTime",privateAch.CreateTime), new SqlParameter("@IsDelete",privateAch.IsDelete), new SqlParameter("@Type",privateAch.Type), new SqlParameter("@Bsmall",privateAch.Bsmall), new SqlParameter("@WJL",privateAch.WJL)}; string sql = "IF EXISTS(SELECT * FROM T_PrivateAch WHERE ID=@ID) begin update T_PrivateAch set PID=@PID,PersonID=@PersonID,AchName=@AchName,AchAddress=@AchAddress,CreateTime=@CreateTime,IsDelete=@IsDelete,Type=@Type,Bsmall=@Bsmall,WJL=@WJL where ID=@ID end else begin insert into T_PrivateAch(ID,PID,PersonID,AchName,AchAddress,CreateTime,IsDelete,Type,Bsmall,WJL) values(@ID,@PID,@PersonID,@AchName,@AchAddress,@CreateTime,@IsDelete,@Type,@Bsmall,@WJL); end"; return OperatorProxy.Add("新增一个公告信息", sql, para);