Beispiel #1
0
 public object GetValue(string query, string DBpath)
 {
     using (DynDB qu = new DynDB())
     {
         return(qu.GetDataScalar(query, DBpath));
     }
 }
Beispiel #2
0
 public List <string> GetDataValues(string query, string DBpath)
 {
     using (DynDB qu = new DynDB())
     {
         return(qu.GetColumnList(query, DBpath));
     }
 }
Beispiel #3
0
        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);
                }
            }
        }
Beispiel #4
0
        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);
        }