示例#1
0
        public async Task <IActionResult> OnPostAsync()
        {
            try
            {
                var t = Task.Run(() =>
                {
                    var atsebrae = _appServiceAtendimento.GetById(Input.Id);

                    var sebrae = new RaeSebrae()
                    {
                        Id = new Guid(), RAE = Input.Sebrae.RAE
                    };

                    atsebrae.Sebrae = sebrae;

                    _appServiceAtendimento.Update(atsebrae);
                });

                await t;
                return(RedirectToPage("./Index"));
            }
            catch (Exception ex)
            {
                StatusMessage = "Erro: " + ex.Message;
                return(Page());
            }
        }
示例#2
0
        public async Task <IActionResult> OnPostAsync()
        {
            try
            {
                var t = Task.Run(() =>
                {
                    var atold = _appServiceAtendimento.GetById(Input.Id);

                    var sebrae = new RaeSebrae()
                    {
                        Id = new Guid(), RAE = Input.Sebrae.RAE
                    };

                    atold.DataF            = DateTime.Now;
                    atold.Setor            = Input.Setor;
                    atold.Canal            = Input.Canal;
                    atold.Servicos         = Input.Servicos;
                    atold.Descricao        = MotivoCancelamento;
                    atold.Status           = "Cancelado";
                    atold.Ultima_Alteracao = DateTime.Now;
                    atold.Sebrae           = sebrae;
                    _appServiceAtendimento.Update(atold);
                });

                await t;

                return(RedirectToPage("./Consulta.Cancelados"));



                //return Page();
            }
            catch (Exception ex)
            {
                StatusMessage = "Erro: " + ex.Message;
                return(Page());
            }
        }