public Data(User user , Dictionary<Patient, Professional[]> followers, DocumentSerializable documents) { _user = user; _follow = followers; _documents = documents; _documentsAdded = new DocumentSerializable(new List<Message>(), new List<Prescription>()); }
public Data(User user, Dictionary<Patient, Professional[]> followers, DocumentSerializable documents, DocumentSerializable documentsAdded) { _user = user; _follow = followers; _documents = documents; _documentsAdded = documentsAdded; _needUpdate = false; }
protected Documents(User Sender, List<Professional> Receivers, Patient Patient, string Title) { _receivers = Receivers; _patient = Patient; _sender = Sender; _senderFullName = Sender.FirstName + " " + Sender.LastName; _patientFullName = Patient.FirstName + " " + Patient.LastName; _date = DateTime.Now; _title = Title; }
public UserXML CreateUser(User user) { UserXML u = new UserXML(); u.Adress = user.Adress; u.Birthdate = user.Birthdate; u.City = user.City; u.FirstName = user.FirstName; u.LastName = user.LastName; u.Password = user.Password; u.PhoneNumber = user.PhoneNumber; u.PhotoPath = user.Photo; u.Photo = DependencyService.Get<IBytesSaveAndLoad>().LoadByteArray(user.Photo); u.Postcode = user.Postcode; u.Pseudo = user.Pseudo; u.UserId = user.UserId; return u; }
public ProfilPage(Data userData, User user) { _userData = userData; _user = user; MultibleButtonView button = new MultibleButtonView(_userData); button.ProfilIsDisable (); button.FollowButton.Clicked += FollowButtonClicked; button.DocumentButton.Clicked += Document_Clicked; Label title = new Label { Text = "Profil", FontSize = 40, HorizontalOptions = LayoutOptions.Center }; Label name = new Label { Text = _user.FirstName + " " + _user.LastName, FontSize = 30, HorizontalOptions = LayoutOptions.Center }; Label phonenumber = new Label { Text = "Numero : " + _user.PhoneNumber , FontSize = 30, HorizontalOptions = LayoutOptions.Center }; Label adresse = new Label { Text = "Adresse : "+ _user.Adress, FontSize = 30, HorizontalOptions = LayoutOptions.Center }; Label postCode = new Label { Text = _user.Postcode.ToString(), FontSize = 30, HorizontalOptions = LayoutOptions.Center }; Label city = new Label { Text = _user.City, FontSize = 30, HorizontalOptions = LayoutOptions.Center }; Stream s = new MemoryStream(DependencyService.Get<IBytesSaveAndLoad>().LoadByteArray(_user.Photo)); Image logo = new Image { Source = ImageSource.FromStream(() => s), HorizontalOptions = LayoutOptions.FillAndExpand, }; Button Suivis = new Button { Text = "Voir mes Suivis", FontSize = 40, BackgroundColor = Color.FromHex("439DFE"), VerticalOptions = LayoutOptions.EndAndExpand }; Suivis.Clicked += FollowButtonClicked; if (!UserAccount()) Suivis.Text = "Retour à mon suivi"; else if(PageForPatient()) Suivis.Text = "Voir mon Suivi"; Button document = new Button { Text = "Voir mes documents", FontSize = 40, BackgroundColor = Color.FromHex("439DFE"), VerticalOptions = LayoutOptions.EndAndExpand }; document.Clicked += Document_Clicked; if (!UserAccount()) document.IsVisible = false; Button modify = new Button { Text = "Modifier mes infos", FontSize = 40, BackgroundColor = Color.FromHex("439DFE"), VerticalOptions = LayoutOptions.EndAndExpand }; modify.Clicked += async (sender, e) => { await Navigation.PushAsync(new ModifyProfil(_userData)); }; if (!UserAccount()) modify.IsVisible = false; Button deconnection = new Button { Text = "Se déconnecter", FontSize = 40, BackgroundColor = Color.FromHex("439DFE"), VerticalOptions = LayoutOptions.EndAndExpand }; deconnection.Clicked += Deconnection_Clicked; Content = new StackLayout { Children = { button.Content, title, name, phonenumber, adresse, postCode, city, logo, Suivis, document, modify, deconnection }, }; this.BackgroundColor = Color.White; }
public Professional(User user, string role) :base(user.UserId, user.FirstName, user.LastName, user.Birthdate, user.Adress, user.City, user.Postcode, user.Pseudo, user.Password, user.PhoneNumber, user.Photo) { _professionalId = UserId; Role = role; }
public Prescription(string Title, string DocPath, User Sender, List<Professional> Receivers, Patient Patient) : base(Sender, Receivers, Patient, Title) { this.DocPath = DocPath; }
public Message(string Title, string Contents, User Sender, List<Professional> Receivers, Patient Patient) : base(Sender, Receivers, Patient, Title) { _contents = Contents; _patientFullName = Patient.FirstName + " " + Patient.LastName; }