Пример #1
0
        private Cerere BuildCerereSave()
        {
            Cerere cerere = new Cerere();

            cerere.Data      = DateTime.Now.Date.ToShortDateString();
            cerere.Efectuata = false;
            TipRh      RH    = (TipRh)Enum.Parse(typeof(TipRh), comboBoxRH.Text);
            GrupaSange grupa = (GrupaSange)Enum.Parse(typeof(GrupaSange), comboBoxGrupa.Text);

            cerere.Grupa = grupa;
            cerere.RH    = RH;
            Int32 total, plasma, trombocite, globule;



            if (textBoxTotal.Enabled)
            {
                total = Int32.Parse(textBoxTotal.Text);
                cerere.CantitateSange = total;
            }

            else
            {
                plasma     = Int32.Parse(textBoxPlasma.Text);
                trombocite = Int32.Parse(textBoxTrombocite.Text);
                globule    = Int32.Parse(textBoxGlobule.Text);
                total      = plasma + trombocite + globule;
                cerere.CantitateGlobuleRosii = globule;
                cerere.CantitatePlasma       = plasma;
                cerere.CantitateTrombocite   = trombocite;
                cerere.CantitateSange        = total;
            }

            return(cerere);
        }
Пример #2
0
 public Analiza(GrupaSange grupa, TipRh rh, bool hIV, bool hepatitaB, bool hepatitaC, bool sifilis, bool hTLV, int nivelALT)
 {
     Grupa     = grupa;
     Rh        = rh;
     HIV       = hIV;
     HepatitaB = hepatitaB;
     HepatitaC = hepatitaC;
     Sifilis   = sifilis;
     HTLV      = hTLV;
     NivelALT  = nivelALT;
 }
Пример #3
0
 public Stoc(GrupaSange grupa, TipRh tipRh)
 {
     Grupa              = grupa;
     RH                 = tipRh;
     Trombocite         = 0;
     GlobuleRosii       = 0;
     Plasma             = 0;
     TermenTrombocite   = 0;
     TermenGlobuleRosii = 0;
     TermenPlasma       = 0;
 }
Пример #4
0
 public Stoc(float totalSange, float trombocite, float globuleRosii, float plasma, int termenTrombocite, int termenGlobuleRosii, int termenPlasma, GrupaSange grupa, TipRh rH)
 {
     TotalSange         = totalSange;
     Trombocite         = trombocite;
     GlobuleRosii       = globuleRosii;
     Plasma             = plasma;
     TermenTrombocite   = termenTrombocite;
     TermenGlobuleRosii = termenGlobuleRosii;
     TermenPlasma       = termenPlasma;
     Grupa = grupa;
     RH    = rH;
 }
Пример #5
0
 public Cerere(string data, float cantitateSange, float cantitateTrombocite, float cantitateGlobuleRosii, float cantitatePlasma, bool efectuata, Medic m, GrupaSange grupaSange, TipRh tipRh)
 {
     Data                  = data;
     CantitateSange        = cantitateSange;
     CantitateTrombocite   = cantitateTrombocite;
     CantitateGlobuleRosii = cantitateGlobuleRosii;
     CantitatePlasma       = cantitatePlasma;
     Efectuata             = efectuata;
     Medic                 = m;
     CererePacienti        = new List <CererePacient>();
     Grupa                 = grupaSange;
     RH             = tipRh;
     CererePacienti = new List <CererePacient>();
 }
Пример #6
0
        public void AddAnaliza(GrupaSange grupa, TipRh rh, bool hIV, bool hepatitaB, bool hepatitaC, bool sifilis, bool hTLV, int nivelALT, PungaSange punga, Donator donator)
        {
            using (UnitOfWork unitOfWork = new UnitOfWork())
            {
                Analiza    analiza = new Analiza(grupa, rh, hIV, hepatitaB, hepatitaC, sifilis, hTLV, nivelALT);
                PungaSange pungaS  = unitOfWork.PungaSangeRepo.GetBy(p => p.Id.Equals(punga.Id));
                analiza.Donator    = unitOfWork.DonatorRepo.GetBy(p => p.Id.Equals(donator.Id));
                analiza.PungaSange = pungaS;
                unitOfWork.AnalizaRepo.Save(analiza);
                unitOfWork.Save();

                //setare analiza pt punga de sange
                pungaS.Analiza = analiza;
                UpdatePungaSange(pungaS);
            }
        }