Beispiel #1
0
        public async Task <ActionResult <IssuModel> > Put(int id, [FromBody] IssuModel issu)
        {
            var lxRslt = await IssuBO.Update(id, issu);

            if (lxRslt.Err != null)
            {
                return(BadRequest(lxRslt));
            }

            return(CreatedAtAction(nameof(Get), new { id = issu.IssuId }, issu));
        }
Beispiel #2
0
        public async Task <IActionResult> OnPost(int id)
        {
            var lxRslt = await IssuBO.Update(id, Issu);

            if (lxRslt.EsVld == false)
            {
                TempData["ExErr"] = lxRslt.Err;

                var lxRsltLbl = await IssuBO.GetAllLbl();

                if (lxRsltLbl.EsVld == false)
                {
                    TempData["ExErr"] = lxRsltLbl.Err;
                    return(RedirectToPage("./Index"));
                }
                LstLbl = lxRsltLbl.Lst;

                return(Page());
            }

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