コード例 #1
0
        private void SaveProject()
        {
            bool isSuccess = OperationType == OperationType.Add
                                 ? _projectManger.Add(Project)
                                 : _projectManger.Update(Project);

            if (isSuccess)
            {
                InvokeOnFinish();
            }
            else
            {
                ShowMessage(MessageService.Instance.GetLatestMessage());
            }
        }
コード例 #2
0
        public IActionResult Add([FromBody] ProjectAddModel model)
        {
            Request.Headers.TryGetValue("Authorization", out var token);
            string email = _accountManager.GetEmailByToken(token);

            try
            {
                _projectManager.Add(model, email);
                return(Ok("Success!!!"));
            }
            catch (Exception e)
            {
                return(Conflict(e.Message));
            }
        }