public async Task <ActionResult> DeleteStaff(DeleteStaffDialogViewModel vm)
        {
            if (string.IsNullOrEmpty(vm.Id))
            {
                return(this.JsonFailResult(Phrases.FieldShouldNotBeEmpty, "#frmDeleteStaff"));
            }
            await _payInvoiceClient.DeleteEmployeeAsync(vm.Id);

            return(this.JsonRequestResult("#StaffsPage", Url.Action("StaffsPage"), vm.MerchantId));
        }
        public async Task <ActionResult> DeleteStaffDialog(string merchant, string id)
        {
            var employee = await _payInvoiceClient.GetEmployeeAsync(id);

            var viewModel = new DeleteStaffDialogViewModel
            {
                Caption    = "Delete employee",
                Name       = string.Format("{0} {1}", employee.FirstName, employee.LastName),
                Id         = id,
                MerchantId = merchant
            };

            return(View(viewModel));
        }