public async Task AddNewInstallerAsync(CreateInstallerRequest InstallerRequest) { CreateInstallerRequest newInstaller = new CreateInstallerRequest { FirstName = InstallerRequest.FirstName, LastName = InstallerRequest.LastName, Area = 0, PhoneNumber = InstallerRequest.PhoneNumber, RetailerId = RetailerId, SquareYardPrice = InstallerRequest.SquareYardPrice }; await InstallerService.AddNewInstallerAsync(newInstaller); await ModalInstance.CloseAsync(); }
protected override void OnInitialized() { Installer = new CreateInstallerRequest(); }
public async Task AddNewInstallerAsync(CreateInstallerRequest InstallerRequest) { var InstallerRequestJson = new StringContent(JsonSerializer.Serialize(InstallerRequest), Encoding.UTF8, "application/json"); await HttpClient.PostAsync($"installers", InstallerRequestJson); }