-
Notifications
You must be signed in to change notification settings - Fork 1
/
show_data2.xaml.cs
71 lines (64 loc) · 2.25 KB
/
show_data2.xaml.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using SQLite.Net.Attributes;
// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
namespace login_form
{
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class show_data2 : Page
{
string path;
SQLite.Net.SQLiteConnection conn;
public show_data2()
{
this.InitializeComponent();
path = Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path, "db.sqlite");
conn = new SQLite.Net.SQLiteConnection(new SQLite.Net.Platform.WinRT.SQLitePlatformWinRT(), path);
//conn.CreateTable<retrieve>;
}
public class irfan
{
[PrimaryKey]
public string Fname { get; set; }
public string Lname { get; set; }
public string Email { get; set; }
public string Password { get; set; }
public string cnf { get; set; }
public string uname { get; set; }
}
private void rt2_Click(object sender, RoutedEventArgs e)
{
var query = conn.Table<irfan>();
string em = "";
string ps = "";
string fn = "";
foreach (var message in query)
{
em = em + "" + "\n" + message.Email;
ps = ps + "" + "\n" + message.Password;
fn = fn + "" + "\n" + message.Fname;
}
t1.Text = "\n Email \n" + em;
t2.Text = "\n password \n" + ps;
t3.Text = "\n First Name \n" + fn;
}
private void rt3_Click(object sender, RoutedEventArgs e)
{
Frame.Navigate(typeof(show_data));
}
}
}