Example #1
0
        public IActionResult BarcodeUploading(IFormFile file)
        {
            var barcodeService = new BarcodeService();
            var barcode        = barcodeService.GetBarcode(file);

            return(RedirectToAction("SearchWithBarcode", new { barcode = barcode }));
        }
Example #2
0
 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));
 }
Example #3
0
 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
     });
 }