async void DoAddConsumerCommand(consumer_by_institution consumer) { //Update Local List var consumerbycircle = new consumer_by_circle { name = consumer.name, lastname = consumer.lastname, username = consumer.username }; ConsumersCircleList.Add(consumerbycircle); //Add it to a Circle _mLearningService.AddUserToCircle(consumer.id, CircleID); }
void DoUnsubscribeConsumerCommand(consumer_by_circle consumer) { ConsumersCircleList.Remove(consumer); _mLearningService.UnSubscribeConsumerFromCircle(consumer.id,CircleID); }
public async Task<ActionResult> CircleConsumer_destroy([DataSourceRequest] DataSourceRequest request, consumer_by_circle cons) { if (cons != null && ModelState.IsValid) { await _mLearningService.RemoveUserFromCircle(cons.id, cons.Circle_id); /*if (CircleID != null) { await _mLearningService.UnSubscribeConsumerFromCircle(user_id, CircleID); }*/ } return Json(new[] { cons }.ToDataSourceResult(request, ModelState)); }