예제 #1
0
 public FrmConsulterMedoc()
 {
     InitializeComponent();
     bsMedicament.DataSource     = VisiteurManager.ChargerMedicaments();
     cbxMedicament.DataSource    = bsMedicament;
     cbxMedicament.DisplayMember = "MED_NOMCOMMERCIAL";
 }
예제 #2
0
        private void lesMedicamentsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            List <MEDICAMENT>    lm = VisiteurManager.ChargerMedicaments();
            FrmConsultMedicament f  = new FrmConsultMedicament(lm);

            f.ShowDialog();
        }
예제 #3
0
 public FrmConsulterMedoc(string mat, MEDICAMENT med1)
 {
     InitializeComponent();
     bsMedicament.DataSource     = VisiteurManager.ChargerMedicaments();
     cbxMedicament.DataSource    = bsMedicament;
     cbxMedicament.DisplayMember = "MED_NOMCOMMERCIAL";
     this.mat = mat;
     bsMedicament.Position = bsMedicament.IndexOf(bsMedicament.List.OfType <MEDICAMENT>().ToList().Find(findPra => findPra.MED_NOMCOMMERCIAL == med1.MED_NOMCOMMERCIAL));
 }
예제 #4
0
        public Form1()
        {
            InitializeComponent();
            bsMedoc.DataSource     = VisiteurManager.ChargerMedicaments();
            cbxMedoc.DataSource    = bsMedoc;
            cbxMedoc.DisplayMember = "MED_NOMCOMMERCIAL";

            bsPraticien.DataSource     = VisiteurManager.ChargerPraticiens();
            cbxPraticien.DataSource    = bsPraticien;
            cbxPraticien.DisplayMember = "PRA_NOM";
        }
예제 #5
0
        //maj = vrai si création/modification
        //maj = faux si consultation
        public FrmSaisir(RAPPORT_VISITE r, bool maj)
        {
            InitializeComponent();
            this.r = r;
            //Initialisation de la liste déroulante praticien
            List <PRATICIEN> lp = VisiteurManager.ChargerPraticiens();

            bsPraticien.DataSource        = lp;
            cbxNomPraticien.DataSource    = bsPraticien;
            cbxNomPraticien.DisplayMember = "PRA_NOM";
            cbxNomPraticien.ValueMember   = "PRA_NUM";
            cbxNomPraticien.SelectedIndex = -1;

            //Initialisation de la liste déroulante motif de visite
            List <MOTIF_VISITE> lmot = VisiteurManager.ChargerMotifVisites();

            bsMotif.DataSource     = lmot;
            cbxMotif.DataSource    = bsMotif;
            cbxMotif.DisplayMember = "MOT_LIBEL";
            cbxMotif.ValueMember   = "MOT_CODE";
            cbxMotif.SelectedIndex = -1;
            //initialisation des listes déroulantes médicaments et échantillons
            List <MEDICAMENT> lmed = VisiteurManager.ChargerMedicaments();

            bsMed1.DataSource     = lmed;
            cbxMed1.DataSource    = bsMed1;
            cbxMed1.DisplayMember = "MED_NOMCOMMERCIAL";
            cbxMed1.ValueMember   = "MED_DEPOTLEGAL";
            cbxMed1.SelectedIndex = -1;
            bsMed2.DataSource     = lmed;
            cbxMed2.DataSource    = bsMed2;
            cbxMed2.DisplayMember = "MED_NOMCOMMERCIAL";
            cbxMed2.ValueMember   = "MED_DEPOTLEGAL";
            cbxMed2.SelectedIndex = -1;
            txtMatricule.Text     = r.RAP_MATRICULE;
            // Initialisation des contrôles du formulaire avec les valeurs du rapport de visite
            if (r.RAP_NUM != 0)
            {
                //si le rapport existe déjà, initialisation des contrôles avec les valeurs des propriétés du rapport
                InitRapport();
            }
            dtDateVisite.Focus();
            if (!maj)
            {
                btnValider.Enabled = false;
                btnValider.Visible = false;
                lblTitre.Text      = "Consultation d'un rapport";
            }
        }
        private void FrmConsulterMedicament_Load(object sender, EventArgs e)
        {
            List <MEDICAMENT> listMed = VisiteurManager.ChargerMedicaments();

            cbxMedicament.DataSource    = listMed;
            cbxMedicament.DisplayMember = "MED_NOMCOMMERCIAL";
            cbxMedicament.ValueMember   = "MED_DEPOTLEGAL";

            if (leMedoc != null)
            {
                cbxMedicament.SelectedValue = leMedoc.MED_DEPOTLEGAL;
                cbxMedicament.Enabled       = false;
            }
            else
            {
                cbxMedicament.SelectedIndex = -1;
                ucMedicament1.Visible       = false;
                this.leMedoc = null;
            }
        }