点击回欢乐生肖官方网站APP下载
我的浏览记录 | | 帮助?
当前位置:

源码截图

源码目录树

当前路径:Lk.ProductShow.DAL/HelpInfo.cs     
using System;
using System.Data;
using System.Text;
using System.Data.SqlClient;
using Microsoft.ApplicationBlocks.Data;
namespace LK.ProductShow.DAL
{
	/// <summary>
	/// 数据访问类:HelpInfo
	/// </summary>
	public partial class HelpInfo
	{
        public string sqlConnectionString = LK.ProductShow.SqlConn.SqlConn.SqlConnectionString();

		public HelpInfo()
		{}
		#region  BasicMethod



        public int GetMaxId()
        {
            return new GetMaxID().GetID("AritcleID", "LK_HelpInfo");
        }


        public DataTable GetList(string strWhere, int pageSize, int pageIndex, out int counts, out int pageCounts)
        {
            return LK.ProductShow.Common.PageView.GetPageView("LK_HelpInfo", "*", pageSize, pageIndex, "AritcleID", true, strWhere, "AritcleID", out counts, out pageCounts).Tables[0];
        }


		/// <summary>
		/// 增加一条数据
		/// </summary>
		public int Add(LK.ProductShow.Model.HelpInfo model)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("insert into LK_HelpInfo(");
			strSql.Append("ArticleTitle,ArticleContent,ArticleMemo,ArticleAuto,ArticleDate,ArticleHits,ArticlePic,CategoryID)");
			strSql.Append(" values (");
			strSql.Append("@ArticleTitle,@ArticleContent,@ArticleMemo,@ArticleAuto,@ArticleDate,@ArticleHits,@ArticlePic,@CategoryID)");
			strSql.Append(";select @@IDENTITY");
			SqlParameter[] parameters = {
					new SqlParameter("@ArticleTitle", SqlDbType.NVarChar,100),
					new SqlParameter("@ArticleContent", SqlDbType.Text),
					new SqlParameter("@ArticleMemo", SqlDbType.NVarChar,500),
					new SqlParameter("@ArticleAuto", SqlDbType.NVarChar,50),
					new SqlParameter("@ArticleDate", SqlDbType.DateTime),
					new SqlParameter("@ArticleHits", SqlDbType.Int,4),
					new SqlParameter("@ArticlePic", SqlDbType.NVarChar,150),
					new SqlParameter("@CategoryID", SqlDbType.Int,4)};
			parameters[0].Value = model.ArticleTitle;
			parameters[1].Value = model.ArticleContent;
			parameters[2].Value = model.ArticleMemo;
			parameters[3].Value = model.ArticleAuto;
			parameters[4].Value = model.ArticleDate;
			parameters[5].Value = model.ArticleHits;
			parameters[6].Value = model.ArticlePic;
			parameters[7].Value = model.CategoryID;

			object obj = SqlHelper.ExecuteScalar(sqlConnectionString, CommandType.Text, strSql.ToString(),parameters);
			if (obj == null)
			{
				return 0;
			}
			else
			{
				return Convert.ToInt32(obj);
			}
		}
		/// <summary>
		/// 更新一条数据
		/// </summary>
		public bool Update(LK.ProductShow.Model.HelpInfo model)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("update LK_HelpInfo set ");
			strSql.Append("ArticleTitle=@ArticleTitle,");
			strSql.Append("ArticleContent=@ArticleContent,");
			strSql.Append("ArticleMemo=@ArticleMemo,");
			...
对不起,完整源码文件,请先购买后再查看
| | | |
联系电话(Tel):4008-010-151(免长途)
地址:北京市海淀区中关村鼎好大厦A座二层 邮编:100080
Room A-801,Dinghao Building,Zhongguancun,Beijing,China,100080
版权所有 CopyRight © 2006-2015. | 京公网安备11010702000869号
分享该页面
关闭侧边栏
欢乐生肖官方网站 欢乐生肖官方网站APP下载 欢乐生肖游戏APP 欢乐生肖官方APP 手机版欢乐生肖APP下载 欢乐生肖官方APP 欢乐生肖官方网站 手机版欢乐生肖APP下载 欢乐生肖游戏APP 手机版欢乐生肖APP下载