//public override string ToString() //{ // return this.nume + ", cu diagnosticul: " + this.denumire_boala; //} public static Pacienti operator ~(Pacienti p) { string teste_necesare = "teste necesare"; Pacienti nou = new Pacienti(p.id_pacient, p.nume, p.varsta, p.denumire_boala, p.grupa_sange, teste_necesare, p.CNP, p.medic); return(nou); }
public Retete(int nr_crt, Pacienti p, Medici m, string[] medicament, int cantitate, double pret, DateTime date) { this.nr_crt = nr_crt; this.pacient = p.Nume; this.medic = m.Nume; this.cantitate_med = cantitate; this.medicament = new string[cantitate]; this.medicament = medicament; this.pret = pret; this.data = date; }
public Form_adauga_pacient(Pacienti p) { pacient = p; InitializeComponent(); numeTXT.Text = pacient.Nume; varstaTXT.Text = pacient.Varsta.ToString(); boalaTXT.Text = pacient.Denumire_boala; grupaSangeTXT.Text = pacient.Grupa_sange; alergiiTXT.Text = pacient.Alergii; cnpTXT.Text = pacient.Cnp; medicTXT.Text = pacient.Medic; }
public void UpdateList() { listView1.Items.Clear(); OleDbConnection conexiune = new OleDbConnection(Provider); string sql = "SELECT * FROM pacienti;"; OleDbCommand comanda = new OleDbCommand(sql, conexiune); try { conexiune.Open(); OleDbDataReader reader = comanda.ExecuteReader(); while (reader.Read()) { ListViewItem item = new ListViewItem(reader["id_pacient"].ToString()); item.SubItems.Add(reader["nume"].ToString()); item.SubItems.Add(reader["varsta"].ToString()); item.SubItems.Add(reader["denumire_boala"].ToString()); item.SubItems.Add(reader["grupa_sange"].ToString()); item.SubItems.Add(reader["alergii"].ToString()); item.SubItems.Add(reader["CNP"].ToString()); item.SubItems.Add(reader["medic"].ToString()); Pacienti pacient = new Pacienti(); pacient.Id_pacient = Convert.ToInt32(reader["id_pacient"].ToString()); pacient.Nume = reader["nume"].ToString(); pacient.Varsta = Convert.ToInt32(reader["varsta"].ToString()); pacient.Denumire_boala = reader["denumire_boala"].ToString(); pacient.Grupa_sange = reader["grupa_sange"].ToString(); pacient.Alergii = reader["alergii"].ToString(); pacient.Cnp = reader["CNP"].ToString(); pacient.Medic = reader["medic"].ToString(); item.Tag = pacient; listView1.Items.Add(item); } }catch (OleDbException ex) { MessageBox.Show(ex.Message); } finally { conexiune.Close(); } }
public int CompareTo(object obj) { Pacienti pacient = (Pacienti)obj; if (this.varsta > pacient.varsta) { return(-1); } else if (this.varsta < pacient.varsta) { return(1); } else { return(this.varsta.CompareTo(pacient.varsta)); } }
public Form_Pacienti(Pacienti p) { pacient = p; InitializeComponent(); }