Esempio n. 1
0
        public IHttpActionResult GetstaffsPaging(int pageSize, int pageNumber, int?status, string name)
        {
            ResponseDataDTO <PagedResults <staffviewmodel> > response = new ResponseDataDTO <PagedResults <staffviewmodel> >();

            try
            {
                response.Code    = HttpCode.OK;
                response.Message = MessageResponse.SUCCESS;
                response.Data    = _staffservice.GetAllPageSearch(pageNumber, pageSize, status, name);
            }
            catch (Exception ex)
            {
                response.Code    = HttpCode.INTERNAL_SERVER_ERROR;
                response.Message = ex.Message;
                response.Data    = null;

                Console.WriteLine(ex.ToString());
            }

            return(Ok(response));
        }