/// <summary> /// 删除操作员 /// </summary> /// <param name="info"></param> /// <returns></returns> /// <exception cref=" "></exception> public CommandResult Delete(Operator info) { if (info.IsAdmin) { return(new CommandResult(ResultCode.Fail, string.Format(Resource1.OperatorBll_CannotDelete, info.ID))); } return(provider.Delete(info)); }
/// <summary> /// 删除操作员 /// </summary> /// <param name="info"></param> /// <returns></returns> /// <exception cref=" "></exception> public CommandResult Delete(OperatorInfo info) { if (!info.CanDelete) { throw new InvalidOperationException(string.Format(Resource1.OperatorBll_CannotDelete, info.OperatorID)); } return(provider.Delete(info)); }