Exemplo n.º 1
0
        public Patient(fio fio, PatientCategory category, Firm firm)
        {
            Id                 = fio.id;
            MedicalCard        = fio.nomer.ToString();
            DateOfRegistration = fio.datar;
            FullName           = fio.fio_name;
            Adress             = fio.adres;
            Sale               = fio.sales ?? 0;
            Remark             = fio.prim;
            Contraindications  = fio.proti;
            IsPublic           = fio.zagal ?? true;
            if (fio.fio_name.ToLower().Contains("знищити") || fio.fio_name.ToLower().Contains("архів") ||
                fio.fio_name.ToLower().Contains("з н и щ и т и"))
            {
                IsArchive = true;
            }
            else
            {
                IsArchive = false;
            }

            if (fio.foto != null)
            {
                Image img = new Bitmap(new MemoryStream(fio.foto));
                img.Save(Constants.IconSavePath + FullName + ".png");
                IconPath = Constants.IconSavePath + FullName + ".png";
            }
            else
            {
                IconPath = Constants.NullIconPhotoPath;
            }

            PatientCategory = category;
            Firm            = firm;
        }
Exemplo n.º 2
0
 public PhoneNumber(Patient patient, fio fio, bool isfirst)
 {
     if (isfirst)
     {
         if (!string.IsNullOrEmpty(fio.tel1))
         {
             Phone = fio.tel1;
         }
         else
         {
             Phone = "";
         }
     }
     else
     if (!string.IsNullOrEmpty(fio.tel2))
     {
         Phone = fio.tel2;
     }
     else
     {
         Phone = "";
     }
     Patient = patient;
 }