Beispiel #1
0
 /// <summary>
 /// Delete
 /// </summary>
 /// <param name="model">Role Model</param>
 /// <returns>ResponseStatusCodeHelper</returns>
 public ResponseStatusCodeHelper Delete(RoleModel model)
 {
     try
     {
         using (var _context = new TDHEntities())
         {
             ObjectParameter _status = new ObjectParameter("STATUS", typeof(int));
             var             _return = _context.PROC_SYS_ROLE_Delete(model.ID, this.SessionID, model.DeleteBy, _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.DeleteSuccess, Notifier.TYPE.Success);
     return(ResponseStatusCodeHelper.Success);
 }