Пример #1
0
        public ActionResult SendRemove(PackageTransitSendViewModel model)
        {
            var employeeService = GetEmployeeService();

            model.DistributionCentres = employeeService.GetAllDistributionCentres();

            var    operations  = new SendSelectedBarCodesOperations();
            string buttonValue = HttpContext.Request["action"];

            operations.Remove(model, buttonValue);

            return(View("Send", model));
        }
Пример #2
0
        public ActionResult SendAdd(PackageTransitSendViewModel model)
        {
            var employeeService = GetEmployeeService();

            model.DistributionCentres = employeeService.GetAllDistributionCentres();

            var operations = new SendSelectedBarCodesOperations();

            var result = operations.Add(model);

            if (!result.Succeeded)
            {
                ModelState.AddModelError("", result.ErrorMessage);
            }

            return(View("Send", model));
        }