protected MRS.Model.PsnType Parse(SqlDataReader Reader) { MRS.Model.PsnType psnType = new MRS.Model.PsnType(); psnType.Id = Convert.ToInt32(Reader[DSL.PsnType.ID_FIELD]); psnType.Name = Reader[DSL.PsnType.NAME_FIELD].ToString().Trim(); return(psnType); }
public IList <MRS.Model.PsnType> GetPsnType() { IList <MRS.Model.PsnType> psnTypes = new List <MRS.Model.PsnType>(); using (SqlDataReader reader = SqlHelper.ExecuteReader(ConnectionString.ConnectionStringMRS, CommandType.StoredProcedure, CommandText.SELECT_PSNTYPE, null)) { while (reader.Read()) { MRS.Model.PsnType psnType = Parse(reader); psnTypes.Add(psnType); } } return(psnTypes); }