Пример #1
0
        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);
        }
Пример #2
0
        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"));
            }
        }
Пример #3
0
 public static void Reload_Orders()
 {
     orders = Access.getObjects(SQL_Queries.Select("orders"));
 }
Пример #4
0
 public static void Reload_Order_Treatments()
 {
     order_treatments = Access.getObjects(SQL_Queries.Select("order_treatment"));
 }
Пример #5
0
 public static void Reload_Shifts()
 {
     shifts = Access.getObjects(SQL_Queries.Select("shifts"));
 }
Пример #6
0
 public static void Reload_Manufactors()
 {
     manufactors = Access.getObjects(SQL_Queries.Select("manfuactors"));
 }
Пример #7
0
 public static void Reload_Models()
 {
     models = Access.getObjects(SQL_Queries.Select("models"));
 }
Пример #8
0
 public static void Reload_Treatments()
 {
     treatments = Access.getObjects(SQL_Queries.Select("treatments"));
 }
Пример #9
0
 public static void Reload_Cars()
 {
     cars = Access.getObjects(SQL_Queries.Select("cars"));
 }
Пример #10
0
 public static void Reload_Workers()
 {
     workers = Access.getObjects(SQL_Queries.Select("workers"));
 }
Пример #11
0
 public static void Reload_People()
 {
     users = Access.getObjects(SQL_Queries.Select("people"));
 }