protected async void Load()
        {
            canEdit = true;

            var crmGetTaskStatusByIdResult = await Crm.GetTaskStatusById(int.Parse($"{Id}"));

            taskstatus = crmGetTaskStatusByIdResult;
        }
Example #2
0
        protected async System.Threading.Tasks.Task Load()
        {
            canEdit = true;

            var crmGetTaskStatusByIdResult = await Crm.GetTaskStatusById(Id);

            taskstatus = crmGetTaskStatusByIdResult;
        }
Example #3
0
        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);
        }
Example #4
0
        public async Task <Models.Crm.TaskStatus> CreateTaskStatus(Models.Crm.TaskStatus taskStatus)
        {
            OnTaskStatusCreated(taskStatus);

            context.TaskStatuses.Add(taskStatus);
            context.SaveChanges();

            return(taskStatus);
        }
Example #5
0
        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");
            }
        }
Example #7
0
        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);
        }
Example #8
0
        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");
            }
        }
Example #9
0
        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);
        }
Example #10
0
 protected async System.Threading.Tasks.Task Load()
 {
     taskstatus = new RadzenCrm.Models.Crm.TaskStatus();
 }
Example #11
0
 partial void OnTaskStatusUpdated(Models.Crm.TaskStatus item);
Example #12
0
 partial void OnTaskStatusGet(Models.Crm.TaskStatus item);
Example #13
0
 partial void OnTaskStatusDeleted(Models.Crm.TaskStatus item);
Example #14
0
        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();
 }