示例#1
0
        public ScanResultPage(string barcode)
        {
            InitializeComponent();
            BarcodeLabel.Text      = "Barcode Text: ";
            BarcodeScanResult.Text = barcode;
            OpenFood openFood = DependencyService.Get <IProductClient>().GetOpenFood(barcode);

            ProductNameLabel.Text  = "Is this your product? ";
            ProductScanResult.Text = openFood.Product?.ProductName;
            IngredientsLabel.Text  = "Ingredients: " + openFood.Product?.Ingredients;
        }
示例#2
0
        public PartialViewResult DispatchOpenFood(BillOpenFoodModel model)
        {
            int      oulte = xml.getOutletId();
            OpenFood food  = new OpenFood();

            food.Date     = DateTime.Now.Date;
            food.ItemName = model.OpenFoodName;
            food.OutletId = oulte;
            food.Price    = model.OpenFoodPrice;
            food.Quantity = model.OpenFoodQuantity;
            food.Amount   = model.OpenFoodPrice * model.OpenFoodQuantity;
            food.Vat      = model.OpenFoodVat;
            db.OpenFoods.Add(food);
            db.SaveChanges();
            var             Path        = Server.MapPath("/xmltables/table" + model.TableNo + ".xml");
            var             KotFilePath = Server.MapPath("~/xmlkot/Kot.xml");
            GetBillingModel m           = new GetBillingModel();

            nibsrepo.SaveXmlOpenFood(model, Path, KotFilePath);
            m = xml.GetBillingItem(model.TableNo.ToString(), Path, KotFilePath);
            return(PartialView("_CreatePartial", m));
        }