Exemplo n.º 1
0
        public BasicResponse DeleteSetting(SettingDeleteRequest settingrequest)
        {
            _Repository.DeleteSetting(settingrequest.Id);
            var settingresponse = new BasicResponse();

            return(settingresponse);
        }
Exemplo n.º 2
0
        public ActionResult SettingDelete(long settingId)
        {
            MT_SETTING deletedSetting = repository.DeleteSetting(settingId);

            if (deletedSetting != null)
            {
                TempData["message"] = string.Format("{0} был удален", deletedSetting.Code);
            }
            return(RedirectToAction("Settings"));
        }
Exemplo n.º 3
0
        public void DeleteSetting(string entityName, int entityId, string settingName)
        {
            var delete = _settingRepository
                         .GetSettings(entityName, entityId)
                         .FirstOrDefault(item => item.SettingName == settingName);

            if (delete != null)
            {
                _settingRepository.DeleteSetting(delete.SettingId);
            }
        }
Exemplo n.º 4
0
        public void Delete(int id)
        {
            Setting setting = _settings.GetSetting(id);

            if (IsAuthorized(setting.EntityName, setting.EntityId, "Edit"))
            {
                _settings.DeleteSetting(id);
                _logger.Log(LogLevel.Information, this, LogFunction.Delete, "Setting Deleted {Setting}", setting);
            }
            else
            {
                _logger.Log(LogLevel.Error, this, LogFunction.Delete, "User Not Authorized To Delete Setting {Setting}", setting);
                HttpContext.Response.StatusCode = 401;
            }
        }
Exemplo n.º 5
0
        public void Delete(int id)
        {
            Setting setting = _settings.GetSetting(id);

            if (IsAuthorized(setting.EntityName, setting.EntityId, PermissionNames.Edit))
            {
                _settings.DeleteSetting(id);
                AddSyncEvent(setting.EntityName);
                _logger.Log(LogLevel.Information, this, LogFunction.Delete, "Setting Deleted {Setting}", setting);
            }
            else
            {
                _logger.Log(LogLevel.Error, this, LogFunction.Delete, "User Not Authorized To Delete Setting {Setting}", setting);
                HttpContext.Response.StatusCode = (int)HttpStatusCode.Forbidden;
            }
        }
Exemplo n.º 6
0
        public void Delete(int id)
        {
            Setting setting = _settings.GetSetting(id);

            if (IsAuthorized(setting.EntityName, setting.EntityId, PermissionNames.Edit))
            {
                _settings.DeleteSetting(id);
                if (setting.EntityName == EntityNames.Module)
                {
                    _syncManager.AddSyncEvent(_alias.TenantId, EntityNames.Site, _alias.SiteId);
                }
                _logger.Log(LogLevel.Information, this, LogFunction.Delete, "Setting Deleted {Setting}", setting);
            }
            else
            {
                _logger.Log(LogLevel.Error, this, LogFunction.Delete, "User Not Authorized To Delete Setting {Setting}", setting);
                HttpContext.Response.StatusCode = 401;
            }
        }
Exemplo n.º 7
0
 public void Delete(int id)
 {
     Settings.DeleteSetting(id);
 }
Exemplo n.º 8
0
 public void Delete(int id)
 {
     Settings.DeleteSetting(id);
     logger.Log(LogLevel.Information, this, LogFunction.Delete, "Setting Deleted {SettingId}", id);
 }