コード例 #1
0
        public void UpdateProject(CommonEntities.Projects project)
        {
            ProjectManagerEntities mockContext = MockDataSetList();
            var projectBL = new ProjectBL(mockContext);

            projectBL.UpdateProject(project);
        }
コード例 #2
0
        public IHttpActionResult AddProject([FromBody] ProjectMangerModel.Projects project)
        {
            try
            {
                CommonEntities.Projects proj = new CommonEntities.Projects
                {
                    ProjectName = project.ProjectName,
                    StartDate   = project.StartDate,
                    EndDate     = project.EndDate,
                    Priority    = project.Priority,
                    ManagerID   = project.ManagerID
                };

                _projectBL.AddProject(proj);
                return(Ok());
            }
            catch
            {
                return(InternalServerError());
            }
        }