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)); }
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)); }
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)); }