/// <summary> /// Deletes a pickup point /// </summary> /// <param name="model">Pickup point</param> public virtual void Delete(FaraBotConfig model) { if (model == null) { throw new ArgumentNullException(nameof(model)); } _ModelRepository.Delete(model); _cacheManager.RemoveByPattern(model_POINT_PATTERN_KEY); }
public IActionResult Get() { var model = _BotConfigService.Get(); if (model == null) { model = new FaraBotConfig(); } return(View("~/Plugins/Faradata.AlarmShopping/Views/Config.cshtml", model)); }
public IActionResult Post(FaraBotConfig model) { try { if (model.Id > 0) { _BotConfigService.Update(model); } else { _BotConfigService.Insert(model); } TempData["message"] = "تغییرات با موفقیت ذخیره شد."; } catch (Exception ee) { TempData["message"] = "خطا در زمان ذخیره تغییرات."; } var modelOut = _BotConfigService.Get(); return(View("~/Plugins/Faradata.AlarmShopping/Views/Config.cshtml", modelOut)); }