public async Task <ApiResult> Insert(InsertEvent request) { request.CompanyUid = await _currentCompanyProvider.GetCompanyUid(); request.UserUid = _currentUserProvider.GetUserUid(); return(await _mediator.Send(request)); }
internal async Task InsertAsync(InsertEvent insertEvent) { var response = await _container.CreateItemAsync(JObject.Parse(insertEvent.JsonEntity), new PartitionKey(insertEvent.EntityPartitionKey)); if (response.StatusCode != HttpStatusCode.Created) { throw new Exception($"Insert error: ({response.StatusCode})"); } }
protected override void InsertItem(int index, T item) { if (InsertEvent != null) { if (!InsertEvent.Invoke(index, item)) { return; } } base.InsertItem(index, item); }
public CreateEvent(string issueId = null) { InitializeComponent(); if (LoggedInUser.userType.Equals(Constants.UserType.PUBLIC) || LoggedInUser.userType.Equals(Constants.UserType.AUTHORITY)) { base.OnBackButtonPressed(); } this.IssueID = issueId; aPIService = RestService.For <IAPIService>(Constants.mongoDBBaseUrl); insertEvent = new InsertEvent(); newEventResponse = new Event(); }
public static void WriteOfflineEvent(InsertEvent eventJson) { if (eventJson == null) { return; } List <InsertEvent> eventList = new List <InsertEvent> { }; if (Application.Current.Properties.ContainsKey(Constants.mongoDBofflineEvents)) { eventList = (List <InsertEvent>)Application.Current.Properties[Constants.mongoDBofflineEvents]; } eventList.Add(eventJson); Application.Current.Properties[Constants.mongoDBofflineEvents] = null; Application.Current.Properties[Constants.mongoDBofflineEvents] = JsonConvert.SerializeObject(eventList); Application.Current.SavePropertiesAsync(); }
public void OnInsert(object sender, CollectionChangeEventArgs e) { InsertEvent?.Invoke(sender, e); }
public async Task PostReminder(Reminder reminder) { await _reminderTable.InsertAsync(reminder); InsertEvent?.Invoke(reminder); }
public override Task Handle(InsertEvent <User> p_event) { return(Task.CompletedTask); }
private void insert(int index, int actionId) { _actionArray[index] = actionId; InsertEvent.Invoke(index, _actionArray[index]); }