private void SaveProject() { bool isSuccess = OperationType == OperationType.Add ? _projectManger.Add(Project) : _projectManger.Update(Project); if (isSuccess) { InvokeOnFinish(); } else { ShowMessage(MessageService.Instance.GetLatestMessage()); } }
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)); } }