/// <summary> /// 添加属性内容 /// </summary> /// <param name="procontent">属性内容对象</param> /// <returns>成功或失败</returns> public bool AddPoContent(PropertyContent procontent) { string Sql = "insert PropertyContent(PropertyID,PropertyContentName) values('" + procontent.PropertyID + "',N'" + procontent.PropertyContentName + "')"; if (SqlHelper.ExecuteNonQuery(Sql) > 0) { return(true); } else { return(false); } }
/// <summary> /// 属性和属性内容关系是否重复 /// </summary> /// <param name="procontent">属性内容对象</param> /// <returns>是或否</returns> public static bool PcIsRepeat(PropertyContent procontent) { string Sql = "select PropertyID from PropertyContent where PropertyContentName=N'" + procontent.PropertyContentName + "'and PropertyID='" + procontent.PropertyID + "'"; Object obj = SqlHelper.ReadSclar(Sql); if (obj == null) { return(true); } else { return(false); } }
/// <summary> /// 属性ID获取属性内容名字 /// </summary> /// <param name="procontent">属性内容对象</param> /// <returns>含有属性名字的表</returns> public static List <PropertyContent> PoIDGetPcName(PropertyContent procontent) { string Sql = "select PropertyContentName from PropertyContent where PropertyID='" + procontent.PropertyID + "'"; List <PropertyContent> procontentlist = new List <PropertyContent>(); SqlHelper.ReadDateReadBegin(Sql); while (SqlHelper.SqlReader.Read()) { PropertyContent Temp = new PropertyContent(); Temp.PropertyContentName = SqlHelper.SqlReader["PropertyContentName"].ToString(); procontentlist.Add(Temp); } SqlHelper.ReadDateReadEnd(); return(procontentlist); }