protected async void Load() { canEdit = true; var crmGetTaskStatusByIdResult = await Crm.GetTaskStatusById(int.Parse($"{Id}")); taskstatus = crmGetTaskStatusByIdResult; }
protected async System.Threading.Tasks.Task Load() { canEdit = true; var crmGetTaskStatusByIdResult = await Crm.GetTaskStatusById(Id); taskstatus = crmGetTaskStatusByIdResult; }
public async Task <Models.Crm.TaskStatus> CancelTaskStatusChanges(Models.Crm.TaskStatus item) { var entity = context.Entry(item); entity.CurrentValues.SetValues(entity.OriginalValues); entity.State = EntityState.Unchanged; return(item); }
public async Task <Models.Crm.TaskStatus> CreateTaskStatus(Models.Crm.TaskStatus taskStatus) { OnTaskStatusCreated(taskStatus); context.TaskStatuses.Add(taskStatus); context.SaveChanges(); return(taskStatus); }
protected async System.Threading.Tasks.Task Form0Submit(RadzenCrm.Models.Crm.TaskStatus args) { try { var crmCreateTaskStatusResult = await Crm.CreateTaskStatus(taskstatus); DialogService.Close(taskstatus); } catch (System.Exception crmCreateTaskStatusException) { NotificationService.Notify(NotificationSeverity.Error, $"Error", $"Unable to create new TaskStatus!"); } }
protected async void Form0Submit(RadzenCrm.Models.Crm.TaskStatus args) { try { var crmUpdateTaskStatusResult = await Crm.UpdateTaskStatus(int.Parse($"{Id}"), taskstatus); DialogService.Close(taskstatus); } catch (Exception crmUpdateTaskStatusException) { NotificationService.Notify(NotificationSeverity.Error, $"Error", $"Unable to update TaskStatus"); } }
public async Task <Models.Crm.TaskStatus> UpdateTaskStatus(int?id, Models.Crm.TaskStatus taskStatus) { OnTaskStatusUpdated(taskStatus); var item = context.TaskStatuses .Where(i => i.Id == id) .First(); var entry = context.Entry(item); entry.CurrentValues.SetValues(taskStatus); entry.State = EntityState.Modified; context.SaveChanges(); return(taskStatus); }
protected async void GridDeleteButtonClick(MouseEventArgs args, RadzenCrm.Models.Crm.TaskStatus data) { try { var crmDeleteTaskStatusResult = await Crm.DeleteTaskStatus(data.Id); if (crmDeleteTaskStatusResult != null) { grid0.Reload(); } } catch (Exception crmDeleteTaskStatusException) { NotificationService.Notify(NotificationSeverity.Error, $"Error", $"Unable to delete TaskStatus"); } }
public async Task <Models.Crm.TaskStatus> UpdateTaskStatus(int?id, Models.Crm.TaskStatus taskStatus) { OnTaskStatusUpdated(taskStatus); var item = context.TaskStatuses .Where(i => i.Id == id) .FirstOrDefault(); if (item == null) { throw new Exception("Item no longer available"); } var entry = context.Entry(item); entry.CurrentValues.SetValues(taskStatus); entry.State = EntityState.Modified; context.SaveChanges(); return(taskStatus); }
protected async System.Threading.Tasks.Task Load() { taskstatus = new RadzenCrm.Models.Crm.TaskStatus(); }
partial void OnTaskStatusUpdated(Models.Crm.TaskStatus item);
partial void OnTaskStatusGet(Models.Crm.TaskStatus item);
partial void OnTaskStatusDeleted(Models.Crm.TaskStatus item);
protected async void Grid0RowSelect(RadzenCrm.Models.Crm.TaskStatus args) { var result = await DialogService.OpenAsync <EditTaskStatus>("Edit Task Status", new Dictionary <string, object>() { { "Id", args.Id } }); await InvokeAsync(() => { StateHasChanged(); }); }
protected async void Load() { taskstatus = new RadzenCrm.Models.Crm.TaskStatus(); }