public GroupBuyingCategoryInfo UpdateGroupBuyingCategory(GroupBuyingCategoryInfo entity) { DataCommand command = DataCommandManager.GetDataCommand("UpdateGroupBuyingCategory"); command.SetParameterValue(entity); command.ExecuteNonQuery(); return(GetGroupBuyingCategoryBySysNo(entity.SysNo.Value)); }
public GroupBuyingCategoryInfo UpdateGroupBuyingCategory(GroupBuyingCategoryInfo entity) { if ((entity.SysNo ?? 0) == 0) { throw new ArgumentException("entity.SysNo"); } PreCheck(entity); return(m_GroupBuyingDA.UpdateGroupBuyingCategory(entity)); }
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)); }
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)); } }
public GroupBuyingCategoryInfo UpdateGroupBuyingCategory(GroupBuyingCategoryInfo info) { return(ObjectFactory <GroupBuyingAppService> .Instance.UpdateGroupBuyingCategory(info)); }
public GroupBuyingCategoryInfo UpdateGroupBuyingCategory(GroupBuyingCategoryInfo entity) { return(ObjectFactory <GroupBuyingProcessor> .Instance.UpdateGroupBuyingCategory(entity)); }
public GroupBuyingCategoryInfo CreateGroupBuyingCategory(GroupBuyingCategoryInfo entity) { PreCheck(entity); return(m_GroupBuyingDA.CreateGroupBuyingCategory(entity)); }