public async Task <ActionResult <SystemPOS> > GetSystemPOSById(string id) { var response = await _systemPOSService.GetSystemPOSByID(id); if (response.Data == null) { return(NotFound()); } else { return(Ok(response)); } }
/* * public async Task OnGetAsync(string searchString) * { * var response = await _terminalservice.GetTerminals(); * var terminals = from m in response.Data select m; * * if (!String.IsNullOrEmpty(searchString)) * { * terminals = terminals.Where(s => s.TerminalID.Contains(searchString)); * } * * * Terminals = terminals.ToList(); * * } */ public async Task <IActionResult> OnPostDeleteAsync(GetSystemPOSDto sys) { var _sys = await _systemposservice.GetSystemPOSByID(sys.TerminalID); if (_sys.Data != null) { await _systemposservice.DeleteSystemPOS(_sys.Data.TerminalID); } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnGetAsync(string Terminalid) { if (Terminalid == null) { return(NotFound()); } var sys = await _systemposservice.GetSystemPOSByID(Terminalid); SystemPosS = sys.Data; if (SystemPosS == null) { return(NotFound()); } return(Page()); }