public static int GetNewId(string name) { List <Row> table = Access.getObjects(SQL_Queries.Select(name)); if (table != null) { try { return(int.Parse(table[table.Count - 1].GetColValue(0).ToString()) + 1); } catch (Exception err) { } } return(-1); }
public static void FilterOrders(List <CheckBox> boxes, List <object> values) { List <Condition> conditions = new List <Condition>(); List <Row> table = new List <Row>(); filter_Orders.Clear(); conditions.Add(new Condition("customer", user_id)); bool num = false; string value = ""; for (int i = 0; i < boxes.Count; i++) { if (boxes[i].Name != "recipt") { conditions.Add(Create_Condition(boxes[i], values[i])); } else { num = true; value = values[i].ToString(); } } if (num) { table = Access.getObjects(SQL_Queries.Select("orders", conditions, "and")); foreach (Row row in table) { if (row.GetColValue("id").ToString().Contains(value)) { filter_Orders.Add(row); } } } else { filter_Orders = Access.getObjects(SQL_Queries.Select("orders", conditions, "and")); } }
public static void Reload_Orders() { orders = Access.getObjects(SQL_Queries.Select("orders")); }
public static void Reload_Order_Treatments() { order_treatments = Access.getObjects(SQL_Queries.Select("order_treatment")); }
public static void Reload_Shifts() { shifts = Access.getObjects(SQL_Queries.Select("shifts")); }
public static void Reload_Manufactors() { manufactors = Access.getObjects(SQL_Queries.Select("manfuactors")); }
public static void Reload_Models() { models = Access.getObjects(SQL_Queries.Select("models")); }
public static void Reload_Treatments() { treatments = Access.getObjects(SQL_Queries.Select("treatments")); }
public static void Reload_Cars() { cars = Access.getObjects(SQL_Queries.Select("cars")); }
public static void Reload_Workers() { workers = Access.getObjects(SQL_Queries.Select("workers")); }
public static void Reload_People() { users = Access.getObjects(SQL_Queries.Select("people")); }