ClassLibrary1/DAL/NewsMain.cs
(开头部分) 22KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Data;
using System.Text;
using System.Data.SqlClient;
using Conris.Utility;
namespace Conris.DBA.DAL
{
/// <summary>
/// 数据访问类:NewsMain
/// </summary>
public partial class NewsMain
{
public NewsMain()
{ }
#region BasicMethod
/// <summary>
/// 是否存在该记录
/// </summary>
public bool Exists(string ID)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("select count(1) from NewsMain");
strSql.Append(" where ID=@ID ");
SqlParameter[] parameters = {
new SqlParameter("@ID", SqlDbType.NVarChar,100) };
parameters[0].Value = ID;
return DbHelperSQL.Exists(strSql.ToString(), parameters);
}
/// <summary>
/// 增加一条数据
/// </summary>
public bool Add(Conris.DBA.Model.NewsMain model)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("insert into NewsMain(");
strSql.Append("ID,Category,Title,Type,TitleColor,ISCuTi,ISXieTi,NewsSource,Author,EntryBy,IsUse,IsDraft,Lever,IsPictureNews,PictureID,ReView,NewsContent,Int1,Int2,Int3,Int4,str1,str2,str3,str4,CreateTime,UpdateTime)");
strSql.Append(" values (");
strSql.Append("@ID,@Category,@Title,@Type,@TitleColor,@ISCuTi,@ISXieTi,@NewsSource,@Author,@EntryBy,@IsUse,@IsDraft,@Lever,@IsPictureNews,@PictureID,@ReView,@NewsContent,@Int1,@Int2,@Int3,@Int4,@str1,@str2,@str3,@str4,@CreateTime,@UpdateTime)");
SqlParameter[] parameters = {
new SqlParameter("@ID", SqlDbType.NVarChar,100),
new SqlParameter("@Category", SqlDbType.NVarChar,100),
new SqlParameter("@Title", SqlDbType.NVarChar,-1),
new SqlParameter("@Type", SqlDbType.NVarChar,50),
new SqlParameter("@TitleColor", SqlDbType.NVarChar,50),
new SqlParameter("@ISCuTi", SqlDbType.NVarChar,50),
new SqlParameter("@ISXieTi", SqlDbType.NVarChar,50),
new SqlParameter("@NewsSource", SqlDbType.NVarChar,100),
new SqlParameter("@Author", SqlDbType.NVarChar,50),
new SqlParameter("@EntryBy", SqlDbType.NVarChar,50),
new SqlParameter("@IsUse", SqlDbType.NVarChar,50),
new SqlParameter("@IsDraft", SqlDbType.NVarChar,50),
new SqlParameter("@Lever", SqlDbType.NVarChar,50),
new SqlParameter("@IsPictureNews", SqlDbType.NVarChar,50),
new SqlParameter("@PictureID", SqlDbType.NVarChar,100),
new SqlParameter("@ReView", SqlDbType.NVarChar,-1),
new SqlParameter("@NewsContent", SqlDbType.NVarChar,-1),
new SqlParameter("@Int1", SqlDbType.Int,4),
后面还有 514 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
