/// <summary> /// Implementace <see cref="IBROPacient.NactiPacienta(long)"/> /// </summary> /// <param name="aRC"></param> /// <returns></returns> public BDOPacient NactiPacienta(long aRC) { BDOPacient Pacient = (from p in DBConnection.DBModel.BDOPacient where p.RodneCislo == aRC select p).FirstOrDefault(); return(Pacient); }
/// <summary> /// Implementace <see cref="IBROPacient.NactiPacienta(string)"/> /// </summary> /// <param name="aEmail"></param> /// <returns></returns> public BDOPacient NactiPacienta(string aEmail) { BDOPacient Pacient = (from p in DBConnection.DBModel.BDOPacient where p.Email == aEmail select p).FirstOrDefault(); return(Pacient); }
public bool ExistujePacient(string aEmail, string aHeslo) { BDOPacient Pacient = (from p in DBConnection.DBModel.BDOPacient where p.Email == aEmail && p.Heslo == aHeslo select p).FirstOrDefault(); return(Pacient != null); }
protected void gwSeznamNactenychPacient_DataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { BDOPacient pacient = (BDOPacient)e.Row.DataItem; ImageButton btnPridatPacienta = (ImageButton)e.Row.FindControl("btnPridatPacienta"); btnPridatPacienta.CommandArgument = pacient.RodneCislo.ToString(); } }
public void PridatPacienta(BDOLekar aLekar, BDOPacient aPacient) { BDOLekarPacient lp = new BDOLekarPacient(); lp.Pacient = aPacient; lp.Lekar = aLekar; lp.Heslo = ""; CUDFacade.Create(lp); }
protected void PridatPacienta(object sender, CommandEventArgs e) { ImageButton btn = (ImageButton)sender; //načtu pacienta z řádku v GridView long rc = Convert.ToInt64(btn.CommandArgument); BDOPacient pacient = MedicinaFacade.BROPacient.NactiPacienta(rc); //načtu přihlášeného lékaře string email = Context.User.Identity.Name; BDOLekar lekar = MedicinaFacade.BROLekar.NactiLekare(email); MedicinaFacade.BROLekar.PridatPacienta(lekar, pacient); }
protected void Page_Load(object sender, EventArgs e) { long rc = Convert.ToInt64(Request.QueryString["rc"]); lblRC.Text = Convert.ToString(rc); BDOPacient pacient = MedicinaFacade.BROPacient.NactiPacienta(rc); lblEmail.Text = pacient.Email; lblTelefon.Text = Convert.ToString(pacient.Telefon); lblUlice.Text = pacient.Adresa.Ulice; lblObec.Text = pacient.Adresa.Obec; lblPSC.Text = pacient.Adresa.PSC; lblJmeno.Text = pacient.Jmeno; lblPrijmeni.Text = pacient.Prijmeni; }
protected void ibtnNajitPacient_Click(object sender, ImageClickEventArgs e) { BDOPacient pacient = MedicinaFacade.BROPacient.NactiPacienta(Convert.ToInt64(rcPacienta.Text)); if (pacient == null) { lblNebylNalezen.Visible = true; gwSeznamNactenychPacientu.Visible = false; } else { gwSeznamNactenychPacientu.Visible = true; lblNebylNalezen.Visible = false; gwSeznamNactenychPacientu.DataSource = new List <BDOPacient> { pacient }; gwSeznamNactenychPacientu.DataBind(); } }
protected void btnRegistrujPacienta_Click(object sender, EventArgs e) { if (Page.IsValid) { BDOPacient Pacient = new BDOPacient(); Pacient.Email = tbEmail.Text; Pacient.Jmeno = tbJmeno.Text; Pacient.Prijmeni = tbPrijmeni.Text; Pacient.Telefon = Int32.Parse(tbTelefon.Text); Pacient.RodneCislo = Int64.Parse(tbRC.Text); Pacient.Adresa = new BDOAdresa(); Pacient.Adresa.CP = tbCP.Text; Pacient.Adresa.Obec = tbObec.Text; Pacient.Adresa.PSC = tbPSC.Text; Pacient.Adresa.Ulice = tbUlice.Text; Pacient.Email = tbEmail.Text; Pacient.Heslo = tbHeslo.Text; Pacient.Heslo = sha512encrypt(tbHeslo.Text); MedicinaFacade.BROPacient.VytvorPacienta(Pacient); } }