-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmarketCard.cs
56 lines (49 loc) · 1.85 KB
/
marketCard.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
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WinFormsApp1
{
public partial class marketCard : UserControl
{
public int id;
public string uemail=null,upass=null;
public marketCard(JObject data,JObject userdata)
{
InitializeComponent();
// MessageBox.Show(data.ToString());
this.id = int.Parse(data.GetValue("id").ToString());
this.uemail = userdata.GetValue("name").ToString();
this.upass = userdata.GetValue("password").ToString();
//data.Add("id", rd.GetValue(0).ToString());
//data.Add("name", rd.GetValue(1).ToString());
//data.Add("address", rd.GetValue(2).ToString());
//data.Add("value", rd.GetValue(3).ToString());
//data.Add("image", rd.GetValue(4).ToString());
//data.Add("status", rd.GetValue(5).ToString());
this.nameText.Text = data.GetValue("name").ToString();
this.addressText.Text = data.GetValue("address").ToString();
this.valueText.Text = data.GetValue("value").ToString();
this.textBox1.Text = data.GetValue("type").ToString();
}
private void button1_Click(object sender, EventArgs e)
{
dbHandler d = new dbHandler();
if (d.buyproperty(this)==-1)
{
MessageBox.Show("Try again later!");
}
else
{ /*var paymentpage = new Payment(userData);
paymentpage.Show();*/
MessageBox.Show("Property added.");
}
}
}
}