// 删除 protected void GroupGrid_DeleteCommand(object source, GridCommandEventArgs e) { var editedItem = e.Item as GridEditableItem; if (editedItem != null) { int groupId = Convert.ToInt32(editedItem.GetDataKeyValue("GroupId").ToString()); try { var attrWordsList = _goodsAttributeGroupSao.GetAttrWordsListByGroupId(groupId).Where(p => !string.IsNullOrEmpty(p.AttrWordImage)); if (attrWordsList.Any()) { RAM.Alert("该“属性组”已有“属性词”上传图片,不允许删除!"); return; } string errorMessage; var result = _goodsAttributeGroupSao.DeleteAttrGroup(groupId, out errorMessage); if (result) { ////记录工作日志 //var pinfo = CurrentSession.Personnel.Get(); //var type = HRS.Enum.OperationTypePoint.OperationLogTypeEnum.CommodityAttributeGrouping.GetBusinessInfo(); //var point = HRS.Enum.OperationTypePoint.CommodityAttributeGroupingState.Delete.GetBusinessInfo(); //var logInfo = new HRS.Model.OperationLogInfo //{ // LogId = Guid.NewGuid(), // PersonnelId = pinfo.PersonnelId, // RealName = pinfo.RealName, // TypeId = new Guid(type.Key), // PointId = new Guid(point.Key), // OperateTime = DateTime.Now, // Description = type.Value + "--" + point.Value, // IdentifyKey = Convert.ToString(groupId) //}; //OperationLogManager.InsertOperationLog(logInfo); } else { RAM.Alert("商品属性组删除无效!" + errorMessage); } } catch { RAM.Alert("商品属性组删除失败!"); } } GroupGrid.Rebind(); }