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


            WrapperDocType data = new Services.DocTypeService().GetSingleDocType(DocTypeID);
            return(Ok(data));
        }
Exemple #2
0
        public IActionResult CreatDocType([FromBody] WrapperDocType userParam)
        {
            #region Validate Token
            RequestResponse isAuthorized = new Authorize().RequestTokenAuth(Request);
            if (isAuthorized.Success == false)
            {
                return(BadRequest(isAuthorized));
            }
            #endregion



            WrapperDocType data = new Services.DocTypeService().CreateSingleDocType(userParam.DocType);

            return(Ok(data));
        }
Exemple #3
0
        public IActionResult DeleteDocType(int DocTypeID)
        {
            #region Validate Token
            RequestResponse isAuthorized = new Authorize().RequestTokenAuth(Request);
            if (isAuthorized.Success == false)
            {
                return(BadRequest(isAuthorized));
            }
            #endregion



            RequestResponse RequestResponse = new Services.DocTypeService().DeleteSingleDocType(DocTypeID);
            if (RequestResponse.Success == false)
            {
                return(BadRequest(RequestResponse));
            }

            return(Ok(RequestResponse));
        }