コード例 #1
0
        public ActionResult Add(AddDefectModel model)
        {
            if (!ModelState.IsValid)
            {
                return(PartialView(model));
            }

            var service         = CurrentAccountDbContext.GetDefectService();
            var createUser      = GetUserById(CurrentUser.Id);
            var responsibleUser = GetUserById(model.ResponsibleUserId.Value);

            service.CreateDefect(CurrentUser.AccountId, model.Title, createUser, responsibleUser, model.Notes);
            CurrentAccountDbContext.SaveChanges();

            return(GetSuccessJsonResponse());
        }
コード例 #2
0
        public ActionResult Add()
        {
            var model = new AddDefectModel();

            return(PartialView(model));
        }