public async Task <IActionResult> Create([Bind("Id,Name,Active,CronExpression")] MailSendingJob mailSendingJob)
        {
            if (ModelState.IsValid)
            {
                _context.Add(mailSendingJob);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(mailSendingJob));
        }
예제 #2
0
        public async Task <IActionResult> Create([Bind("Id,SourceBranch,TargetBranch,ChangeSetId,DevChangeSetId,Reviewer,Memo,SubmitBy,SubmitAt,UpdateBy,UpdateAt")] MergeRequest mergeRequest)
        {
            if (ModelState.IsValid)
            {
                _context.Add(mergeRequest);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(mergeRequest));
        }
        public async Task <IActionResult> Create(MergeRequest mergeRequest)
        {
            if (ModelState.IsValid)
            {
                mergeRequest.SubmitAt = Now;
                mergeRequest.SubmitBy = LoginUser;
                mergeRequest.UpdateAt = Now;
                mergeRequest.UpdateBy = LoginUser;
                _context.Add(mergeRequest);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }

            return(View(mergeRequest));
        }