private void ImageCH_Click(object sender, RoutedEventArgs e) { string image_path = System.IO.Directory.GetCurrentDirectory() + @"images\user.jpg"; OpenFileDialog openFileDialog = new OpenFileDialog(); if (openFileDialog.ShowDialog() == true) { image_path = openFileDialog.FileName; using (DynDB db = new DynDB()) { db.Register($"UPDATE USERS SET PHOTO = @0 WHERE ID = {Int32.Parse(_Window._identity)}", image_path); ImageDyn.Source = db.Load_Image(_Window._identity); _Window.image_prof.Source = db.Load_Image(_Window._identity); } } }
public ProfileView(MainWindow Window, List <string> Credentials) { _Window = Window; InitializeComponent(); _Credentials = new List <string>(); _Credentials = Credentials; DynDataFolder = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + @"\PawloCore\" + _Window._identity + @"_user_data\"; using (DynDB db = new DynDB()) { ImageDyn.Source = db.Load_Image(_Window._identity); } DateRegistTxt.Text = DateRegistTxt.Text + " " + _Credentials[10]; FN_man.Content = _Credentials[1]; LN_man.Content = _Credentials[2]; Projects.ProfileElements.PersonalInfoUC EssentialInfoUC = new Projects.ProfileElements.PersonalInfoUC(_Credentials, this, Window); PersonalStk.Children.Add(EssentialInfoUC); Projects.ProfileElements.AdditionalInfoUC AdditionalInfoUC = new Projects.ProfileElements.AdditionalInfoUC(_Credentials); AdditionalStk.Children.Add(AdditionalInfoUC); }