/// <summary>
 /// 添加是否新产品
 /// </summary>
 /// <param name="obj">带入参数</param>
 /// <returns></returns>
 public int Insert_NewProductTableData(NewProduct_Table obj)
 {
     return(DBHerlper.ExecuteNonQuery(GetSqlString("Insert"),
                                      CommandType.StoredProcedure,
                                      new SqlParameter[] {
         new SqlParameter("@NP_Name", obj.NP_Name)
     }));
 }
        /// <summary>
        /// 获取全部的是否新产品
        /// </summary>
        /// <returns></returns>
        public List <NewProduct_Table> GetNewProductTableAll()
        {
            List <NewProduct_Table> list = new List <NewProduct_Table>();
            SqlDataReader           dr   = DBHerlper.ExecuteReader(GetSqlString("Select"),
                                                                   CommandType.StoredProcedure);

            while (dr.Read())
            {
                NewProduct_Table obj = new NewProduct_Table()
                {
                    NP_id   = Convert.ToInt32(dr["NP_id"]),
                    NP_Name = dr["NP_Name"].ToString()
                };
                list.Add(obj);
            }
            dr.Close();
            return(list);
        }
        /// <summary>
        /// 根据ID查询是否新产品信息
        /// </summary>
        /// <param name="con"></param>
        /// <returns></returns>
        public NewProduct_Table GetNewProductTableByConn(string con)
        {
            NewProduct_Table obj = null;
            SqlDataReader    dr  = DBHerlper.ExecuteReader(
                "Select * from NewProduct_Table where NP_id=@NP_id",
                CommandType.Text, new SqlParameter[] {
                new SqlParameter("@NP_id", con)
            });

            if (dr.Read())
            {
                obj = new NewProduct_Table()
                {
                    NP_id   = Convert.ToInt32(dr["NP_id"]),
                    NP_Name = dr["NP_Name"].ToString()
                };
            }
            dr.Close();
            return(obj);
        }
 /// <summary>
 /// 更改是否新产品信息
 /// </summary>
 /// <param name="obj">带入参数</param>
 /// <returns></returns>
 public int Update_NewProductTableData(NewProduct_Table obj)
 {
     return(relevanceClass.Update_NewProductTableData(obj));
 }
 /// <summary>
 /// 添加是否新产品信息
 /// </summary>
 /// <param name="obj">带入参数</param>
 /// <returns></returns>
 public int Insert_NewProductTableData(NewProduct_Table obj)
 {
     return(relevanceClass.Insert_NewProductTableData(obj));
 }