public PagedDataSource GetStores(int pageIndex, int pageSize, string userCode, string code = "", string name = "") { var bll = new StoreBasicInfo(); int totalRecords = 0; var list = bll.GetStoresByEmployeeCode(pageIndex, pageSize, userCode, name, code, out totalRecords).ToArray(); return(new PagedDataSource(totalRecords, list)); }