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

            await OnEmployeeDeleted.InvokeAsync(Employee.EmployeeId);

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

                await OnEmployeeDeleted.InvokeAsync(Employee.Id);
            }
        }
示例#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);
            }
        }
示例#6
0
        protected async Task ConfirmDelete_Click(bool deleteConfirmed)
        {
            if (deleteConfirmed)
            {
                await EmployeeService.Delete(Employee.EmployeeId);

                //NavigationManager.NavigateTo("/", true);
                await OnEmployeeDeleted.InvokeAsync(Employee.EmployeeId);
            }
        }
示例#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("/");
            }
        }
示例#10
0
        protected async Task Delete_Click()
        {
            await EmployeeService.DeleteEmployee(Employee.EmployeeId);

            await OnEmployeeDeleted.InvokeAsync(Employee.EmployeeId);
        }