protected async void Load() { canEdit = true; var crmGetOpportunityStatusByIdResult = await Crm.GetOpportunityStatusById(int.Parse(Id)); opportunitystatus = crmGetOpportunityStatusByIdResult; }
protected async System.Threading.Tasks.Task Load() { canEdit = true; var crmGetOpportunityStatusByIdResult = await Crm.GetOpportunityStatusById(Id); opportunitystatus = crmGetOpportunityStatusByIdResult; }
public async Task <Models.Crm.OpportunityStatus> CreateOpportunityStatus(Models.Crm.OpportunityStatus opportunityStatus) { OnOpportunityStatusCreated(opportunityStatus); context.OpportunityStatuses.Add(opportunityStatus); context.SaveChanges(); return(opportunityStatus); }
protected async void Form0Submit(RadzenCrm.Models.Crm.OpportunityStatus args) { try { var crmUpdateOpportunityStatusResult = await Crm.UpdateOpportunityStatus(int.Parse(Id), opportunitystatus); DialogService.Close(opportunitystatus); } catch (Exception crmUpdateOpportunityStatusException) { NotificationService.Notify(NotificationSeverity.Error, $"Error", $"Unable to update OpportunityStatus"); } }
protected async System.Threading.Tasks.Task Form0Submit(RadzenCrm.Models.Crm.OpportunityStatus args) { try { var crmUpdateOpportunityStatusResult = await Crm.UpdateOpportunityStatus(Id, opportunitystatus); DialogService.Close(opportunitystatus); } catch (System.Exception crmUpdateOpportunityStatusException) { NotificationService.Notify(NotificationSeverity.Error, $"Error", $"Unable to update OpportunityStatus"); } }
protected async void GridDeleteButtonClick(MouseEventArgs args, RadzenCrm.Models.Crm.OpportunityStatus data) { try { var crmDeleteOpportunityStatusResult = await Crm.DeleteOpportunityStatus(data.Id); if (crmDeleteOpportunityStatusResult != null) { grid0.Reload(); } } catch (Exception crmDeleteOpportunityStatusException) { NotificationService.Notify(NotificationSeverity.Error, $"Error", $"Unable to delete OpportunityStatus"); } }
protected async void Grid0RowSelect(RadzenCrm.Models.Crm.OpportunityStatus args) { var result = await DialogService.OpenAsync <EditOpportunityStatus>("Edit Opportunity Status", new Dictionary <string, object>() { { "Id", args.Id } }); await InvokeAsync(() => { StateHasChanged(); }); }
public async Task <Models.Crm.OpportunityStatus> UpdateOpportunityStatus(int?id, Models.Crm.OpportunityStatus opportunityStatus) { OnOpportunityStatusUpdated(opportunityStatus); var item = context.OpportunityStatuses .Where(i => i.Id == id) .First(); var entry = context.Entry(item); entry.CurrentValues.SetValues(opportunityStatus); entry.State = EntityState.Modified; context.SaveChanges(); return(opportunityStatus); }
partial void OnOpportunityStatusUpdated(Models.Crm.OpportunityStatus item);
public async Task <Models.Crm.OpportunityStatus> CancelOpportunityStatusChanges(Models.Crm.OpportunityStatus item) { var entity = context.Entry(item); entity.CurrentValues.SetValues(entity.OriginalValues); entity.State = EntityState.Unchanged; return(item); }
partial void OnOpportunityStatusGet(Models.Crm.OpportunityStatus item);
protected async void Load() { opportunitystatus = new RadzenCrm.Models.Crm.OpportunityStatus(); }
public async Task <Models.Crm.OpportunityStatus> UpdateOpportunityStatus(int?id, Models.Crm.OpportunityStatus opportunityStatus) { OnOpportunityStatusUpdated(opportunityStatus); var item = context.OpportunityStatuses .Where(i => i.Id == id) .FirstOrDefault(); if (item == null) { throw new Exception("Item no longer available"); } var entry = context.Entry(item); entry.CurrentValues.SetValues(opportunityStatus); entry.State = EntityState.Modified; context.SaveChanges(); return(opportunityStatus); }
protected async System.Threading.Tasks.Task Load() { opportunitystatus = new RadzenCrm.Models.Crm.OpportunityStatus(); }