Пример #1
0
        public async Task <IActionResult> Create([Bind("Id,OrganizationNumber,Date,Type,Description,Conclusion")] Meeting meeting)
        {
            if (ModelState.IsValid)
            {
                var createdMeeting = await _meetingService.Create(meeting);

                return(RedirectToAction(nameof(Edit), new { id = createdMeeting.Id }));
            }
            return(View(meeting));
        }
        public async Task <ActionResult> Create([FromBody] CreateMeetingBindModel model)
        {
            var meeting = new MeetingModel();

            meeting.StartDate      = DateTime.UtcNow;
            meeting.Duration       = new TimeSpan(0, 30, 0);
            meeting.Title          = model.title;
            meeting.PlaceId        = model.placeId;
            meeting.UserId         = UserId;
            meeting.ParticipantIds = model.participantIds;

            int meetingId = await _meetingService.Create(meeting);

            return(Ok(new { meetingId = meetingId }));
        }
Пример #3
0
        public IActionResult Index()
        {
            var personalInfoRepository = EngineContext.Resolve <IMeetingRepository>();
            var data = personalInfoRepository.Table;

            _meetingService.Create(new MeetingModel
            {
                ProjectName          = "Project Name",
                GroupMeetingDate     = DateTime.Now,
                TeamLeadName         = "Team Lead name",
                Description          = "Description",
                GroupMeetingLeadName = "Group Meeting Lead Name"
            }, "");
            //var datas = _meetingService.GetCount(1, 10, null, null);
            return(View());
        }
Пример #4
0
        public ActionResult Create(MeetingModel model)
        {
            bool created;

            Validate(model);

            if (ModelState.IsValid)
            {
                created = _meetingService.Create(model);
            }
            else
            {
                created = false;
            }

            ViewData["created"] = created;
            return(PartialView("Diary/Meeting/CreateForm", model));
        }