Ejemplo n.º 1
0
        //
        // Product Label

        //
        /// <summary>
        /// Returns the list of Product Labels in the database.
        /// </summary>
        /// <returns></returns>
        public static List <ProductLabel> GetProductLabels()
        {
            List <ProductLabel> products = new List <ProductLabel>();
            ProductLabel        t;
            string query = "SELECT * FROM Labels.FN_ListProductLabels() ORDER BY Product";

            using (SqlDataAdapter sql = new SqlDataAdapter())
                using (SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["ISISConnectionString"].ConnectionString))
                {
                    conn.Open();

                    sql.SelectCommand = new SqlCommand(query, conn);

                    try
                    {
                        using (SqlDataReader rdr = sql.SelectCommand.ExecuteReader())
                        {
                            while (rdr.Read())
                            {
                                t = new ProductLabel((int)rdr["ID"], (string)rdr["Product"]);

                                products.Add(t);
                            }
                        }
                    }
                    catch (Exception)
                    {
                    }
                }

            return(products);
        }
Ejemplo n.º 2
0
        public RefVariableName(string refvarname)
        {
            refVarName = refvarname;

            VarLabel = "";
            Domain   = new DomainLabel(0, "No Domain");
            Topic    = new TopicLabel(0, "No Topic");
            Content  = new ContentLabel(0, "No Content");
            Product  = new ProductLabel(0, "Unassigned");
        }
Ejemplo n.º 3
0
        public VariableName(string varname)
        {
            FullVarName = varname;

            RefVarName = Utilities.ChangeCC(varname);

            VarLabel = "";
            Domain   = new DomainLabel(0, "No Domain");
            Topic    = new TopicLabel(0, "No Topic");
            Content  = new ContentLabel(0, "No Content");
            Product  = new ProductLabel(0, "Unassigned");
        }
Ejemplo n.º 4
0
        public VariableName()
        {
            FullVarName = "";

            RefVarName = "";

            VarLabel = "";
            Domain   = new DomainLabel(0, "No Domain");
            Topic    = new TopicLabel(0, "No Topic");
            Content  = new ContentLabel(0, "No Content");
            Product  = new ProductLabel(0, "Unassigned");
        }
Ejemplo n.º 5
0
 public ProductLabel(ProductLabel product)
 {
     ID        = product.ID;
     LabelText = product.LabelText;
 }