public static void Remove(Unit unit)
 {
     SQL_methods.SQL_exec(string.Format(
                              "DELETE FROM units " +
                              "WHERE id = '{0}'",
                              unit.ID));
 }
 public static void Remove(Category category)
 {
     SQL_methods.SQL_exec(string.Format(
                              "DELETE FROM categories " +
                              "WHERE id = '{0}'",
                              category.ID));
 }
 //Lerchner Felix
 public static void Remove(Property property)
 {
     SQL_methods.SQL_exec(string.Format(
                              "DELETE FROM properties " +
                              "WHERE id = '{0}'",
                              property.ID));
 }
Пример #4
0
 //Lerchner Felix
 public static void Save(Item item)
 {
     SQL_methods.SQL_exec(string.Format(
                              "INSERT INTO storage_elements " +
                              "(element_name, element_description, element_unit_id, element_category_id, element_size_l, element_size_w, element_size_h, element_image, element_dataID) " +
                              "VALUES " +
                              "('{0}', '{1}', {2}, {3}, {4}, {5}, {6}, '{7}', '{8}')",
                              item.Name, item.Description, item.Unit.ID, item.Category.ID, item.Length, item.Width, item.Height, item.Image, item.Artikelnummer));
 }
 /// <summary>
 /// Error by Lerchner der Beichtner
 /// </summary>
 /// <param name="unit"></param>
 public static void Save(Unit unit)
 {
     SQL_methods.SQL_exec(string.Format(
                              "INSERT INTO units " +
                              "(unit_si, unit_name, unit_description)" +
                              "VALUES " +
                              "('{0}', '{1}', '{2}')",
                              unit.SI_Unit, unit.Name, unit.Description));
 }
 public static void Save(Category category)
 {
     SQL_methods.SQL_exec(string.Format(
                              "INSERT INTO categories " +
                              "(category_name, category_description)" +
                              "VALUES " +
                              "('{0}', '{1}')",
                              category.Name, category.Description));
 }
 //Lerchner Felix
 public static void Save(Property property)
 {
     SQL_methods.SQL_exec(string.Format(
                              "INSERT INTO properties " +
                              "(property_name, property_description)" +
                              "VALUES " +
                              "('{0}', '{1}')",
                              property.Name, property.Description));
 }
Пример #8
0
 //Lerchner Felix
 public static void Deactivate(Item item)
 {
     SQL_methods.SQL_exec("UPDATE storage_elements SET active = false WHERE id = " + item.ID);
 }