Esempio n. 1
0
        /// <summary>
        /// 更新
        /// </summary>
        /// <param name="info"></param>
        public GroupBuyingInfo Update(GroupBuyingInfo info)
        {
            // 验证团购信息
            ValidateEntity(info);

            var ts = new TransactionScope();

            using (ts)
            {
                // 更新团购信息
                m_GroupBuyingDA.Update(info);

                //先删除该团购的阶梯价格
                m_GroupBuyingDA.DeleteProductGroupBuyingPrice(info.SysNo);
                // 创建价格信息
                m_GroupBuyingDA.CreateProductGroupBuyingPrice(info.SysNo, 1, info.GroupBuyPrice, 0, 0);

                ts.Complete();
            }

            return(info);
        }