public async void GenerateCustomerView(Customer SelectedCustomer) { CustomerViewInformation Fetched = await App.CustomersManagement.RetrieveCustomerView(SelectedCustomer); ViewQRCodeSource = Fetched.RetrievedQRImage; ViewLabelListSource = Fetched.RetrievedLabels; }
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); } }
public async void PrintQR(Customer SelectedCustomer) { CustomerViewInformation Fetched = await App.CustomersManagement.RetrieveCustomerView(SelectedCustomer); var BitmapQR = Fetched.RetrievedQRImage; PrintManage.Print(BitmapQR); }