protected async System.Threading.Tasks.Task Grid0RowSelect(BlazorCrmWasm.Models.Crm.Task args)
        {
            var dialogResult = await DialogService.OpenAsync <EditTask>("Edit Task", new Dictionary <string, object>() { { "Id", args.Id } });

            grid0.Reload();

            await InvokeAsync(() => { StateHasChanged(); });
        }
        protected async System.Threading.Tasks.Task Form0Submit(BlazorCrmWasm.Models.Crm.Task args)
        {
            try
            {
                var crmUpdateTaskResult = await Crm.UpdateTask(id : Id, task : task);

                DialogService.Close(task);
            }
            catch (System.Exception crmUpdateTaskException)
            {
                NotificationService.Notify(NotificationSeverity.Error, $"Error", $"Unable to update Task");
            }
        }
Exemple #3
0
        public async System.Threading.Tasks.Task <Models.Crm.Task> CreateTask(Models.Crm.Task task = default(Models.Crm.Task))
        {
            var uri = new Uri(baseUri, $"Tasks");

            var httpRequestMessage = new HttpRequestMessage(HttpMethod.Post, uri);

            httpRequestMessage.Content = new StringContent(ODataJsonSerializer.Serialize(task), Encoding.UTF8, "application/json");

            OnCreateTask(httpRequestMessage);

            var response = await httpClient.SendAsync(httpRequestMessage);

            return(await response.ReadAsync <Models.Crm.Task>());
        }
        protected async System.Threading.Tasks.Task Load()
        {
            var crmGetOpportunitiesResult = await Crm.GetOpportunities();

            getOpportunitiesResult = crmGetOpportunitiesResult.Value.AsODataEnumerable();

            var crmGetTaskTypesResult = await Crm.GetTaskTypes();

            getTaskTypesResult = crmGetTaskTypesResult.Value.AsODataEnumerable();

            var crmGetTaskStatusesResult = await Crm.GetTaskStatuses();

            getTaskStatusesResult = crmGetTaskStatusesResult.Value.AsODataEnumerable();

            task = new BlazorCrmWasm.Models.Crm.Task()
            {
            };
        }
Exemple #5
0
        public async System.Threading.Tasks.Task <HttpResponseMessage> UpdateTask(int?id = default(int?), Models.Crm.Task task = default(Models.Crm.Task))
        {
            var uri = new Uri(baseUri, $"Tasks({id})");

            var httpRequestMessage = new HttpRequestMessage(HttpMethod.Patch, uri);

            httpRequestMessage.Content = new StringContent(ODataJsonSerializer.Serialize(task), Encoding.UTF8, "application/json");

            OnUpdateTask(httpRequestMessage);
            return(await httpClient.SendAsync(httpRequestMessage));
        }