示例#1
0
        public GroupBuyingCategoryInfo UpdateGroupBuyingCategory(GroupBuyingCategoryInfo entity)
        {
            DataCommand command = DataCommandManager.GetDataCommand("UpdateGroupBuyingCategory");

            command.SetParameterValue(entity);

            command.ExecuteNonQuery();

            return(GetGroupBuyingCategoryBySysNo(entity.SysNo.Value));
        }
示例#2
0
        public GroupBuyingCategoryInfo UpdateGroupBuyingCategory(GroupBuyingCategoryInfo entity)
        {
            if ((entity.SysNo ?? 0) == 0)
            {
                throw new ArgumentException("entity.SysNo");
            }
            PreCheck(entity);

            return(m_GroupBuyingDA.UpdateGroupBuyingCategory(entity));
        }
示例#3
0
        public GroupBuyingCategoryInfo CreateGroupBuyingCategory(GroupBuyingCategoryInfo entity)
        {
            DataCommand command = DataCommandManager.GetDataCommand("CreateGroupBuyingCategory");

            command.SetParameterValue(entity);

            command.ExecuteNonQuery();
            entity.SysNo = Convert.ToInt32(command.GetParameterValue("@SysNo"));

            return(GetGroupBuyingCategoryBySysNo(entity.SysNo.Value));
        }
示例#4
0
 private void PreCheck(GroupBuyingCategoryInfo entity)
 {
     if (string.IsNullOrEmpty(entity.Name))
     {
         //throw new BizException("类别名称不能为空!");
         throw new BizException(ResouceManager.GetMessageString("MKT.Promotion.GroupBuying", "GroupBuying_CategoryNameIsNotNull"));
     }
     if (m_GroupBuyingDA.CheckGroupBuyingCategoryNameExists(entity.Name, entity.SysNo ?? 0, entity.CategoryType.Value))
     {
         //throw new BizException(string.Format("类别[{0}]已经存在!", entity.Name));
         throw new BizException(string.Format(ResouceManager.GetMessageString("MKT.Promotion.GroupBuying", "GroupBuying_AlreadyExsitCategory"), entity.Name));
     }
 }
示例#5
0
 public GroupBuyingCategoryInfo UpdateGroupBuyingCategory(GroupBuyingCategoryInfo info)
 {
     return(ObjectFactory <GroupBuyingAppService> .Instance.UpdateGroupBuyingCategory(info));
 }
示例#6
0
 public GroupBuyingCategoryInfo UpdateGroupBuyingCategory(GroupBuyingCategoryInfo entity)
 {
     return(ObjectFactory <GroupBuyingProcessor> .Instance.UpdateGroupBuyingCategory(entity));
 }
示例#7
0
        public GroupBuyingCategoryInfo CreateGroupBuyingCategory(GroupBuyingCategoryInfo entity)
        {
            PreCheck(entity);

            return(m_GroupBuyingDA.CreateGroupBuyingCategory(entity));
        }