Ejemplo n.º 1
0
        public IActionResult AddPOIType()
        {
            var modal = new AddPOITypeView();

            modal.Type        = new PoiType();
            modal.Type.Marker = "";

            return(View(modal));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> AddPOIType()
        {
            var modal = new AddPOITypeView();

            modal.Type        = new PoiType();
            modal.Type.Marker = "";
            modal.Type.Image  = "";

            return(View(modal));
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> AddPOIType(AddPOITypeView modal, CancellationToken cancellationToken)
        {
            modal.Type.DepartmentId = DepartmentId;
            modal.Type.Marker       = modal.MarkerType;

            if (ModelState.IsValid)
            {
                await _mappingService.SavePOITypeAsync(modal.Type, cancellationToken);

                return(RedirectToAction("POIs"));
            }

            return(View(modal));
        }
Ejemplo n.º 4
0
        public IActionResult AddPOIType(AddPOITypeView modal)
        {
            modal.Type.DepartmentId = DepartmentId;
            modal.Type.Marker       = modal.MarkerType;

            if (ModelState.IsValid)
            {
                _mappingService.SavePOIType(modal.Type);

                return(RedirectToAction("POIs"));
            }

            return(View(modal));
        }