Exemple #1
0
        public List <SPGetListDocumentFieldDepartment_Result> GetList(DocumentFieldDepartmentQuery query, out int count)
        {
            /*Lấy danh sách lĩnh vực đơn vị khi thực hiện thêm mới văn bản*/
            count = 0;
            int pageNumber   = query.PageNumber != 0 ? query.PageNumber : 1;
            var keyword      = string.IsNullOrEmpty(query.Keyword) != true ? query.Keyword : "";
            var departmnetId = query.DepartmentId;
            var start        = 0;
            var limit        = query.PageSize;

            start = (pageNumber - 1) * limit;
            int totalRow = 0;
            List <SPGetListDocumentFieldDepartment_Result> result = new List <SPGetListDocumentFieldDepartment_Result>();
            ObjectParameter prTotalRow = new ObjectParameter("total", totalRow);

            result = _entities.SPGetListDocumentFieldDepartment(departmnetId, Util.DetecVowel(keyword), start, limit, prTotalRow).ToList();
            count  = (prTotalRow.Value == null) ? 0 : Convert.ToInt32(prTotalRow.Value);
            return(result);
        }
Exemple #2
0
 public BaseListResponse <SPGetListDocumentFieldDepartment_Result> Search([FromUri] DocumentFieldDepartmentQuery query)
 {
     return(documentService.GetListDocumentFieldDepartment(query));
 }