本文整理汇总了C#中CloudSalesDAL.ProductsDAL.AddProductAttr方法的典型用法代码示例。如果您正苦于以下问题:C# ProductsDAL.AddProductAttr方法的具体用法?C# ProductsDAL.AddProductAttr怎么用?C# ProductsDAL.AddProductAttr使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CloudSalesDAL.ProductsDAL
的用法示例。
在下文中一共展示了ProductsDAL.AddProductAttr方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddProductAttr
public string AddProductAttr(string attrName, string description, string categoryID, int type, string operateid, string clientid)
{
var attrID = Guid.NewGuid().ToString().ToLower();
var dal = new ProductsDAL();
if (dal.AddProductAttr(attrID, attrName, description, categoryID, type, operateid, clientid))
{
if (ClientAttrs.ContainsKey(clientid))
{
ClientAttrs[clientid].Add(new ProductAttr()
{
AttrID = attrID,
AttrName = attrName,
Description = description,
CategoryID = categoryID,
ClientID = clientid,
CreateTime = DateTime.Now,
CreateUserID = operateid,
Status = 1,
AttrValues = new List<AttrValue>()
});
}
return attrID;
}
return string.Empty;
}
示例2: AddProductAttr
/// <summary>
/// 添加属性
/// </summary>
/// <param name="attrName">属性名称</param>
/// <param name="description">描述</param>
/// <param name="operateid">操作人</param>
/// <param name="clientid">客户端ID</param>
/// <returns></returns>
public string AddProductAttr(string attrName, string description, string categoryID, int type, string operateid, string clientid)
{
var attrID = Guid.NewGuid().ToString();
var dal = new ProductsDAL();
if (dal.AddProductAttr(attrID, attrName, description, categoryID, type, operateid, clientid))
{
return attrID.ToString();
}
return string.Empty;
}