public async Task <ActionResult> UpdateSystemPOS([FromBody] AddSystemPOSDto updateSystempos)
        {
            var response = await _systemPOSService.GetSystemPOSByID(updateSystempos.TerminalID);

            if (response.Data == null)
            {
                return(NotFound());
            }
            else
            {
                return(Ok(await _systemPOSService.UpdateSystemPOS(updateSystempos)));
            }
        }
Esempio n. 2
0
        public async Task <IActionResult> OnPostAsync()
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }

            try
            {
                AddSystemPOSDto sys = new AddSystemPOSDto();
                sys.TerminalID        = SystemPosS.TerminalID;
                sys.TerminalChecksum  = SystemPosS.TerminalChecksum;
                sys.ControlGroup      = SystemPosS.ControlGroup;
                sys.ControlCheckSum   = SystemPosS.ControlCheckSum;
                sys.ParameterGroup    = SystemPosS.ParameterGroup;
                sys.ParameterReload   = SystemPosS.ParameterReload;
                sys.ParameterVersion  = SystemPosS.ParameterVersion;
                sys.ProgramID         = SystemPosS.ProgramID;
                sys.ProgramReload     = SystemPosS.ProgramReload;
                sys.ProgramVersion    = SystemPosS.ProgramVersion;
                sys.Paquete           = SystemPosS.Paquete;
                sys.ConnectGroup      = SystemPosS.ConnectGroup;
                sys.ParmConnChecksum  = SystemPosS.ParmConnChecksum;
                sys.TranConnChecksum1 = SystemPosS.TranConnChecksum1;
                sys.TranConnChecksum2 = SystemPosS.TranConnChecksum2;


                await _systemposservice.UpdateSystemPOS(sys);
            }
            catch (DbUpdateConcurrencyException)
            {
                throw;
            }

            return(RedirectToPage("./Index"));
        }