예제 #1
0
        public async Task <ActionResult <SystemPOS> > GetSystemPOSById(string id)
        {
            var response = await _systemPOSService.GetSystemPOSByID(id);

            if (response.Data == null)
            {
                return(NotFound());
            }
            else
            {
                return(Ok(response));
            }
        }
예제 #2
0
        /*
         * 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"));
        }
예제 #3
0
        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());
        }