Exemplo n.º 1
0
 protected async Task ConfirmDelete_Click(bool deleteConfirmed)
 {
     if (deleteConfirmed)
     {
         await employeeService.DeleteEmployee(Employee.EmployeeId);
         await OnEmployeeDeleted.InvokeAsync(Employee.EmployeeId);
     }
 }
Exemplo n.º 2
0
        protected async Task Delete_Click()
        {
            await EmployeeService.DeleteEmployee(Employee.EmployeeId);

            await OnEmployeeDeleted.InvokeAsync(Employee.EmployeeId);

            //NavigationManager.NavigateTo("/", true);
        }
Exemplo n.º 3
0
        protected async Task BtnConfirmDelete_ClickAsync(bool isDeleteConfirmed)
        {
            if (isDeleteConfirmed)
            {
                await EmployeeService.DeleteEmployeeAsync(Employee.Id);

                await OnEmployeeDeleted.InvokeAsync(Employee.Id);
            }
        }
Exemplo n.º 4
0
        protected async Task ConfirmDelete_Click(bool shouldDelete)
        {
            if (shouldDelete)
            {
                await employeeservice.DeleteEmployee(employee.EmployeeId);

                await OnEmployeeDeleted.InvokeAsync(employee.EmployeeId);
            }
        }
        protected async Task ConfirmDelete(bool deleteConfirmed)
        {
            if (deleteConfirmed)
            {
                await EmployeeService.DeleteEmployee(this.EmployeeId);

                await OnEmployeeDeleted.InvokeAsync(this.EmployeeId);
            }
        }
Exemplo n.º 6
0
        protected async Task ConfirmDelete_Click(bool deleteConfirmed)
        {
            if (deleteConfirmed)
            {
                await EmployeeService.Delete(Employee.EmployeeId);

                //NavigationManager.NavigateTo("/", true);
                await OnEmployeeDeleted.InvokeAsync(Employee.EmployeeId);
            }
        }
Exemplo n.º 7
0
        protected async Task ConfirmDelete_Click(bool shouldDelete)
        {
            if (shouldDelete)
            {
                await employeeservice.DeleteEmployee(employee.EmployeeId);

                await OnEmployeeDeleted.InvokeAsync(employee.EmployeeId);

                navigationManager.NavigateTo("/");
            }
        }
        protected async Task ConfirmDelete_Click(bool deleteConfirmed)
        {
            if (deleteConfirmed)
            {
                await EmployeeService.DeleteEmployee(Employee.EmployeeId);

                // Callback para a página mãe fazer o refresh
                await OnEmployeeDeleted.InvokeAsync(Employee.EmployeeId);

                //NavigationManager.NavigateTo("/", true);
            }
        }
        protected async Task ConfirmDelete_Click(bool deleteConfirmed)
        {
            if (deleteConfirmed && Employee.Email != "*****@*****.**")
            {
                Db.Users.Remove(Employee);
                await Db.SaveChangesAsync();

                await OnEmployeeDeleted.InvokeAsync(Employee.Id);
            }
            else
            {
                NavigationManager.NavigateTo("/");
            }
        }
Exemplo n.º 10
0
        protected async Task Delete_Click()
        {
            await EmployeeService.DeleteEmployee(Employee.EmployeeId);

            await OnEmployeeDeleted.InvokeAsync(Employee.EmployeeId);
        }