Ejemplo n.º 1
0
        public async Task Save()
        {
            var activity = Activities.FirstOrDefault(i => i.Id == DialogId);

            Action <Activity> action = (ac) =>
            {
                ac.Active = Active;
                ac.Name   = ActivityName;
            };

            if (activity == default)
            {
                activity    = new Activity();
                activity.Id = DialogId;
                action.Invoke(activity);
                await _activityManagementService.Create(activity);
            }
            else
            {
                action.Invoke(activity);
                await _activityManagementService.Update(activity);
            }

            EditModalOpen = false;
            Activities    = await _activityManagementService.GetAll();
        }
Ejemplo n.º 2
0
 public Task Create(Activity activity)
 {
     return(_proxy.Create(activity));
 }