Esempio n. 1
0
 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;
 }
Esempio n. 2
0
 /// <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;
 }