public static System.Collections.Generic.List <EyeWash_Service> GetBatteryListExpiredEmail(int CompanyID)
        {
            System.Collections.Generic.List <EyeWash_Service> result = new System.Collections.Generic.List <EyeWash_Service>();
            int      ID = -1;
            DBAccess db = new DBAccess();

            db.AddInt("CompanyID", CompanyID);

            db.AddBoolean("IsAgent", AdgangsKontrol.IsAgent());
            db.AddGuid("AgentID", CurrentUserID);

            SqlDataReader dr = default(SqlDataReader);

            try
            {
                dr = (System.Data.SqlClient.SqlDataReader)(db.ExecuteReader(_SQLSelectAllExpiredEmail));
                if (dr.HasRows)
                {
                    while (dr.Read())
                    {
                        ID = System.Convert.ToInt32(dr.DBtoInt("ID"));
                        result.Add(EyeWash_Service.GetService(ID));
                    }
                }
                dr.Close();
            }
            catch (Exception ex)
            {
                throw (ex);
            }

            return(result);
        }
        public static List <EyeWash_Service> GetServicesByEYE(int EYE_FK)
        {
            List <EyeWash_Service> result = new List <EyeWash_Service>();
            int      ID = -1;
            DBAccess db = new DBAccess();

            db.AddInt("EYE_FK", EYE_FK);

            db.AddBoolean("IsAgent", AdgangsKontrol.IsAgent());
            db.AddGuid("AgentID", CurrentUserID);

            SqlDataReader dr = default(SqlDataReader);

            try
            {
                dr = (System.Data.SqlClient.SqlDataReader)(db.ExecuteReader(_SQLSelectByEYE));
                if (dr.HasRows)
                {
                    while (dr.Read())
                    {
                        ID = System.Convert.ToInt32(dr.DBtoInt("ID"));
                        result.Add(EyeWash_Service.GetService(ID));
                    }
                }
                dr.Close();
            }
            catch (Exception ex)
            {
                throw (ex);
            }

            return(result);
        }