Exemple #1
0
        public void PopulateListOfMachines(SQLiteConnection conn, List <string> listOfMachinesNumbers)
        {
            var listOfMachines = conn.Table <Machine>().ToList();

            ListOfMachines.Clear();

            foreach (var machine in listOfMachines)
            {
                ListOfMachines.Add(machine);
            }
        }
Exemple #2
0
    static void Main(string[] args)
    {
        var lst = new ListOfMachines();

        lst.Add(new MachineInfo {
            Head = "Sports", Item = "Porshe 911", Quantity = 100
        });
        lst.Add(new MachineInfo {
            Head = "Sports", Item = "Porshe 912", Quantity = 200
        });
        lst.Add(new MachineInfo {
            Head = "Luxury", Item = "BMW 3 Series", Quantity = 300
        });
        lst.Add(new MachineInfo {
            Head = "Small", Item = "Toyouta Corolla", Quantity = 400
        });
        lst.Add(new MachineInfo {
            Head = "Small", Item = "Mitsubish Lancer", Quantity = 500
        });
        lst.Add(new MachineInfo {
            Head = "Small", Item = "Mitsubish Lancer 2", Quantity = 600
        });
        var json = lst.ToJson();
    }