public IActionResult BarcodeUploading(IFormFile file) { var barcodeService = new BarcodeService(); var barcode = barcodeService.GetBarcode(file); return(RedirectToAction("SearchWithBarcode", new { barcode = barcode })); }
public IActionResult GetBarcode() { if (HttpContext.Request.Form.Files.Count > 0) { var image = HttpContext.Request.Form.Files.GetFile("file"); var barcodeService = new BarcodeService(); var barcode = barcodeService.GetBarcode(image); return(Content(barcode)); } return(StatusCode(400)); }
private Prescription CreatePrescription(NewPrescription data) { return(new Prescription { IdNumber = data.PresciptionId, CreationDate = DateTime.Now, Drugs = data.Drugs, ForPatient = data.For, IdNumberBarcode = BarcodeService.GetBarcode(data.PresciptionId), NfzWardId = data.NfzWardId, Permission = data.Permission, PrescribedByCompany = data.Company, PrescribedByCompanyBarcode = BarcodeService.GetBarcode(data.Company), PrescribedByDoctor = data.By, ValidFrom = data.ValidFrom, PlacedBy = data.PlacedBy }); }