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); }
public frmMain(ModelUser model) { InitializeComponent(); CreateLeftButtons(); this.Model = model; this.ModeleMesure = new ModelMeasure(this.Model.ConnectedUser); }
public boxTableau(ModelMeasure mod) { InitializeComponent(); lblDates = Controls.Find("lblDate", true); lblTypes = Controls.Find("lblType", true); this.Model = mod; GenerateTable(); }
public boxGraphique(ModelMeasure mod) { InitializeComponent(); this.Model = mod; dtpDebut.Value = DateTime.Now; dtpFin.Value = DateTime.Now.AddDays(1); fillTypes(); }
/// <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; } }
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(); }
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"; } }
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"; } }
public boxGraphique(ModelMeasure mod) { InitializeComponent(); this.Model = mod; CreateChart("DAY"); }