/// <summary> /// 增加标签 /// </summary> /// <param name="model"></param> public static void AddLabel(LabelModel model) { // var labelInfo = AutoMapper.Mapper.Map<Entities.LabelInfo>(model); var labelInfo = model.Map <Entities.LabelInfo>(); _iMemberLabelService.AddLabel(labelInfo); }
public JsonResult Label(LabelModel model) { LabelInfo labelmodel = new LabelInfo() { Id = model.Id, LabelName = model.LabelName }; if (MemberLabelApplication.CheckNameIsExist(model.LabelName)) { throw new HimallException("标签已经存在,不能重复!"); } if (labelmodel.Id > 0) { _iMemberLabelService.UpdateLabel(labelmodel); } else { _iMemberLabelService.AddLabel(labelmodel); } return(Json(new { Success = true })); }
/// <summary> /// 增加标签 /// </summary> /// <param name="model"></param> public static void AddLabel(LabelModel model) { var labelInfo = AutoMapper.Mapper.Map <Model.LabelInfo>(model); _iMemberLabelService.AddLabel(labelInfo); }