public IList<Core.Business.InstrumentoperateRepository> GetAllInstrumentoperateRepository() { IList<Core.Business.InstrumentoperateRepository> instrumentoperateRepositorylist = new List<Core.Business.InstrumentoperateRepository>(); SqlServerUtility sql = new SqlServerUtility(); SqlDataReader reader = sql.ExecuteSPReader("usp_SelectInstrumentoperateRepositoriesAll"); if (reader != null) { while (reader.Read()) { Core.Business.InstrumentoperateRepository instrumentoperateRepository = new Core.Business.InstrumentoperateRepository(); if (!reader.IsDBNull(0)) instrumentoperateRepository.Id = reader.GetGuid(0); if (!reader.IsDBNull(1)) instrumentoperateRepository.Head = reader.GetString(1); if (!reader.IsDBNull(2)) instrumentoperateRepository.InstrumentID = reader.GetGuid(2); if (!reader.IsDBNull(3)) instrumentoperateRepository.OperateSortID = reader.GetGuid(3); if (!reader.IsDBNull(4)) instrumentoperateRepository.OperateContent = reader.GetString(4); if (!reader.IsDBNull(5)) instrumentoperateRepository.Remark = reader.GetString(5); if (!reader.IsDBNull(6)) instrumentoperateRepository.DranscriberID = reader.GetGuid(6); if (!reader.IsDBNull(7)) instrumentoperateRepository.DranscribeDate = reader.GetDateTime(7); instrumentoperateRepository.MarkOld(); instrumentoperateRepositorylist.Add(instrumentoperateRepository); } reader.Close(); } return instrumentoperateRepositorylist; }
public IList<Core.Business.InstrumentoperateRepository> SelectInstrumentoperateRepositoryDynamic(string topcondition, string whereCondition, string orderByExpression) { IList<Core.Business.InstrumentoperateRepository> instrumentoperateRepositorylist = new List<Core.Business.InstrumentoperateRepository>(); SqlServerUtility sql = new SqlServerUtility(); sql.AddParameter("@topCondition", SqlDbType.NVarChar, topcondition); sql.AddParameter("@WhereCondition", SqlDbType.NVarChar, whereCondition); sql.AddParameter("@OrderByExpression", SqlDbType.NVarChar, orderByExpression); SqlDataReader reader = sql.ExecuteSPReader("usp_SelectInstrumentoperateRepositoriesDynamic"); if (reader != null) { while (reader.Read()) { Core.Business.InstrumentoperateRepository instrumentoperateRepository = new Core.Business.InstrumentoperateRepository(); if (!reader.IsDBNull(0)) instrumentoperateRepository.Id = reader.GetGuid(0); if (!reader.IsDBNull(1)) instrumentoperateRepository.Head = reader.GetString(1); if (!reader.IsDBNull(2)) instrumentoperateRepository.InstrumentID = reader.GetGuid(2); if (!reader.IsDBNull(3)) instrumentoperateRepository.OperateSortID = reader.GetGuid(3); if (!reader.IsDBNull(4)) instrumentoperateRepository.OperateContent = reader.GetString(4); if (!reader.IsDBNull(5)) instrumentoperateRepository.Remark = reader.GetString(5); if (!reader.IsDBNull(6)) instrumentoperateRepository.DranscriberID = reader.GetGuid(6); if (!reader.IsDBNull(7)) instrumentoperateRepository.DranscribeDate = reader.GetDateTime(7); instrumentoperateRepository.MarkOld(); instrumentoperateRepositorylist.Add(instrumentoperateRepository); } reader.Close(); } return instrumentoperateRepositorylist; }
public IList<Core.Business.InstrumentoperateRepository> GetRepositoryBySortID(Guid sortId, int pagenumber, int pagesize) { IList<Core.Business.InstrumentoperateRepository> lawRepositorylist = new List<Core.Business.InstrumentoperateRepository>(); SqlServerUtility sql = new SqlServerUtility(); sql.AddParameter("@Tables", SqlDbType.VarChar, "InstrumentoperateRepository"); sql.AddParameter("@PK", SqlDbType.VarChar, "Id"); sql.AddParameter("@PageNumber", SqlDbType.Int, pagenumber); sql.AddParameter("@PageSize", SqlDbType.Int, pagesize); //sql.AddParameter("@LawSortID", SqlDbType.UniqueIdentifier, sortId); sql.AddParameter("@Filter", SqlDbType.VarChar, "[OperateSortID]='" + sortId + "'"); SqlDataReader reader = sql.ExecuteSPReader("Paging_RowCount"); if (reader != null) { while (reader.Read()) { Core.Business.InstrumentoperateRepository instrumentoperateRepository = new Core.Business.InstrumentoperateRepository(); if (!reader.IsDBNull(0)) instrumentoperateRepository.Id = reader.GetGuid(0); if (!reader.IsDBNull(1)) instrumentoperateRepository.Head = reader.GetString(1); if (!reader.IsDBNull(2)) instrumentoperateRepository.InstrumentID = reader.GetGuid(2); if (!reader.IsDBNull(3)) instrumentoperateRepository.OperateSortID = reader.GetGuid(3); if (!reader.IsDBNull(4)) instrumentoperateRepository.OperateContent = reader.GetString(4); if (!reader.IsDBNull(5)) instrumentoperateRepository.Remark = reader.GetString(5); if (!reader.IsDBNull(6)) instrumentoperateRepository.DranscriberID = reader.GetGuid(6); if (!reader.IsDBNull(7)) instrumentoperateRepository.DranscribeDate = reader.GetDateTime(7); instrumentoperateRepository.MarkOld(); lawRepositorylist.Add(instrumentoperateRepository); } reader.Close(); } return lawRepositorylist; }