DAL/T_sites.cs

(开头部分) 8KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Data;
using System.Text;
using System.Data.SqlClient;
using Maticsoft.DBUtility;//Please add references
namespace SoftMVC.DAL
{
	/// <summary>
	/// 数据访问类:T_sites
	/// </summary>
	public partial class T_sites
	{
		public T_sites()
		{}
		#region  BasicMethod

		/// <summary>
		/// 是否存在该记录
		/// </summary>
		public bool Exists(decimal sitesid)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("select count(1) from T_sites");
			strSql.Append(" where sitesid=@sitesid ");
			SqlParameter[] parameters = {
					new SqlParameter("@sitesid", SqlDbType.Decimal,9)			};
			parameters[0].Value = sitesid;

			return DbHelperSQL.Exists(strSql.ToString(),parameters);
		}


		/// <summary>
		/// 增加一条数据
		/// </summary>
		public bool Add(SoftMVC.Model.T_sites model)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("insert into T_sites(");
			strSql.Append("sitesid,sitestype,sitesvalue,sitestext,sitesbz,sitesbz1)");
			strSql.Append(" values (");
			strSql.Append("@sitesid,@sitestype,@sitesvalue,@sitestext,@sitesbz,@sitesbz1)");
			SqlParameter[] parameters = {
					new SqlParameter("@sitesid", SqlDbType.Decimal,9),
					new SqlParameter("@sitestype", SqlDbType.VarChar,30),
					new SqlParameter("@sitesvalue", SqlDbType.VarChar,50),
					new SqlParameter("@sitestext", SqlDbType.VarChar,100),
					new SqlParameter("@sitesbz", SqlDbType.VarChar,200),
					new SqlParameter("@sitesbz1", SqlDbType.VarChar,200)};
			parameters[0].Value = model.sitesid;
			parameters[1].Value = model.sitestype;
			parameters[2].Value = model.sitesvalue;
			parameters[3].Value = model.sitestext;
			parameters[4].Value = model.sitesbz;
			parameters[5].Value = model.sitesbz1;

			int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
			if (rows > 0)
			{
				return true;
后面还有 264 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。