Beispiel #1
0
        public ActionResult Add(IPSAddModel model)
        {
            _ipsService.Add(model, Customer.OriginalCustomer);

            return(RedirectToAction("index")
                   .AndAlert(AlertType.Success, "Success.", "IPS Entry added successfully."));
        }
Beispiel #2
0
        public void Add(IPSAddModel model, Customer customer)
        {
            var entry = new IPSEntry(
                customer,
                model.Name,
                IPAddress.Parse(model.StartIPAddress),
                IPAddress.Parse(model.EndIPAddress));

            _ipsRepository.Add(entry);
            _unitOfWork.Commit();
        }