Пример #1
0
        public static bool AddBarInfo(string itemName, string fieldName, BarFieldType fieldType, string fieldValue, bool isEditable)
        {
            var querySql = "INSERT INTO bar_info (item_name, bar_field_name, bar_field_type, bar_field_value, is_editable) VALUES " +
                           "('" + itemName + "','" + fieldName + "', '" + Convert.ToInt32(fieldType) + "', '" + fieldValue + "', " + isEditable + ")";

            return(NonQueryData(querySql));
        }
Пример #2
0
        public static bool UpdateBarInfo(int id, string itemName, string fieldName, BarFieldType fieldType, string fieldValue, bool isEditable)
        {
            var querySql = "UPDATE bar_info SET item_name = '" + itemName + "', bar_field_name = '" + fieldName + "'," +
                           "bar_field_type = '" + Convert.ToInt32(fieldType) + "', bar_field_value = '" + fieldValue + "', is_editable = " + isEditable + " WHERE id = " + id + "";

            return(NonQueryData(querySql));
        }