Esempio n. 1
0
        public static void Delete(string constructionCode)
        {
            string sql = @"
                DELETE FROM JboxColorEntries
                WHERE
                    ConstructionCode = '" + constructionCode + "'";

            var db = JboxColorEntry.GetDatabase();

            db.ExecuteNonQuery(sql);
        }
Esempio n. 2
0
        public static List <JboxColorEntry> Get(string constructionCode, string orderColumn)
        {
            string sql = @"
                SELECT * FROM JboxColorEntries
                WHERE
                    ConstructionCode = '" + constructionCode + @"'
                ORDER BY " + orderColumn;

            var db = JboxColorEntry.GetDatabase();

            return(db.ExecuteQuery <JboxColorEntry>(sql));
        }
Esempio n. 3
0
        public static List <JboxItem> GetItem(JboxColorEntry entry)
        {
            string sql = String.Format(@"
                SELECT I.* 
                FROM JboxItems I 
                WHERE I.SymbolName = '{0}'
                AND I.ColorId = '{1}'
                AND I.LengthMax >= {2}
                AND I.LengthMin <= {2}", entry.JboxEquipmentName, entry.JboxColorId, entry.WireLength);

            var db = JboxItem.GetDatabase();

            return(db.ExecuteQuery <JboxItem>(sql));
        }