Exemplo n.º 1
0
 public ActionResult Index(HIVtestUpload upload)
 {
     //int patientId = Convert.ToInt32(System.Web.HttpContext.Current.Session["Id"]);
     if (!ModelState.IsValid)
     {
         return(View(upload));
     }
     ee.InsertM(upload, upload.PatientId);
     return(RedirectToAction("DownaloadFiles", "HIVTestFileUpload", new { PatientId = upload.PatientId }));
 }
Exemplo n.º 2
0
        // GET: HIVTestFileUpload
        public ActionResult Index(int PatientId)
        {
            //System.Web.HttpContext.Current.Session["Id"] = PatientId;
            var model = new HIVtestUpload()
            {
                patientName = ee.getpatientId(PatientId),
                PatientId   = PatientId
            };

            return(View(model));
        }
        public void InsertM(HIVtestUpload HIV, int PatientId)
        {
            HIVPatientFile    upload     = new HIVPatientFile();
            PatientRepository patientrep = new PatientRepository();

            using (var PFilerep = new HIVTestUploadRepository())
            {
                var Pname = patientrep.GetAll().Find(x => x.PatientId == PatientId);
                foreach (var Pfile in HIV.File)
                {
                    byte[] uploadfile = new byte[Pfile.InputStream.Length];
                    Pfile.InputStream.Read(uploadfile, 0, uploadfile.Length);
                    upload.FileName    = Pfile.FileName;
                    upload.File        = uploadfile;
                    upload.PatientId   = PatientId;
                    upload.patientName = Pname.FullName + " " + Pname.Surname;
                    PFilerep.Insert(upload);
                }
            }
        }
Exemplo n.º 4
0
        public ActionResult Main()
        {
            var model = new HIVtestUpload();

            return(PartialView(model));
        }