Exemplo n.º 1
0
        protected async void Load()
        {
            canEdit = true;

            var crmGetTaskTypeByIdResult = await Crm.GetTaskTypeById(int.Parse($"{Id}"));

            tasktype = crmGetTaskTypeByIdResult;
        }
Exemplo n.º 2
0
        protected async System.Threading.Tasks.Task Load()
        {
            canEdit = true;

            var crmGetTaskTypeByIdResult = await Crm.GetTaskTypeById(Id);

            tasktype = crmGetTaskTypeByIdResult;
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
        public async Task <Models.Crm.TaskType> CreateTaskType(Models.Crm.TaskType taskType)
        {
            OnTaskTypeCreated(taskType);

            context.TaskTypes.Add(taskType);
            context.SaveChanges();

            return(taskType);
        }
Exemplo n.º 5
0
        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!");
            }
        }
Exemplo n.º 7
0
        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);
        }
Exemplo n.º 8
0
        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");
            }
        }
Exemplo n.º 9
0
        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();
 }
Exemplo n.º 11
0
        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(); });
        }
Exemplo n.º 12
0
 protected async void Load()
 {
     tasktype = new RadzenCrm.Models.Crm.TaskType();
 }
Exemplo n.º 13
0
 partial void OnTaskTypeUpdated(Models.Crm.TaskType item);
Exemplo n.º 14
0
 partial void OnTaskTypeGet(Models.Crm.TaskType item);
Exemplo n.º 15
0
 partial void OnTaskTypeDeleted(Models.Crm.TaskType item);