protected async System.Threading.Tasks.Task Grid0RowSelect(BlazorCrmWasm.Models.Crm.TaskType args) { var dialogResult = await DialogService.OpenAsync <EditTaskType>("Edit Task Type", new Dictionary <string, object>() { { "Id", args.Id } }); grid0.Reload(); await InvokeAsync(() => { StateHasChanged(); }); }
protected async System.Threading.Tasks.Task Form0Submit(BlazorCrmWasm.Models.Crm.TaskType args) { try { var crmCreateTaskTypeResult = await Crm.CreateTaskType(taskType : tasktype); DialogService.Close(tasktype); } catch (System.Exception crmCreateTaskTypeException) { NotificationService.Notify(NotificationSeverity.Error, $"Error", $"Unable to create new TaskType!"); } }
protected async System.Threading.Tasks.Task Load() { tasktype = new BlazorCrmWasm.Models.Crm.TaskType() { }; }
protected async System.Threading.Tasks.Task Load() { var crmGetTaskTypeByIdResult = await Crm.GetTaskTypeById(id : Id); tasktype = crmGetTaskTypeByIdResult; }
public async System.Threading.Tasks.Task <HttpResponseMessage> UpdateTaskType(int?id = default(int?), Models.Crm.TaskType taskType = default(Models.Crm.TaskType)) { var uri = new Uri(baseUri, $"TaskTypes({id})"); var httpRequestMessage = new HttpRequestMessage(HttpMethod.Patch, uri); httpRequestMessage.Content = new StringContent(ODataJsonSerializer.Serialize(taskType), Encoding.UTF8, "application/json"); OnUpdateTaskType(httpRequestMessage); return(await httpClient.SendAsync(httpRequestMessage)); }
public async System.Threading.Tasks.Task <Models.Crm.TaskType> CreateTaskType(Models.Crm.TaskType taskType = default(Models.Crm.TaskType)) { var uri = new Uri(baseUri, $"TaskTypes"); var httpRequestMessage = new HttpRequestMessage(HttpMethod.Post, uri); httpRequestMessage.Content = new StringContent(ODataJsonSerializer.Serialize(taskType), Encoding.UTF8, "application/json"); OnCreateTaskType(httpRequestMessage); var response = await httpClient.SendAsync(httpRequestMessage); return(await response.ReadAsync <Models.Crm.TaskType>()); }