DAL/ProductImgMobileService.cs

(开头部分) 12KB

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

using System;
using System.Data;
using System.Text;
using System.Data.SqlClient;
using Model;

namespace DAL
{
	/// <summary>
	/// 数据访问类:ProductImgMobileService
	/// </summary>
	public partial class ProductImgMobileService
	{
		public ProductImgMobileService()
		{}
		#region  BasicMethod

        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public static Model.ProductImgMobile GetModelByProductId(int productId)
        {

            StringBuilder strSql = new StringBuilder();
            strSql.Append("select  top 1 id,typeId,typeName,productId,orderNum,imgUrl,status,remark,addTime,addUser,infoType from ProductImgMobile ");
            strSql.Append(" where productId=@productId and infoType = 4 order by id desc");
            SqlParameter[] parameters = {
					new SqlParameter("@productId", SqlDbType.Int,4)
			};
            parameters[0].Value = productId;

            Model.ProductImgMobile model = new Model.ProductImgMobile();
            DataSet ds = DBHelperSQL.Query(strSql.ToString(), parameters);
            if (ds.Tables[0].Rows.Count > 0)
            {
                return DataRowToModel(ds.Tables[0].Rows[0]);
            }
            else
            {
                return null;
            }
        }
        /// <summary>
        /// 获取移动端日记Banner
        /// </summary>
        /// <param name="productId"></param>
        /// <returns></returns>
        public static ProductImgMobile GetMobileBanner(int productId)
        {
            StringBuilder strSql=new StringBuilder();
			strSql.Append("select  top 1 id,typeId,typeName,productId,orderNum,imgUrl,status,remark,addTime,addUser,infoType from ProductImgMobile ");
			strSql.Append(" where productId=@productId and status = 1 order by id desc");
			SqlParameter[] parameters = {
					new SqlParameter("@productId", SqlDbType.Int,4)
			};
			parameters[0].Value = productId;

			Model.ProductImgMobile model=new Model.ProductImgMobile();
			DataSet ds=DBHelperSQL.Query(strSql.ToString(),parameters);
			if(ds.Tables[0].Rows.Count>0)
后面还有 363 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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