/// <summary> /// Publish /// </summary> /// <param name="model">User model</param> /// <returns>ResponseStatusCodeHelper</returns> public ResponseStatusCodeHelper Publish(UserModel model) { try { using (var _context = new TDHEntities()) { ObjectParameter _status = new ObjectParameter("STATUS", typeof(int)); int _result = _context.PROC_SYS_USER_Publish(model.ID, model.Locked, this.SessionID, model.UpdateBy, _status); if (_status.Value.ToString() == "0") { throw new DataAccessException(FILE_NAME, MethodInfo.GetCurrentMethod().Name, model.CreateBy); } } } catch (DataAccessException fieldEx) { throw fieldEx; } catch (Exception ex) { throw new ServiceException(FILE_NAME, MethodInfo.GetCurrentMethod().Name, model.CreateBy, ex); } Notifier.Notification(model.CreateBy, Message.UpdateSuccess, Notifier.TYPE.Success); return(ResponseStatusCodeHelper.Success); }