public IEnumerable <sp_Order_TissueBank_GetByTissueBankId_Result> GetOrderByTissueBankId(int TissueBankId, string SearchBy, int CurrentPage, int PageSize, string SortDirection, string SortExpression, out TransactionalInformation transaction) { transaction = new TransactionalInformation(); OrderBusinessRule orderBusinessRule = new OrderBusinessRule(orderDataService); IEnumerable <sp_Order_TissueBank_GetByTissueBankId_Result> lstOrder = null; try { orderDataService.CreateSession(); orderBusinessRule.ValidateOrderRequest(TissueBankId, SearchBy, CurrentPage, PageSize, SortDirection, SortExpression); if (orderBusinessRule.ValidationStatus == true) { lstOrder = orderDataService.GetOrderByTissueBankId(TissueBankId, SearchBy, CurrentPage, PageSize, SortDirection, SortExpression, out transaction); } else { transaction.ReturnStatus = orderBusinessRule.ValidationStatus; transaction.ReturnMessage = orderBusinessRule.ValidationMessage; transaction.ValidationErrors = orderBusinessRule.ValidationErrors; } } catch (Exception ex) { transaction.ReturnMessage = new List <string>(); string errorMessage = ex.Message; transaction.ReturnStatus = false; transaction.ReturnMessage.Add(errorMessage); } finally { orderDataService.CloseSession(); } return(lstOrder); }