App_code/Column/GuestBook/R_GuestBook.cs
(开头部分) 7KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Data;
using System.Configuration;
using System.Data.SqlClient;
using SqlOperate;
/// <summary>
/// R_GuestBook 的摘要说明
/// </summary>
namespace GuestBook
{
public class RGuestBook : IGuestBook
{
public static string ConnectionString = ConfigurationManager.ConnectionStrings["sqlData"].ConnectionString;
#region IGuestBook 成员
/// <summary>
/// 添加留言
/// </summary>
/// <param name="con">留言对象</param>
/// <returns></returns>
public int Insert(TGuestBook con)
{
SqlParameter[] commandParameters = new SqlParameter[]
{
new SqlParameter("@M_ID", con.M_ID),
new SqlParameter("@G_Name", con.G_Name),
new SqlParameter("@G_Email", con.G_Email),
new SqlParameter("@G_Tel", con.G_Tel),
new SqlParameter("@G_Address", con.G_Address),
new SqlParameter("@G_Title", con.G_Title),
new SqlParameter("@G_Content", con.G_Content),
new SqlParameter("@G_Date", con.G_Date),
new SqlParameter("@G_Show", con.G_Show),
new SqlParameter("@Lang",con.Lang)
};
return SqlHelper.ExecuteNonQuery(CommandType.StoredProcedure, "SP_C_GuestBook_Add", commandParameters);
}
/// <summary>
/// 回复留言
/// </summary>
/// <param name="con">留言对象</param>
/// <returns></returns>
public int Update(TGuestBook con)
{
SqlParameter[] commandParameters = new SqlParameter[]
{
new SqlParameter("@ID",con.ID),
new SqlParameter("@G_Show", con.G_Show),
new SqlParameter("@G_Resumes", con.G_Resumes),
new SqlParameter("@G_ResumesName", con.G_ResumesName),
new SqlParameter("@G_ResumesTime", con.G_ResumesTime)
};
return SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, "SP_C_GuestBook_Update", commandParameters);
}
/// <summary>
/// 根据ID删除留言
后面还有 148 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。