Exemple #1
0
        internal void ManageCustomers(bool isCreating)
        {
            inAppBehavior.MenuItemEntry("Register new Customer", "Update Customer", isCreating);

            int      id        = reader.ReadInt("Client ID: ");
            string   name      = reader.ReadString("Client Name: ");
            DateTime birthDate = reader.ReadDate("Birth Date: ");
            string   location  = reader.ReadString("Location: ");

            QueryCustomer queryCustomer = new QueryCustomer
            {
                CustomId   = id,
                Name       = name,
                BirthDate  = birthDate,
                Location   = location,
                IsCreating = isCreating
            };

            PushModel(queryCustomer, isCreating, contextManager.ManageCustomers, ManageCustomers);
        }
Exemple #2
0
        internal void GetAvailableCars(string orderBy = "Id", int propIndex = 0)
        {
            inAppBehavior.MenuItemEntry("List Available Cars");

            localhost.AvailableCarsService webService = new localhost.AvailableCarsService();
            localhost.QueryCar[]           cars       = webService.GetAvailableCars(orderBy, searchItem as localhost.QueryCar);

            PropertyInfo[] properties = typeof(localhost.QueryCar).GetProperties();
            string[]       labels     = { "Car Plate", "Car Manufacturer", "Car Model", "Start Date", "EndDate", "City" };

            PrintList(labels, properties, cars);

            Set(propIndex, properties, GetAvailableCars, labels.Length, orderBy);
            PrepareOrderBy(orderBy);
        }