예제 #1
0
        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);
        }
예제 #2
0
 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}');");
     }
 }
예제 #3
0
 public void UpdateState(string state)
 {
     this.state = state;
     InternalApp.ExecuteQuery($"UPDATE bike SET cstr_status='{state}' WHERE id='{this.id}'");
 }
예제 #4
0
 public void UpdateDate(string date)
 {
     InternalApp.ExecuteQuery($"UPDATE planning SET date='{date}' WHERE bike='{this.id}'");
 }
예제 #5
0
 public void Use()
 {
     stock -= quantity;
     InternalApp.ExecuteQuery($"UPDATE parts_stock SET quantity={stock} WHERE reference='{reference}'");
 }