-
Notifications
You must be signed in to change notification settings - Fork 0
/
Form2.cs
115 lines (90 loc) · 3.69 KB
/
Form2.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
using System;
using System.Data;
using System.Globalization;
using System.Linq;
using System.Windows.Forms;
using System.Configuration;
using WebPortal.Classes;
namespace WebPortal
{
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}
private void Form2_FormClosing(object sender, FormClosingEventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
}
private void textBox3_TextChanged(object sender, EventArgs e)
{
}
private void Form2_Load(object sender, EventArgs e)
{
host.Text = Server.Host;
serverIp.Text = Server.ServerIp;
serverPort.Text = Server.ServerPort.ToString(CultureInfo.InvariantCulture);
testUser.Text = Server.TestUser;
testArea.Text = Server.TestArea;
secretKey.Text = Server.SecretKey;
docServer.Text = Server.DocServer;
docDirectory.Text = Server.DocDirectory;
var conn = new EntitiesModel();
var grplist = conn.ScanGroups.ToList();
// New table.
var table = new DataTable();
table.Columns.Add("group_code");
table.Columns.Add("group_description");
// Add rows.
foreach (var g in grplist) table.Rows.Add(g.groupcode, g.groupdescription);
patientImgCategory.DataSource = new DataView(table);
insuranceImgCategory.DataSource = new DataView(table);
documentsCategory.DataSource = new DataView(table);
patientImgCategory.SelectedValue = Server.PatientImgCategory;
insuranceImgCategory.SelectedValue = Server.InsuranceImgCategory;
documentsCategory.SelectedValue = Server.DocumentsCategory;
syncBuffer.Text = Server.SyncBuffer;
}
private void saveSettings_Click(object sender, EventArgs e)
{
}
private void enableDebug_CheckedChanged(object sender, EventArgs e)
{
Server.Debug = enableDebug.Checked;
}
private void requestTest_Click(object sender, EventArgs e)
{
}
private void StartStop_Click(object sender, EventArgs e)
{
}
private void generateKey_Click(object sender, EventArgs e)
{
secretKey.Text = Guid.NewGuid().ToString();
}
private void configCancel_Click(object sender, EventArgs e)
{
host.Text = ConfigurationManager.AppSettings["host"];
serverIp.Text = ConfigurationManager.AppSettings["serverIp"];
serverPort.Text = ConfigurationManager.AppSettings["serverPort"];
testUser.Text = ConfigurationManager.AppSettings["testUser"];
testArea.Text = ConfigurationManager.AppSettings["testArea"];
secretKey.Text = ConfigurationManager.AppSettings["secretKey"];
docDirectory.Text = ConfigurationManager.AppSettings["docDirectory"];
docServer.Text = ConfigurationManager.AppSettings["docServer"];
patientImgCategory.SelectedValue = ConfigurationManager.AppSettings["patientImgCategory"];
insuranceImgCategory.SelectedValue = ConfigurationManager.AppSettings["insuranceImgCategory"];
documentsCategory.SelectedValue = ConfigurationManager.AppSettings["documentsCategory"];
syncBuffer.Text = ConfigurationManager.AppSettings["syncBuffer"];
}
private void serverIp_TextChanged(object sender, EventArgs e)
{
}
private void patientImgCategory_SelectedIndexChanged(object sender, EventArgs e)
{
}
}
}