コード例 #1
0
 private void FormPrescription_Load(object sender, EventArgs e)
 {
     modele.Bind("select * from personnel", dataInfirmier.personnel);
     modele.Bind("select * from hospitalisation", dataInfirmier.hospitalisation);
     modele.Bind(dataGridView1, bindingNavigator1, dataInfirmier.prescription, prescriptionBindingSource, "select * from prescription");
     Utilitaire.desactiverColonnes_All(dataGridView1);
 }
コード例 #2
0
 public override void Refresh()
 {
     paramDataSet.users.Clear();
     mdl.Bind(dataGridView1, bindingNavigator1, paramDataSet.users, usersBindingSource, "SELECT * FROM users");
     classerUtilisateur();
     Utilitaire.desactiverColonnes_All(dataGridView1);
 }
コード例 #3
0
        private void toolStripComboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            string medecin = Tools.executeSimpleQuery("select personnel.idPersonne from personnel,prescription  where personnel.idPersonne=prescription.idPersonne and personnel.nom='" + toolStripComboBox1.Text + "'");

            prescriptionBindingSource.Filter = "idPersonne='" + medecin + "'";
            Utilitaire.desactiverColonnes_All(dataGridView1);
        }
コード例 #4
0
 private void FrmUtilisateur_Load(object sender, EventArgs e)
 {
     // mdl.Bind("SELECT * FROM users", paramDataSet.users);
     mdl.Bind(dataGridView1, bindingNavigator1, paramDataSet.users, usersBindingSource, "SELECT * FROM users");
     classerUtilisateur();
     Utilitaire.desactiverColonnes_All(dataGridView1);
 }
コード例 #5
0
 private void FormSalle_Load(object sender, EventArgs e)
 {
     modele.Bind("select * from service", dataInfirmier.Service);
     modele.Bind("select * from typedesalle", dataInfirmier.typedesalle);
     modele.Bind(dataGridView1, bindingNavigator1, dataInfirmier.Salle, salleBindingSource, "select * from salle");
     Utilitaire.desactiverColonnes_All(dataGridView1);
 }
コード例 #6
0
 public override void Refresh()
 {
     secretaireDataSet.rendezvous.Clear();
     toolStripComboBox1.Text = string.Empty;
     mdl.Bind(dataGridView1, bindingNavigator1, secretaireDataSet.rendezvous, bindingSourceRendezvous, "select * from rendezvous");
     Utilitaire.desactiverColonnes_All(dataGridView1);
 }
コード例 #7
0
 private void FormPatient_Load(object sender, EventArgs e)
 {
     Tools.Connect();
     mdl.Bind(dataGridView1, bindingNavigator1, medecinDataSet.patient, patientBindingSource, "SELECT * FROM patient");
     Utilitaire.chargerToolStripComboListe(patientBindingSource, medecinDataSet.patient, toolStripComboBox1, 7);
     Utilitaire.desactiverColonnes_All(dataGridView1);
 }
コード例 #8
0
 public override void Refresh()
 {
     secretaireDataSet.patient.Clear();
     toolStripTextBox1.Text = string.Empty;
     mdl.Bind(dataGridView1, bindingNavigator1, secretaireDataSet.patient, bindingSourcePatient, "select * from patient");
     Utilitaire.desactiverColonnes_All(dataGridView1);
 }
コード例 #9
0
 private void FormHospitalisation_Load(object sender, EventArgs e)
 {
     mdl.Bind("SELECT * FROM consultation", medecinDataSet.consultation);
     mdl.Bind(dataGridView1, bindingNavigator1, medecinDataSet.hospitalisation, hospitalisationBindingSource, "SELECT * FROM hospitalisation");
     Utilitaire.chargerToolStripComboListe(hospitalisationBindingSource, medecinDataSet.hospitalisation, toolStripComboBox1, 1);
     Utilitaire.desactiverColonnes_All(dataGridView1);
 }
コード例 #10
0
        public void charger()
        {
            //  dataGridView1=new DataGridView();
            vider();
            medecinDataSet.rendezvous.Clear();
            model.Bind("select * from rendezvous where idPersonnel='" + idMedecin + "' and dateRv between '" + dateDebut.ToString("yyyy-MM-dd") + " 00:00:00' and '" + dateFin.ToString("yyyy-MM-dd") + " 00:00:00' order by dateRv", medecinDataSet.rendezvous);
            DataTable tester = medecinDataSet.rendezvous;
            int       i = 0, k = 0;
            DateTime  datepremier = date;

            foreach (DataRow empR in tester.Rows)
            {
                DateTime testDate = DateTime.ParseExact(empR["dateRv"].ToString(), "dd/MM/yyyy HH:mm:ss", CultureInfo.InvariantCulture);
                if (k == 0)
                {
                    datepremier = testDate; k++;
                }

                if (datepremier.ToString("yyyy-MM-dd") != testDate.ToString("yyyy-MM-dd"))
                {
                    i = 0; datepremier = testDate;
                }
                dataGridView1.Rows[i].Cells[(int)testDate.DayOfWeek - 1].Value = Tools.executeSimpleQuery("select numeroPatient from patient where idPatient='" + empR["idPatient"].ToString() + "'");
                if (testDate >= date)
                {
                    dataGridView1.Rows[i].Cells[(int)testDate.DayOfWeek - 1].Style.BackColor = Color.LightGreen;
                }
                else
                {
                    dataGridView1.Rows[i].Cells[(int)testDate.DayOfWeek - 1].Style.BackColor = Color.Orange;
                }
                i++;
            }
            Utilitaire.desactiverColonnes_All(dataGridView1);
        }
コード例 #11
0
 private void FormPersonnels_Load(object sender, EventArgs e)
 {
     mdl.Bind("select * from service", paramDataSet.service);
     mdl.Bind("select * from specialite", paramDataSet.specialite);
     Utilitaire.chargerToolStripComboListe(specialiteBindingSource, paramDataSet.specialite, toolStripComboBox1, 1);
     mdl.Bind(dataGridView1, bindingNavigator1, paramDataSet.Personnel, personnelBindingSource, "select * from personnel");
     Utilitaire.desactiverColonnes_All(dataGridView1);
 }
コード例 #12
0
 public override void Refresh()
 {
     dataInfirmier.personnel.Clear();
     dataInfirmier.prescription.Clear();
     modele.Bind("select * from personnel", dataInfirmier.personnel);
     modele.Bind(dataGridView1, bindingNavigator1, dataInfirmier.prescription, prescriptionBindingSource, "select * from prescription");
     Utilitaire.desactiverColonnes_All(dataGridView1);
 }
コード例 #13
0
 public override void Refresh()
 {
     mdl.Bind(dataGridView1, bindingNavigator1, medecinDataSet.patient, patientBindingSource, "SELECT * FROM patient");
     toolStripComboBox1.Text = string.Empty;
     toolStripComboBox1.Items.Clear();
     Utilitaire.chargerToolStripComboListe(patientBindingSource, medecinDataSet.patient, toolStripComboBox1, 7);
     Utilitaire.desactiverColonnes_All(dataGridView1);
 }
コード例 #14
0
 private void FormSalle_Load(object sender, EventArgs e)
 {
     mdl.Bind("select * from service", paramDataSet.service);
     mdl.Bind("select * from typedesalle", paramDataSet.typedesalle);
     Utilitaire.chargerToolStripComboListe(serviceBindingSource, paramDataSet.service, toolStripComboBox1, 2);
     mdl.Bind(dataGridView1, bindingNavigator1, paramDataSet.Salle, salleBindingSource, "select * from salle");
     Utilitaire.desactiverColonnes_All(dataGridView1);
 }
コード例 #15
0
 private void FormPatient_Load(object sender, EventArgs e)
 {
     ConnexionDPI.Tools.Connect();
     //mdl.Bind("select * from patient", secretaireDataSet.patient);
     //mdl.Bind("select * from specialite", paramDataSet.specialite);
     //Utilitaire.chargerToolStripComboListe(specialiteBindingSource, paramDataSet.specialite, toolStripComboBox1, 1);
     mdl.Bind(dataGridView1, bindingNavigator1, secretaireDataSet.patient, bindingSourcePatient, "select * from patient");
     Utilitaire.desactiverColonnes_All(dataGridView1);
 }
コード例 #16
0
 private void FormConsultation_Load(object sender, EventArgs e)
 {
     mdl.Bind("SELECT * FROM pathologie", medecinDataSet.pathologie);
     mdl.Bind("SELECT * FROM personnel", medecinDataSet.personnel);
     mdl.Bind("SELECT * FROM patient", medecinDataSet.patient);
     mdl.Bind(dataGridView1, bindingNavigator1, medecinDataSet.consultation, consultationBindingSource, "SELECT * FROM consultation");
     Utilitaire.chargerToolStripComboListe(consultationBindingSource, medecinDataSet.consultation, toolStripComboBox1, 4);
     Utilitaire.desactiverColonnes_All(dataGridView1);
 }
コード例 #17
0
 public override void Refresh()
 {
     dataInfirmier.Service.Clear();
     dataInfirmier.typedesalle.Clear();
     dataInfirmier.Salle.Clear();
     modele.Bind("select * from service", dataInfirmier.Service);
     modele.Bind("select * from typedesalle", dataInfirmier.typedesalle);
     modele.Bind(dataGridView1, bindingNavigator1, dataInfirmier.Salle, salleBindingSource, "select * from salle");
     Utilitaire.desactiverColonnes_All(dataGridView1);
 }
コード例 #18
0
 private void FormRendezvous_Load(object sender, EventArgs e)
 {
     //ConnexionDPI.Tools.Connect();
     mdl.Bind("select * from patient", secretaireDataSet.patient);
     mdl.Bind("select * from personnel", secretaireDataSet.personnel);
     mdl.Bind("select * from consultation", secretaireDataSet.consultation);
     //Utilitaire.chargerToolStripComboListe(specialiteBindingSource, paramDataSet.specialite, toolStripComboBox1, 1);
     mdl.Bind(dataGridView1, bindingNavigator1, secretaireDataSet.rendezvous, bindingSourceRendezvous, "select * from rendezvous");
     Utilitaire.desactiverColonnes_All(dataGridView1);
 }
コード例 #19
0
 public override void Refresh()
 {
     medecinDataSet.personnel.Clear();
     medecinDataSet.hospitalisation.Clear();
     medecinDataSet.Prescription.Clear();
     mdl.Bind("SELECT * FROM personnel", medecinDataSet.personnel);
     mdl.Bind("SELECT * FROM hospitalisation where idHospitalisation=" + idHospitalisation, medecinDataSet.hospitalisation);
     comboBox1.Enabled = false;
     mdl.Bind(dataGridView1, bindingNavigator1, medecinDataSet.Prescription, prescriptionBindingSource, "select * from prescription where prescription.idHospitalisation='" + idHospitalisation + "'");
     Utilitaire.desactiverColonnes_All(dataGridView1);
 }
コード例 #20
0
 public override void Refresh()
 {
     paramDataSet.service.Clear();
     paramDataSet.typedesalle.Clear();
     paramDataSet.Salle.Clear();
     toolStripComboBox1.Text = string.Empty;
     mdl.Bind("select * from service", paramDataSet.service);
     mdl.Bind("select * from typedesalle", paramDataSet.typedesalle);
     mdl.Bind(dataGridView1, bindingNavigator1, paramDataSet.Salle, salleBindingSource, "select * from salle");
     Utilitaire.desactiverColonnes_All(dataGridView1);
 }
コード例 #21
0
 public override void Refresh()
 {
     paramDataSet.service.Clear();
     paramDataSet.specialite.Clear();
     paramDataSet.Personnel.Clear();
     toolStripComboBox1.Text = string.Empty;
     mdl.Bind("select * from service", paramDataSet.service);
     mdl.Bind("select * from specialite", paramDataSet.specialite);
     mdl.Bind(dataGridView1, bindingNavigator1, paramDataSet.Personnel, personnelBindingSource, "select * from personnel");
     Utilitaire.desactiverColonnes_All(dataGridView1);
 }
コード例 #22
0
 public override void Refresh()
 {
     medecinDataSet.consultation.Clear();
     medecinDataSet.hospitalisation.Clear();
     mdl.Bind("SELECT * FROM consultation", medecinDataSet.consultation);
     mdl.Bind(dataGridView1, bindingNavigator1, medecinDataSet.hospitalisation, hospitalisationBindingSource, "SELECT * FROM hospitalisation");
     toolStripComboBox1.Text = string.Empty;
     toolStripComboBox1.Items.Clear();
     Utilitaire.chargerToolStripComboListe(hospitalisationBindingSource, medecinDataSet.hospitalisation, toolStripComboBox1, 1);
     Utilitaire.desactiverColonnes_All(dataGridView1);
 }
コード例 #23
0
        private void Prescription_Load(object sender, EventArgs e)
        {
            if (appel == 4)
            {
                mdl.Bind("SELECT * FROM personnel", medecinDataSet.personnel);

                mdl.Bind("SELECT * FROM hospitalisation where idHospitalisation=" + idHospitalisation, medecinDataSet.hospitalisation);
                mdl.Bind(dataGridView1, bindingNavigator1, medecinDataSet.Prescription, prescriptionBindingSource, "select * from prescription where prescription.idHospitalisation='" + idHospitalisation + "'");
                //    comboBox1.Enabled = false;
                comboBox1.ForeColor = Color.White;
                comboBox1.BackColor = Color.White;
                Utilitaire.desactiverColonnes_All(dataGridView1);
            }
        }
コード例 #24
0
 public override void Refresh()
 {
     medecinDataSet.pathologie.Clear();
     medecinDataSet.patient.Clear();
     medecinDataSet.personnel.Clear();
     medecinDataSet.consultation.Clear();
     mdl.Bind("SELECT * FROM pathologie", medecinDataSet.pathologie);
     mdl.Bind("SELECT * FROM personnel", medecinDataSet.personnel);
     mdl.Bind("SELECT * FROM patient", medecinDataSet.patient);
     mdl.Bind(dataGridView1, bindingNavigator1, medecinDataSet.consultation, consultationBindingSource, "SELECT * FROM consultation");
     toolStripComboBox1.Text = string.Empty;
     toolStripComboBox1.Items.Clear();
     Utilitaire.chargerToolStripComboListe(consultationBindingSource, medecinDataSet.consultation, toolStripComboBox1, 4);
     Utilitaire.desactiverColonnes_All(dataGridView1);
 }
コード例 #25
0
        private void FormTest_Load(object sender, EventArgs e)
        {
            // Set a cell padding to provide space for the top of the focus
            // rectangle and for the content that spans multiple columns.
            Padding newPadding = new Padding(0, 1, 0, CUSTOM_CONTENT_HEIGHT);

            this.dataGridView1.RowTemplate.DefaultCellStyle.Padding = newPadding;

            // Set the selection background color to transparent so
            // the cell won't paint over the custom selection background.
            this.dataGridView1.RowTemplate.DefaultCellStyle.SelectionBackColor =
                Color.Transparent;

            // Set the row height to accommodate the content that
            // spans multiple columns.
            this.dataGridView1.RowTemplate.Height += CUSTOM_CONTENT_HEIGHT;

            // Initialize other DataGridView properties.
            this.dataGridView1.AllowUserToAddRows = false;
            this.dataGridView1.EditMode           = DataGridViewEditMode.EditOnKeystrokeOrF2;
            this.dataGridView1.CellBorderStyle    = DataGridViewCellBorderStyle.None;
            this.dataGridView1.SelectionMode      =
                DataGridViewSelectionMode.FullRowSelect;

            Tools.Connect();
            modele.Bind("select * from personnel", dataInfirmier.personnel);
            modele.Bind(dataGridView1, bindingNavigator1, dataInfirmier.prescription, prescriptionBindingSource, "select * from prescription");
            Utilitaire.desactiverColonnes_All(dataGridView1);

            // Adjust the row heights to accommodate the normal cell content.
            this.dataGridView1.AutoResizeRows(
                DataGridViewAutoSizeRowsMode.AllCellsExceptHeaders);

            // Attach handlers to DataGridView events.
            this.dataGridView1.ColumnWidthChanged += new
                                                     DataGridViewColumnEventHandler(dataGridView1_ColumnWidthChanged);
            this.dataGridView1.RowPrePaint += new
                                              DataGridViewRowPrePaintEventHandler(dataGridView1_RowPrePaint);
            this.dataGridView1.RowPostPaint += new
                                               DataGridViewRowPostPaintEventHandler(dataGridView1_RowPostPaint);
            this.dataGridView1.CurrentCellChanged += new
                                                     EventHandler(dataGridView1_CurrentCellChanged);
            this.dataGridView1.RowHeightChanged += new
                                                   DataGridViewRowEventHandler(dataGridView1_RowHeightChanged);
        }
コード例 #26
0
        private void dataGridView1_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            dataGridView2.Visible = true;

            //if (e.RowIndex >= 0 && e.RowIndex < dataGridView1.Rows.Count && e.ColumnIndex >= 0 && e.ColumnIndex < dataGridView1.ColumnCount)
            //    dataGridView1.CurrentCell = dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex];
            // Refresh();

            int             IdxLigneActuelle = e.RowIndex;
            DataGridViewRow ligne            = dataGridView1.Rows[IdxLigneActuelle];

            string idPrescription = ligne.Cells[0].Value.ToString();

            dataInfirmier.transmission.Clear();

            modele.Bind(dataGridView2, bindingNavigator1, dataInfirmier.transmission, transmissionBindingSource, "select * from transmission where idTraitement='" + idPrescription + "'");
            Utilitaire.desactiverColonnes_All(dataGridView2);
        }
コード例 #27
0
        private void dataGridView1_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            dataGridView2.Visible = true;

            int             IdxLigneActuelle = e.RowIndex;
            DataGridViewRow ligne            = dataGridView1.Rows[IdxLigneActuelle];

            string idPrescription = ligne.Cells[0].Value.ToString();

            reinitialiser();
            string fait       = ConnexionDPI.Tools.executeSimpleQuery("SELECT fait FROM prescription where idTraitement='" + idPrescription + "'");
            string traitement = ConnexionDPI.Tools.executeSimpleQuery("SELECT traitement FROM prescription where idTraitement='" + idPrescription + "'");

            textBox1.Text = fait;
            textBox2.Text = traitement;

            dataInfirmier.transmission.Clear();

            modele.Bind(dataGridView2, bindingNavigator1, dataInfirmier.transmission, transmissionBindingSource, "select * from transmission where idTraitement='" + idPrescription + "'");
            Utilitaire.desactiverColonnes_All(dataGridView2);
        }
コード例 #28
0
 private void toolStripButton2_Click(object sender, EventArgs e)
 {
     bindingSourcePatient.RemoveFilter();
     toolStripTextBox1.Text = string.Empty;
     Utilitaire.desactiverColonnes_All(dataGridView1);
 }
コード例 #29
0
 private void toolStripButton3_Click(object sender, EventArgs e)
 {
     bindingSourcePatient.Filter = "nom = '" + toolStripTextBox1.Text + "'";
     Utilitaire.desactiverColonnes_All(dataGridView1);
 }
コード例 #30
0
 private void toolStripComboBox1_SelectedIndexChanged(object sender, EventArgs e)
 {
     consultationBindingSource.Filter = "numeroConsultation='" + toolStripComboBox1.Text + "'";
     Utilitaire.desactiverColonnes_All(dataGridView1);
 }