示例#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>());
        }