public IList<Core.Business.StimulationExpertAssignment> GetAllStimulationExpertAssignment() { IList<Core.Business.StimulationExpertAssignment> stimulationExpertAssignmentlist = new List<Core.Business.StimulationExpertAssignment>(); SqlServerUtility sql = new SqlServerUtility(); SqlDataReader reader = sql.ExecuteSPReader("usp_SelectStimulationExpertAssignmentsAll"); if(reader != null) { while(reader.Read()) { Core.Business.StimulationExpertAssignment stimulationExpertAssignment = new Core.Business.StimulationExpertAssignment(); if (!reader.IsDBNull(0)) stimulationExpertAssignment.Id = reader.GetGuid(0); if (!reader.IsDBNull(1)) stimulationExpertAssignment.StimulationAppID = reader.GetGuid(1); if (!reader.IsDBNull(2)) stimulationExpertAssignment.ExpertID = reader.GetGuid(2); stimulationExpertAssignment.MarkOld(); stimulationExpertAssignmentlist.Add(stimulationExpertAssignment); } reader.Close(); } return stimulationExpertAssignmentlist; }
public IList<Core.Business.StimulationExpertAssignment> SelectStimulationExpertAssignmentDynamic(string whereCondition, string orderByExpression) { IList<Core.Business.StimulationExpertAssignment> stimulationExpertAssignmentlist = new List<Core.Business.StimulationExpertAssignment>(); SqlServerUtility sql = new SqlServerUtility(); sql.AddParameter("@WhereCondition", SqlDbType.NVarChar, whereCondition); sql.AddParameter("@OrderByExpression", SqlDbType.NVarChar, orderByExpression); SqlDataReader reader = sql.ExecuteSPReader("usp_SelectStimulationExpertAssignmentsDynamic"); if (reader != null) { while (reader.Read()) { Core.Business.StimulationExpertAssignment stimulationExpertAssignment = new Core.Business.StimulationExpertAssignment(); if (!reader.IsDBNull(0)) stimulationExpertAssignment.Id = reader.GetGuid(0); if (!reader.IsDBNull(1)) stimulationExpertAssignment.StimulationAppID = reader.GetGuid(1); if (!reader.IsDBNull(2)) stimulationExpertAssignment.ExpertID = reader.GetGuid(2); stimulationExpertAssignment.MarkOld(); stimulationExpertAssignmentlist.Add(stimulationExpertAssignment); } reader.Close(); } return stimulationExpertAssignmentlist; }