public virtual async Task UpdateUrlCurrentConditionModel(CustomerActionConditionModel.AddUrlConditionModel model)
        {
            var customerAction = await _customerActionService.GetCustomerActionById(model.CustomerActionId);

            if (customerAction != null)
            {
                var condition = customerAction.Conditions.FirstOrDefault(x => x.Id == model.ConditionId);
                if (condition != null)
                {
                    var _url = condition.UrlCurrent.FirstOrDefault(x => x.Id == model.Id);
                    _url.Name = model.Name;
                    await _customerActionService.UpdateCustomerAction(customerAction);
                }
            }
        }
        public virtual void UpdateUrlConditionModel(CustomerActionConditionModel.AddUrlConditionModel model)
        {
            var customerAction = _customerActionService.GetCustomerActionById(model.CustomerActionId);

            if (customerAction != null)
            {
                var condition = customerAction.Conditions.FirstOrDefault(x => x.Id == model.ConditionId);
                if (condition != null)
                {
                    var _url = condition.UrlReferrer.FirstOrDefault(x => x.Id == model.Id);
                    _url.Name = model.Name;
                    _customerActionService.UpdateCustomerAction(customerAction);
                }
            }
        }
        public virtual async Task InsertUrlConditionModel(CustomerActionConditionModel.AddUrlConditionModel model)
        {
            var customerAction = await _customerActionService.GetCustomerActionById(model.CustomerActionId);

            if (customerAction != null)
            {
                var condition = customerAction.Conditions.FirstOrDefault(x => x.Id == model.ConditionId);
                if (condition != null)
                {
                    var _url = new CustomerAction.ActionCondition.Url()
                    {
                        Name = model.Name
                    };
                    condition.UrlReferrer.Add(_url);
                    await _customerActionService.UpdateCustomerAction(customerAction);
                }
            }
        }
        public virtual void InsertUrlCurrentConditionModel(CustomerActionConditionModel.AddUrlConditionModel model)
        {
            var customerAction = _customerActionService.GetCustomerActionById(model.CustomerActionId);

            if (customerAction != null)
            {
                var condition = customerAction.Conditions.FirstOrDefault(x => x.Id == model.ConditionId);
                if (condition != null)
                {
                    var _url = new CustomerAction.ActionCondition.Url()
                    {
                        Name = model.Name
                    };
                    condition.UrlCurrent.Add(_url);
                    _customerActionService.UpdateCustomerAction(customerAction);
                }
            }
        }
 public async Task<IActionResult> ConditionUrlCurrentUpdate(CustomerActionConditionModel.AddUrlConditionModel model)
 {
     await _customerActionViewModelService.UpdateUrlCurrentConditionModel(model);
     return new NullJsonResult();
 }
 public async Task<IActionResult> ConditionUrlReferrerInsert(CustomerActionConditionModel.AddUrlConditionModel model)
 {
     await _customerActionViewModelService.InsertUrlConditionModel(model);
     return new NullJsonResult();
 }
Пример #7
0
 public IActionResult ConditionUrlCurrentUpdate(CustomerActionConditionModel.AddUrlConditionModel model)
 {
     _customerActionViewModelService.UpdateUrlCurrentConditionModel(model);
     return(new NullJsonResult());
 }
Пример #8
0
 public IActionResult ConditionUrlReferrerInsert(CustomerActionConditionModel.AddUrlConditionModel model)
 {
     _customerActionViewModelService.InsertUrlConditionModel(model);
     return(new NullJsonResult());
 }
        public async Task <IActionResult> ConditionUrlCurrentInsert(CustomerActionConditionModel.AddUrlConditionModel model)
        {
            await _customerActionViewModelService.InsertUrlCurrentConditionModel(model);

            return(new JsonResult(""));
        }
        public async Task <IActionResult> ConditionUrlReferrerUpdate(CustomerActionConditionModel.AddUrlConditionModel model)
        {
            await _customerActionViewModelService.UpdateUrlConditionModel(model);

            return(new JsonResult(""));
        }