public IList<VirtualLabDataSub> GetByLabID(Guid id)
        {
            IList<Core.Business.VirtualLabDataSub> virtualLabDataSublist = new List<Core.Business.VirtualLabDataSub>();
            SqlServerUtility sql = new SqlServerUtility();
            sql.AddParameter("@LabID", SqlDbType.UniqueIdentifier, id);

            SqlDataReader reader = sql.ExecuteSPReader("usp_SelectVirtualLabDataSubByLabID");

            if (reader != null)
            {
                while (reader.Read())
                {
                    Core.Business.VirtualLabDataSub virtualLabDataSub = new Core.Business.VirtualLabDataSub();

                    if (!reader.IsDBNull(0)) virtualLabDataSub.Id = reader.GetGuid(0);
                    if (!reader.IsDBNull(1)) virtualLabDataSub.Name = reader.GetString(1);
                    if (!reader.IsDBNull(2)) virtualLabDataSub.FrontID = reader.GetGuid(2);
                    if (!reader.IsDBNull(3)) virtualLabDataSub.LabID = reader.GetGuid(3);
                    virtualLabDataSub.MarkOld();
                    virtualLabDataSublist.Add(virtualLabDataSub);
                }
                reader.Close();
            }
            return virtualLabDataSublist;
        }
        public IList<Core.Business.VirtualLabDataSub> GetAllVirtualLabDataSub()
        {
            IList<Core.Business.VirtualLabDataSub> virtualLabDataSublist = new List<Core.Business.VirtualLabDataSub>();
            SqlServerUtility sql = new SqlServerUtility();

            SqlDataReader reader = sql.ExecuteSPReader("usp_SelectVirtualLabDataSubsAll");

            if(reader != null)
            {
                while(reader.Read())
                {
                    Core.Business.VirtualLabDataSub virtualLabDataSub = new Core.Business.VirtualLabDataSub();

                    if (!reader.IsDBNull(0)) virtualLabDataSub.Id = reader.GetGuid(0);
                    if (!reader.IsDBNull(1)) virtualLabDataSub.Name = reader.GetString(1);
                    if (!reader.IsDBNull(2)) virtualLabDataSub.FrontID = reader.GetGuid(2);
                    if (!reader.IsDBNull(3)) virtualLabDataSub.LabID = reader.GetGuid(3);
                    virtualLabDataSub.MarkOld();
                    virtualLabDataSublist.Add(virtualLabDataSub);
                }
                reader.Close();
            }
            return virtualLabDataSublist;
        }
        public IList<Core.Business.VirtualLabDataSub> GetBySql(string sqlwhere)
        {
            IList<Core.Business.VirtualLabDataSub> virtualLabDataSublist = new List<Core.Business.VirtualLabDataSub>();
            SqlServerUtility sql = new SqlServerUtility();
            string sqlstr = "SELECT * FROM [dbo].[VirtualLabDataSub] where ";
            sqlstr += sqlwhere;
            SqlDataReader reader = sql.ExecuteSqlReader(sqlstr);

            if (reader != null)
            {
                while (reader.Read())
                {
                    Core.Business.VirtualLabDataSub virtualLabDataSub = new Core.Business.VirtualLabDataSub();

                    if (!reader.IsDBNull(0)) virtualLabDataSub.Id = reader.GetGuid(0);
                    if (!reader.IsDBNull(1)) virtualLabDataSub.Name = reader.GetString(1);
                    if (!reader.IsDBNull(2)) virtualLabDataSub.FrontID = reader.GetGuid(2);
                    if (!reader.IsDBNull(3)) virtualLabDataSub.LabID = reader.GetGuid(3);
                    virtualLabDataSub.MarkOld();
                    virtualLabDataSublist.Add(virtualLabDataSub);
                }
                reader.Close();
            }
            return virtualLabDataSublist;
        }