Esempio n. 1
0
        public async void GenerateCustomerView(Customer SelectedCustomer)
        {
            CustomerViewInformation Fetched = await App.CustomersManagement.RetrieveCustomerView(SelectedCustomer);

            ViewQRCodeSource    = Fetched.RetrievedQRImage;
            ViewLabelListSource = Fetched.RetrievedLabels;
        }
Esempio n. 2
0
        public async Task <CustomerViewInformation> RetrieveCustomerView(Customer CustomerInformation)
        {
            try
            {
                CustomerViewInformation customerViewInformation = new CustomerViewInformation();
                if (IsOnline)
                {
                    l = await App.FirebaseManagement.FetchAllLabels();

                    customerViewInformation.RetrievedLabels = await App.FirebaseManagement.FetchCustomerLabels(CustomerInformation.Key);

                    App.OfflineManagement.OfflineExport(OfflineConfig.CustomerLabels, labels: customerViewInformation.RetrievedLabels, key: CustomerInformation.Key);
                }
                else
                {
                    customerViewInformation.RetrievedLabels = App.OfflineManagement.OfflineImport <List <TLabel> >(OfflineConfig.CustomerLabels, CustomerInformation.Key);
                }
                customerViewInformation.RetrievedQRImage = App.BarcodeManagement.GenerateDisplayQR(CustomerInformation.Key);
                return(customerViewInformation);
            }
            catch (Exception e)
            {
                Console.Write(e);
                return(null);
            }
        }
Esempio n. 3
0
        public async void PrintQR(Customer SelectedCustomer)
        {
            CustomerViewInformation Fetched = await App.CustomersManagement.RetrieveCustomerView(SelectedCustomer);

            var BitmapQR = Fetched.RetrievedQRImage;

            PrintManage.Print(BitmapQR);
        }