示例#1
0
        public IActionResult GetProject(int ProjectID)
        {
            #region Validate Token
            RequestResponse isAuthorized = new Authorize().RequestTokenAuth(Request);
            if (isAuthorized.Success == false)
            {
                return(BadRequest(isAuthorized));
            }
            #endregion


            WrapperProject data = new Services.ProjectUDService().GetSingleProject(ProjectID);
            return(Ok(data));
        }
示例#2
0
        public IActionResult GetAllDeletedProjectList(int EntriesFrom, int EntriesTill)
        {
            #region Validate Token
            RequestResponse isAuthorized = new Authorize().RequestTokenAuth(Request);
            if (isAuthorized.Success == false)
            {
                return(BadRequest(isAuthorized));
            }
            #endregion


            //ZERO (0) page number means all Projects
            //1 means 1-10 , 2 means 20-30
            WrapperMultiProject data = new Services.ProjectUDService().GetAllDeletedProjectList(EntriesFrom, EntriesTill);
            return(Ok(data));
        }
示例#3
0
        public IActionResult CreatProject([FromBody] WrapperProject Param)
        {
            #region Validate Token
            RequestResponse isAuthorized = new Authorize().RequestTokenAuth(Request);
            if (isAuthorized.Success == false)
            {
                return(BadRequest(isAuthorized));
            }
            #endregion



            WrapperProject data = new Services.ProjectUDService().CreateSingleProject(Param.Project);

            return(Ok(data));
        }
示例#4
0
        public IActionResult ArchiveProject(int ProjectID, bool isArchive)
        {
            #region Validate Token
            RequestResponse isAuthorized = new Authorize().RequestTokenAuth(Request);
            if (isAuthorized.Success == false)
            {
                return(BadRequest(isAuthorized));
            }
            #endregion


            RequestResponse RequestResponse = new Services.ProjectUDService().UpdateProjectArchiveStatus(ProjectID, isArchive);
            if (RequestResponse.Success == false)
            {
                return(BadRequest(RequestResponse));
            }

            return(Ok(RequestResponse));
        }