Example #1
0
        /// <summary>
        /// 添加属性值
        /// </summary>
        /// <param name="valueName">值</param>
        /// <param name="attrID">属性ID</param>
        /// <returns></returns>
        public string AddAttrValue(string valueName, string attrID, string operateid, string clientid)
        {
            var valueID = Guid.NewGuid().ToString();
            var dal     = new ProductsDAL();

            if (dal.AddAttrValue(valueID, valueName, attrID, operateid, clientid))
            {
                return(valueID.ToString());
            }
            return(string.Empty);
        }
Example #2
0
        public string AddAttrValue(string valueName, string attrID, string operateid, string clientid)
        {
            var valueID = Guid.NewGuid().ToString().ToLower();
            var dal     = new ProductsDAL();

            if (dal.AddAttrValue(valueID, valueName, attrID, operateid, clientid))
            {
                var model = GetProductAttrByID(attrID, clientid);
                model.AttrValues.Add(new AttrValue()
                {
                    ValueID    = valueID,
                    ValueName  = valueName,
                    Status     = 1,
                    AttrID     = attrID,
                    ClientID   = clientid,
                    CreateTime = DateTime.Now
                });

                return(valueID);
            }
            return(string.Empty);
        }