Exemplo n.º 1
0
        /// <summary>
        /// Method to get all the reservation nodes information
        /// </summary>
        public List <NodeInReservationInfo> GetReservationNodes(string id)
        {
            SqlParameter[] parms = { new SqlParameter("@ReservationId", SqlDbType.VarChar, 100) };
            parms[0].Value = id;

            var entities = new List <NodeInReservationInfo>();

            using (var rdr = SqlHelper.ExecuteReader(SqlHelper.ConnectionStringLocalTransaction, CommandType.Text, SqlText.SQL_SELECT_LSC_GETRESERVATIONODES, parms)) {
                while (rdr.Read())
                {
                    var entity = new NodeInReservationInfo {
                        ReservationId = ComUtility.DBNullStringHandler(rdr["ReservationId"]),
                        NodeId        = ComUtility.DBNullStringHandler(rdr["NodeId"]),
                        NodeType      = ComUtility.DBNullResNodeHandler(rdr["NodeType"])
                    };

                    entities.Add(entity);
                }
            }

            return(entities);
        }