protected async void Load() { canEdit = true; var crmGetTaskTypeByIdResult = await Crm.GetTaskTypeById(int.Parse($"{Id}")); tasktype = crmGetTaskTypeByIdResult; }
protected async System.Threading.Tasks.Task Load() { canEdit = true; var crmGetTaskTypeByIdResult = await Crm.GetTaskTypeById(Id); tasktype = crmGetTaskTypeByIdResult; }
public async Task <Models.Crm.TaskType> CancelTaskTypeChanges(Models.Crm.TaskType item) { var entity = context.Entry(item); entity.CurrentValues.SetValues(entity.OriginalValues); entity.State = EntityState.Unchanged; return(item); }
public async Task <Models.Crm.TaskType> CreateTaskType(Models.Crm.TaskType taskType) { OnTaskTypeCreated(taskType); context.TaskTypes.Add(taskType); context.SaveChanges(); return(taskType); }
protected async void Form0Submit(RadzenCrm.Models.Crm.TaskType args) { try { var crmUpdateTaskTypeResult = await Crm.UpdateTaskType(int.Parse($"{Id}"), tasktype); DialogService.Close(tasktype); } catch (Exception crmUpdateTaskTypeException) { NotificationService.Notify(NotificationSeverity.Error, $"Error", $"Unable to update TaskType"); } }
protected async System.Threading.Tasks.Task Form0Submit(RadzenCrm.Models.Crm.TaskType args) { try { var crmCreateTaskTypeResult = await Crm.CreateTaskType(tasktype); DialogService.Close(tasktype); } catch (System.Exception crmCreateTaskTypeException) { NotificationService.Notify(NotificationSeverity.Error, $"Error", $"Unable to create new TaskType!"); } }
public async Task <Models.Crm.TaskType> UpdateTaskType(int?id, Models.Crm.TaskType taskType) { OnTaskTypeUpdated(taskType); var item = context.TaskTypes .Where(i => i.Id == id) .First(); var entry = context.Entry(item); entry.CurrentValues.SetValues(taskType); entry.State = EntityState.Modified; context.SaveChanges(); return(taskType); }
protected async void GridDeleteButtonClick(MouseEventArgs args, RadzenCrm.Models.Crm.TaskType data) { try { var crmDeleteTaskTypeResult = await Crm.DeleteTaskType(data.Id); if (crmDeleteTaskTypeResult != null) { grid0.Reload(); } } catch (Exception crmDeleteTaskTypeException) { NotificationService.Notify(NotificationSeverity.Error, $"Error", $"Unable to delete TaskType"); } }
public async Task <Models.Crm.TaskType> UpdateTaskType(int?id, Models.Crm.TaskType taskType) { OnTaskTypeUpdated(taskType); var item = context.TaskTypes .Where(i => i.Id == id) .FirstOrDefault(); if (item == null) { throw new Exception("Item no longer available"); } var entry = context.Entry(item); entry.CurrentValues.SetValues(taskType); entry.State = EntityState.Modified; context.SaveChanges(); return(taskType); }
protected async System.Threading.Tasks.Task Load() { tasktype = new RadzenCrm.Models.Crm.TaskType(); }
protected async void Grid0RowSelect(RadzenCrm.Models.Crm.TaskType args) { var result = await DialogService.OpenAsync <EditTaskType>("Edit Task Type", new Dictionary <string, object>() { { "Id", args.Id } }); await InvokeAsync(() => { StateHasChanged(); }); }
protected async void Load() { tasktype = new RadzenCrm.Models.Crm.TaskType(); }
partial void OnTaskTypeUpdated(Models.Crm.TaskType item);
partial void OnTaskTypeGet(Models.Crm.TaskType item);
partial void OnTaskTypeDeleted(Models.Crm.TaskType item);