Ejemplo n.º 1
0
 /// <summary>
 /// 添加是否热门产品
 /// </summary>
 /// <param name="obj">带入参数</param>
 /// <returns></returns>
 public int Insert_HotProductTableData(HotProduct_Table obj)
 {
     return(DBHerlper.ExecuteNonQuery(GetSqlString("Insert"),
                                      CommandType.StoredProcedure,
                                      new SqlParameter[] {
         new SqlParameter("@HP_Name", obj.HP_Name)
     }));
 }
Ejemplo n.º 2
0
        /// <summary>
        /// 获取全部的是否热门产品
        /// </summary>
        /// <returns></returns>
        public List <HotProduct_Table> GetHotProductTableAll()
        {
            List <HotProduct_Table> list = new List <HotProduct_Table>();
            SqlDataReader           dr   = DBHerlper.ExecuteReader(GetSqlString("Select"),
                                                                   CommandType.StoredProcedure);

            while (dr.Read())
            {
                HotProduct_Table obj = new HotProduct_Table()
                {
                    HP_Name = dr["HP_Name"].ToString(),
                    HP_id   = Convert.ToInt32(dr["HP_id"])
                };
                list.Add(obj);
            }
            dr.Close();
            return(list);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 根据ID查询是否热门产品信息
        /// </summary>
        /// <param name="con"></param>
        /// <returns></returns>
        public HotProduct_Table GetHotProductTableByConn(string con)
        {
            HotProduct_Table obj = null;
            SqlDataReader    dr  = DBHerlper.ExecuteReader(
                "Select * from HotProduct_Table where HP_id=@HP_id",
                CommandType.Text, new SqlParameter[] {
                new SqlParameter("@HP_id", con)
            });

            if (dr.Read())
            {
                obj = new HotProduct_Table()
                {
                    HP_Name = dr["HP_Name"].ToString(),
                    HP_id   = Convert.ToInt32(dr["HP_id"])
                };
            }
            dr.Close();
            return(obj);
        }
Ejemplo n.º 4
0
 /// <summary>
 /// 更改是否热门产品信息
 /// </summary>
 /// <param name="obj">带入参数</param>
 /// <returns></returns>
 public int Update_HotProductTableData(HotProduct_Table obj)
 {
     return(relevanceClass.Update_HotProductTableData(obj));
 }
Ejemplo n.º 5
0
 /// <summary>
 /// 添加是否热门产品信息
 /// </summary>
 /// <param name="obj">带入参数</param>
 /// <returns></returns>
 public int Insert_HotProductTableData(HotProduct_Table obj)
 {
     return(relevanceClass.Insert_HotProductTableData(obj));
 }