示例#1
0
        public ActionResult Delete(int id)
        {
            bool   success = true;
            string message = string.Empty;

            if (ModelState.IsValid)
            {
                DataPurge entity = _dataPurgeService.GetDataPurgeById(id);
                if (entity != null)
                {
                    try
                    {
                        _dataPurgeService.Delete(entity);
                        //SuccessNotification(_resourceManager.GetString("DataPurge.SuccessToDeletePurge"));
                    }
                    catch (Exception ex)
                    {
                        //ErrorNotification(_resourceManager.GetString("DataPurge.FailedToDeletePurge"), ex);
                        success = false;
                        message = _resourceManager.GetString("DataPurge.FailedToDeletePurge");
                        _logger.WriteLog("Failed to delete data purge with id=" + id, ex);
                    }
                }
            }
            return(Json(new { success, message }));
        }
示例#2
0
 public void Update(DataPurge entity)
 {
     _dataPurgeRepository.Update(entity);
 }
示例#3
0
 public void Insert(DataPurge entity)
 {
     _dataPurgeRepository.Insert(entity);
 }
示例#4
0
 public void Delete(DataPurge entity)
 {
     _dataPurgeRepository.Delete(entity);
 }