Пример #1
0
        public async Task <IActionResult> Update([FromBody] MeetingsVM model)
        {
            try
            {
                Meetings Meeting = new Meetings()
                {
                    _id               = ObjectId.Parse(model._id),
                    Subject           = model.Subject,
                    Location          = model.Location,
                    ResponsiblePerson = model.ResponsiblePerson,
                    Priority          = model.Priority,
                    //CreatedBy = model.CreatedBy,
                    //UpdatedBy = model.UpdatedBy,
                    //CreatedDate = model.CreatedDate,
                    //UpdatedDate = model.UpdatedDate,
                    EventStartDate       = model.EventStartDate,
                    EventEndDate         = model.EventEndDate,
                    ReminderNotification = model.ReminderNotification,
                    Completed            = model.Completed,
                    Description          = model.Description,
                    RepeatTask           = model.RepeatTask,
                    Interval             = model.Interval,
                    RepeatAfter          = model.RepeatAfter,
                    Untill            = model.Untill,
                    UntillDate        = model.UntillDate,
                    UntillCompile     = model.UntillCompile,
                    RemindUsing       = model.RemindUsing,
                    RemindTo          = model.RemindTo,
                    RepeatEvery       = model.RepeatEvery,
                    RepeatOnWeekDay   = model.RepeatOnWeekDay,
                    RepeatOnDay       = model.RepeatOnDay,
                    WillRepeat        = model.WillRepeat,
                    WillRepeatWeekDay = model.WillRepeatWeekDay,
                    RepeatOnMonth     = model.RepeatOnMonth,
                    IsAllDay          = model.IsAllDay,
                    StartTimeZone     = model.StartTimeZone,
                    EndTimeZone       = model.EndTimeZone,
                    ShowReminder      = model.ShowReminder,
                    ReminderDate      = model.ReminderDate,
                    ReminderPerson    = model.ReminderPerson
                };
                await _meetingRepository.UpdateMeeting(Meeting);

                return(new OkObjectResult(Meeting));
            }
            catch (Exception ex)
            {
            }
            return(Ok());
        }
Пример #2
0
 public MeetingDto EditMeeting(int meetingId, MeetingDto model)
 {
     ValidationHelper.IntegerGreaterThanZero(meetingId, name: "Meeting id");
     return(_meetingsRepository.UpdateMeeting(meetingId, model));
 }