Esempio n. 1
0
        /// <summary>
        /// 获得预订的属性以及值
        /// </summary>
        /// <returns></returns>
        private List <Model.wx_book_productAttr_value> AddAttr()
        {
            List <Model.wx_book_productAttr_value> attrvlist = new List <Model.wx_book_productAttr_value>();

            string attrStr = hidAttrValueStr.Value;

            if (attrStr == null || attrStr.Trim() == "")
            {
                return(null);
            }
            string[] attrStrArr = Utils.SplitString(attrStr, "||");
            string[] tmpattrValue;
            Model.wx_book_productAttr_value attrEntity = new Model.wx_book_productAttr_value();
            foreach (string attr in attrStrArr)
            {
                if (attr.Length <= 0)
                {
                    continue;
                }
                tmpattrValue = Utils.SplitString(attr, "_");
                if (tmpattrValue != null && tmpattrValue.Length > 0)
                {
                    attrEntity             = new Model.wx_book_productAttr_value();
                    attrEntity.attributeId = MyCommFun.Str2Int(tmpattrValue[1]);
                    attrEntity.paValue     = MyCommFun.ObjToStr(tmpattrValue[3]);
                    attrvlist.Add(attrEntity);
                }
            }

            return(attrvlist);
        }