예제 #1
0
        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(); });
        }
예제 #2
0
        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!");
            }
        }
예제 #3
0
 protected async System.Threading.Tasks.Task Load()
 {
     tasktype = new BlazorCrmWasm.Models.Crm.TaskType()
     {
     };
 }
예제 #4
0
        protected async System.Threading.Tasks.Task Load()
        {
            var crmGetTaskTypeByIdResult = await Crm.GetTaskTypeById(id : Id);

            tasktype = crmGetTaskTypeByIdResult;
        }
예제 #5
0
        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));
        }
예제 #6
0
        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>());
        }