Exemple #1
0
        public frmMain(ModelUser model)
        {
            InitializeComponent();
            ddPatient.Visible  = false;
            lblPatient.Visible = false;
            this.Model         = model;
            User usr = new User(this.Model.ConnectedUser);

            this.ModeleMesure = new ModelMeasure(usr);
            string[] namesPatient;
            CreateLeftButtons();

            if (this.Model.ConnectedUser.IsDoctor)
            {
                List <string> names = new List <string>();
                btnSelected = (btnAccueil)plButtonAccueil.Controls.Find("Patients", true).ToArray()[0];

                foreach (var item in this.Model.GetAllUserForDoc())
                {
                    names.Add(item[0] + " " + item[1]);
                }
                ddPatient.Items                        = names.ToArray();
                ddPatient.selectedIndex                = 0;
                ddPatient.Visible                      = true;
                lblPatient.Visible                     = true;
                namesPatient                           = ddPatient.selectedValue.Split(' ');
                this.Model.ConnectedUser.IdUser        = this.Model.ConnectedUser.IdUser;
                this.ModeleMesure.ConnectedUser.IdUser = this.Model.GetIdByNames(namesPatient[1], namesPatient[0]);
            }
            else
            {
                btnSelected = (btnAccueil)plButtonAccueil.Controls.Find("Mesures", true).ToArray()[0];
            }
            toShow(null);
        }
Exemple #2
0
 public frmMain(ModelUser model)
 {
     InitializeComponent();
     CreateLeftButtons();
     this.Model        = model;
     this.ModeleMesure = new ModelMeasure(this.Model.ConnectedUser);
 }
Exemple #3
0
 public boxTableau(ModelMeasure mod)
 {
     InitializeComponent();
     lblDates   = Controls.Find("lblDate", true);
     lblTypes   = Controls.Find("lblType", true);
     this.Model = mod;
     GenerateTable();
 }
Exemple #4
0
 public boxGraphique(ModelMeasure mod)
 {
     InitializeComponent();
     this.Model     = mod;
     dtpDebut.Value = DateTime.Now;
     dtpFin.Value   = DateTime.Now.AddDays(1);
     fillTypes();
 }
Exemple #5
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="mod"></param>
 public boxGraphique(ModelMeasure mod)
 {
     InitializeComponent();
     this.Model     = mod;
     dtpDebut.Value = DateTime.Now;
     dtpFin.Value   = DateTime.Now.AddDays(1);
     fillTypes();
     if (this.Model.ConnectedUser.IsDoctor)
     {
         plType.Visible = false;
     }
 }
Exemple #6
0
        public boxTableau(ModelMeasure mod)
        {
            InitializeComponent();
            lblDates      = Controls.Find("lblDate", true);
            lblTypes      = Controls.Find("lblType", true);
            this.Model    = mod;
            this.NbWeek   = 0;
            dateFormatted = date.ToString("yyyy-MM-dd");



            GenerateTable();
        }
Exemple #7
0
 public boxMesures(ModelMeasure modele, bool mod)
 {
     InitializeComponent();
     Modele              = modele;
     this.Modification   = mod;
     tbxInsuline.Enabled = false;
     btnDelete.Visible   = false;
     if (this.Modification)
     {
         fillWithValue(this.Modele.Mes);
     }
     else
     {
         btnSendMesure.ButtonText = "Envoyer";
     }
 }
Exemple #8
0
        public boxMesures(ModelMeasure modele, bool mod)
        {
            InitializeComponent();
            Modele            = modele;
            this.Modification = mod;

            this.ModelInsu      = new ModelMyInsulin();
            tbxInsuline.Enabled = false;
            btnDelete.Visible   = false;
            ddType.Items        = Modele.GetAllTypesByUser().ToArray();
            if (this.Modification)
            {
                fillWithValue(this.Modele.Mes);
            }
            else
            {
                btnSendMesure.ButtonText = "Envoyer";
            }
        }
Exemple #9
0
 public boxGraphique(ModelMeasure mod)
 {
     InitializeComponent();
     this.Model = mod;
     CreateChart("DAY");
 }