protected override async Task OnInitAsync() { this.Title = "Types de client"; await LoadCustomerTypes(); await JavascriptFunctions.InitTable("customerTypeTable"); }
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"); }
protected async Task DeleteCustomer(int customerId) { await CustomerService.DeleteCustomer(customerId); await JavascriptFunctions.ShowAlert("Suppression effectuée"); await LoadCustomers(); }
protected async Task DeleteCustomerType(int customerTypeId) { await AdministrationService.DeleteCustomerType(customerTypeId); await JavascriptFunctions.ShowAlert("Suppression effectuée"); await LoadCustomerTypes(); }
// protected int CustomerTypeId { get; set; } #endregion #region Initialisation protected override async Task OnInitAsync() { this.Title = "Clients"; this.CustomerTypes = SelectListItems.Convert(await AdministrationService.GetCustomerTypes(), (src, dest) => { dest.Id = src.Id; dest.Text = src.Text; }); await LoadCustomers(); await JavascriptFunctions.InitTable("customerTable"); }
protected async Task CheckAndSave() { IList <string> errors = CheckRequiredFields(); if (errors.Count > 0) { await JavascriptFunctions.ShowAlert(string.Join("\r\n", errors)); } else { await Save(); } return; }
public static void ClassInitialize(TestContext context) { ResourceExplorer = new ResourceExplorer(); ResourceExplorer.LoadProject(Path.Combine(GetProjectPath(), "Iciclecreek.AdaptiveExpressions.Tests.csproj")); JavascriptFunctions.AddJavascriptFunctions(ResourceExplorer); }