Esempio n. 1
0
        public GroupBuyingCategoryInfo UpdateGroupBuyingCategory(GroupBuyingCategoryInfo entity)
        {
            DataCommand command = DataCommandManager.GetDataCommand("UpdateGroupBuyingCategory");

            command.SetParameterValue(entity);

            command.ExecuteNonQuery();

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

            return(m_GroupBuyingDA.UpdateGroupBuyingCategory(entity));
        }
Esempio n. 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));
        }
Esempio n. 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));
     }
 }
Esempio n. 5
0
 public GroupBuyingCategoryInfo UpdateGroupBuyingCategory(GroupBuyingCategoryInfo info)
 {
     return(ObjectFactory <GroupBuyingAppService> .Instance.UpdateGroupBuyingCategory(info));
 }
Esempio n. 6
0
 public GroupBuyingCategoryInfo UpdateGroupBuyingCategory(GroupBuyingCategoryInfo entity)
 {
     return(ObjectFactory <GroupBuyingProcessor> .Instance.UpdateGroupBuyingCategory(entity));
 }
Esempio n. 7
0
        public GroupBuyingCategoryInfo CreateGroupBuyingCategory(GroupBuyingCategoryInfo entity)
        {
            PreCheck(entity);

            return(m_GroupBuyingDA.CreateGroupBuyingCategory(entity));
        }