public IActionResult AddPOIType() { var modal = new AddPOITypeView(); modal.Type = new PoiType(); modal.Type.Marker = ""; return(View(modal)); }
public async Task <IActionResult> AddPOIType() { var modal = new AddPOITypeView(); modal.Type = new PoiType(); modal.Type.Marker = ""; modal.Type.Image = ""; return(View(modal)); }
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)); }
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)); }