public void SaveNewPart(string name, string provider, string description) { this.name = name; string query = $"INSERT INTO `parts_catalog` (`reference`, `name`, `provider`, `description`) VALUES ('{this.reference}', '{this.name}', '{provider}', '{description}')"; InternalApp.ExecuteQuery(query); }
public void SaveModel() //needs to be cleaned, create methods in database GetData and SendData { InternalApp.ExecuteQuery($"INSERT into model_catalog(name, price) values('{type}', '{price}');"); foreach (Part part in partList) { InternalApp.ExecuteQuery($"INSERT into model_structure(model_name, reference, quantity) values('{type}','{part.reference}', '{part.quantity}');"); } }
public void UpdateState(string state) { this.state = state; InternalApp.ExecuteQuery($"UPDATE bike SET cstr_status='{state}' WHERE id='{this.id}'"); }
public void UpdateDate(string date) { InternalApp.ExecuteQuery($"UPDATE planning SET date='{date}' WHERE bike='{this.id}'"); }
public void Use() { stock -= quantity; InternalApp.ExecuteQuery($"UPDATE parts_stock SET quantity={stock} WHERE reference='{reference}'"); }