protected override async Task Save() { IList <string> errors = CheckRequiredFields(); if (errors.Count > 0) { await JavascriptFunctions.ShowAlert(errors[0]); } CustomerType customerType = null; if (IsNew()) { customerType = new CustomerType(); } else { customerType = await AdministrationService.GetCustomerType(Id.Value); } customerType.Text = this.Text; await AdministrationService.SaveCustomerType(customerType); UriHelper.NavigateTo("/Administration/CustomerType"); }